javascriptmp4live-streamingfmp4

MSE dont play video if mimetype have audio codecs in chrome


I have an fmp4(h264/aac) stream from the server, and a Wsplayer player, if the stream without sound the video plays in firefox and chrome browsers, but if the stream with sound in chrome the video does not play

I establish a connection via websocket

if mediasource.addSourceBuffer('video/mp4; codecs="avc1.4D4028"'); to work and if mediasource.addSourceBuffer('video/mp4; codecs="avc1.4D4028, mp4a.40.2"'); dont work


Solution

  • How I managed to solve the problem:

    1. This is a division within one MediaSource of two sourceBuffers separately for video and audio on the client
    2. On the server side, create two init fragments for video and audio