Provide a meaningful error for Multiplexed MP4s
Created by: adrees
Hi all,
GPAC/MP4Box seems to create multiplexed mp4 segments ( dash 'main' and 'full' profile ). Something like this...
<Representation id="1" mimeType="video/mp4" codecs="avc1.42c01e,mp4a.40.2" width="1024" height="576" frameRate="25" sar="16:11" audioSamplingRate="48000" startWithSAP="1" bandwidth="1208404"/><AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
Chrome launches the 'Error creating source buffer' alert, however it then goes on to play the content.
Digging a bit deeper it looks like Chrome doesn't like adding two source buffers of the same codec and throws an exception. It looks like the video buffer is added ok, addSourceBuffer("video/mp4;codecs="avc1.42c01e,mp4a.40.2""), but when addSourceBuffer("video/mp4;codecs="avc1.42c01e,mp4a.40.2"") is called for the audio track an exception is thrown and the alert appears.
One way round it I thought would be to pass it something like "video/mp4;codecs="avc1.42c01e"" for the video and "audio/mp4;codecs="mp4a.40.2"" for the audio track however I then get an encoding error which is probably to do with this https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebuffer-init-segment-received (The note near point 5)
IE11 doesn’t seem to mind. However it is requesting the same file once for video and then again for audio when presumably it could just make a single request per segment… and add only one buffer?
I'm not sure if this is a problem with MP4Box creating a bad manifest, with MSE in Chrome or dash.js any thoughts?
In the short term it would be nice the 'Error creating source buffer' alert could be suppressed as Chrome is actually capable of playback using a single source buffer in this case?