Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.06k stars 1.66k forks source link

[StreamController] Video Element Error: MEDIA_ERR_DECODE (CHUNK_DEMUXER_ERROR_APPEND_FAILED: Invalid top-level ISO BMFF box type 0x6f6f6600) #4215

Closed EricPengShuai closed 12 months ago

EricPengShuai commented 1 year ago
Environment
Steps to reproduce
  1. There is a local video that uses FFMPEG to encodes as 5 levels and MP4FRAGMENT and MP4DASH tools.
  2. The mpd file obtained by mp4dash.dat is
    <?xml version="1.0" ?>
    <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" minBufferTime="PT2.00S" mediaPresentationDuration="PT4M47.500S" type="static">
    <!-- Created with Bento4 mp4-dash.py, VERSION=2.0.0-640 -->
    <Period>
    <!-- Video -->
    <AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" maxWidth="1920" maxHeight="1080">
      <SegmentTemplate timescale="1000" duration="2000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1"/>
      <Representation id="video/avc1/1" codecs="avc1.640028" width="1920" height="1080" scanType="progressive" frameRate="30" bandwidth="1679015"/>
      <Representation id="video/avc1/2" codecs="avc1.64001F" width="1280" height="720" scanType="progressive" frameRate="30" bandwidth="882900"/>
      <Representation id="video/avc1/3" codecs="avc1.64001F" width="896" height="504" scanType="progressive" frameRate="30" bandwidth="477620"/>
      <Representation id="video/avc1/4" codecs="avc1.64001E" width="640" height="360" scanType="progressive" frameRate="30" bandwidth="282574"/>
      <Representation id="video/avc1/5" codecs="avc1.64000C" width="256" height="144" scanType="progressive" frameRate="30" bandwidth="67397"/>
    </AdaptationSet>
    <!-- Audio -->
    <AdaptationSet mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true">
      <SegmentTemplate timescale="1000" duration="2000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1"/>
      <Representation id="audio/und/mp4a.40.2" codecs="mp4a.40.2" bandwidth="196899" audioSamplingRate="48000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:mpegB:cicp:ChannelConfiguration" value="2"/>
      </Representation>
    </AdaptationSet>
    </Period>
    </MPD>
  3. On the local Nginx server, then deploy the Dash Client and video resources locally
  4. Chrome/Edge played video with 1min and will collapse, Prompt this error message CHUNK_DEMUXER_ERROR_APPEND_FAILED: Invalid top-level ISO BMFF box type 0x6f6f6600
Observed behavior

Chrome/Edge played a video about 1min and it will collapse directly. Console prompts the following information[StreamController] Video Element Error: MEDIA_ERR_DECODE (CHUNK_DEMUXER_ERROR_APPEND_FAILED: Invalid top-level ISO BMFF box type 0x6f6f6600)

Console output

[2904888][AbrController] [video] switching from throughput to buffer occupancy ABR rule (buffer: 13.625). [2904889][StreamProcessor][video] Fragment request url http://127.0.0.1/output/video/avc1/1/seg-56.m4s for stream id defaultId_0 and media type video is on the ignore list and will be skipped [2905347][StreamProcessor][audio] OnFragmentLoadingCompleted for stream id defaultId_0 and media type audio - Url: http://127.0.0.1/output/audio/und/mp4a.40.2/seg-52.m4s [2905353][StreamProcessor][audio] OnFragmentLoadingCompleted for stream id defaultId_0 and media type audio - Url: http://127.0.0.1/output/audio/und/mp4a.40.2/seg-53.m4s
[2905359][StreamProcessor][audio] OnFragmentLoadingCompleted for stream id defaultId_0 and media type audio - Url: http://127.0.0.1/output/audio/und/mp4a.40.2/seg-54.m4s
[2905367][StreamProcessor][audio] OnFragmentLoadingCompleted for stream id defaultId_0 and media type audio - Url: http://127.0.0.1/output/audio/und/mp4a.40.2/seg-55.m4s
[2905368][AbrController] [audio] switching from throughput to buffer occupancy ABR rule (buffer: 13.191). [2905373][StreamProcessor][audio] OnFragmentLoadingCompleted for stream id defaultId_0 and media type audio - Url: http://127.0.0.1/output/audio/und/mp4a.40.2/seg-56.m4s
[2905396][StreamProcessor][video] Fragment request url http://127.0.0.1/output/video/avc1/1/seg-57.m4s for stream id defaultId_0 and media type video is on the ignore list and will be skipped [2905902][StreamProcessor][video] Fragment request url http://127.0.0.1/output/video/avc1/1/seg-58.m4s for stream id defaultId_0 and media type video is on the ignore list and will be skipped [2906413][StreamProcessor][video] Fragment request url http://127.0.0.1/output/video/avc1/1/seg-59.m4s for stream id defaultId_0 and media type video is on the ignore list and will be skipped [2906923][StreamProcessor][video] Fragment request url http://127.0.0.1/output/video/avc1/1/seg-60.m4s for stream id defaultId_0 and media type video is on the ignore list and will be skipped [2907449][StreamProcessor][video] OnFragmentLoadingCompleted for stream id defaultId_0 and media type video - Url: http://127.0.0.1/output/video/avc1/1/seg-61.m4s
[2907450][StreamProcessor][video] Blacklisting segment with url http://127.0.0.1/output/video/avc1/1/seg-61.m4s [2907453][StreamController] Video Element Error: MEDIA_ERR_DECODE (CHUNK_DEMUXER_ERROR_APPEND_FAILED: Invalid top-level ISO BMFF box type 0x6f6f6600) [2907453][StreamController] [object MediaError]

Expected behavior

The video is played normally, it will not collapse

dsilhavy commented 1 year ago

This error originates from the MediaSource and not from dash.js. Looks like your content is broken. Please check if you get the same problem in Shaka Player: https://shaka-player-demo.appspot.com/demo/

EricPengShuai commented 1 year ago

I cannot access the shaka.demo website. but I use the official dash player 4.7.0, I'll get the same problem. Does that mean there's something wrong with my original video files or with the way I encoded and segmented the video?

dsilhavy commented 1 year ago

Yes there is something wrong in the packaging as the error claims there is an invalid top-level ISOBMFF box.

EricPengShuai commented 1 year ago

ok, thanks