Menu

Problem playing MPEG DASH streams on DASH IF reference player

Help
2014-02-19
2014-04-15
  • Richard Soares

    Richard Soares - 2014-02-19

    I've created an MPEG DASH with the following command:

    MP4Box -dash 10000 -frag 2000 -segment-name segment_ [file.mp4] -out [file.mpd]

    I moved the files to an Apache server.
    I can open the video stream with MP4Client (Osmo4) but it doesn't work with the DASH IF Reference client. (http://www.dashif.org/reference/players/javascript/0.2.5/index.html)

    Can anyone help me to solve this issue?

     
  • Richard Soares

    Richard Soares - 2014-02-21

    I get the same result with the newest version of the player.

     
  • kappolo

    kappolo - 2014-02-22

    I am having the same issue with the following video (sample_mpeg4.mp4): http://a1408.g.akamai.net/5/1408/1388/2005110405/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_mpeg4.mp4.zip located on Apple's "QuickTime: Sample Files" page (http://support.apple.com/kb/ht1425)
    I can convert it and play it back with Osmo4, but it doesn't play back with DASH-IF (version 1.0.0) or ITEC (Version 0.5a) Dash JS Player. I get the following JavaScript console message: Uncaught ReferenceError: video is not defined
    The command line I used with MP4Box - GPAC version 0.5.0-rev4065 is: MP4Box -frag 10000 -dash 10000 -out sample.mpd -segment-name segment sample_mpeg4.mp4

     
  • Romain Bouqueau

    Romain Bouqueau - 2014-02-22

    Hi,

    You'll find answers to your questions on the forums using the search tool. To sum up:
    1) The DASH-IF player only support a subset of DASH. So you can indeed generate content with MP4Box which is compliant but not readable by dash.js. Please cross-check your content with MP4Client when you think MP4Box is faulty.
    2) Those web players rely on a really specific media stack of the browser, which have limited media capabilities (codec and container). Please check your encoding parameters or find command-lines on the forum (ex: https://sourceforge.net/p/gpac/discussion/287547/thread/bb9a9893/?page=1).

    I don't now of any public feature list of the DASH players and the media stacks of the browsers. We provide a list of options when typing 'MP4Box -h dash'. Maybe it would be great to centralize a list of working parameters from the GPAC tools.

    Some of our DASH sequences (http://gpac.wp.mines-telecom.fr/2012/02/23/dash-sequences/) do play, in dash.js and we provide the parameters we used to encode them (browse it and look for readme.txt files: http://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/).

    Feedback welcome.

    Romain

     
  • Cyril Concolato

    Cyril Concolato - 2014-02-24

    Hi Kappolo,

    I concur with Romain's response. I'll just add that you need to make sure that your web server has the right settings, regarding the MIME types and the Cross-Origin Request headers. I've had problems with browser-based players because of that, while MP4Client doesn't check them.

    HTH,
    Cyril

     
  • kappolo

    kappolo - 2014-03-10

    Hello,
    me again.
    I have tried with another video downloaded from http://www.dvdloc8.com/clip.php?movieid=13006&clipid=1 (H264 with AAC LC Audio).
    Command line (After renaming file ss.mp4):
    MP4Box -dash 3000 -out sample.mpd -segment-name ss_part_ ss.mp4

    (I am also able to play the file with GPAC/Osmo4.)

    Besides having to add manually the base url, I have tried to play it with DASH-IF and ITEC players.
    I am having the following messages:
    Error creating source buffer (DASH-IF)
    Cannot call method 'append' of undefined (ITEC)

    DASH-IF extended Message:
    Error creating source buffer.

    Uncaught InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable. dash.all.js:3
    MediaPlayer.dependencies.SourceBufferExtensions.getBufferRange dash.all.js:3
    MediaPlayer.dependencies.SourceBufferExtensions.getBufferLength dash.all.js:3
    $ dash.all.js:3
    w dash.all.js:3
    Working time is video time: 0 dash.all.js:3
    BufferController.validate() video | state: LOADING dash.all.js:3
    video Playback rate: 1 dash.all.js:3
    video Working time: 0 dash.all.js:3
    video Video time: 0

    I am using Tomcat 7.0, and I have added to web.xml the mpd mime type:

    <mime-mapping>
        <extension>mpd</extension>
        <mime-type>application/dash+xml</mime-type>
    </mime-mapping>
    

    I am able to reproduce other videos directly (for example http://dash.edgesuite.net/envivio/dashpr/clear/Manifest.mpd).

    I might be do something wrong, I am not really knowledgeable about Video/Audio formats.

    Thank you,

    Andrea

     

    Last edit: kappolo 2014-03-10
  • Winsen

    Winsen - 2014-03-26

    Hi Kappolo,
    I've done the same job with you, here's my suggestion.

    First, you need the most up to date Chrom browser, Dash.js base on MediaSource Extensions api, that means it only works on specific browser.
    Secondly, you need to add -frag-rap argument in Mp4Box's command line, cause Chrome only support SourceBuffer start with SAP. But there is a bug in MP4BOX when using -frap-rap, it will generate segments with different duration even with timely key frames, and this is where I stucked.

    I had spend a lot of time to find out these limitation, in fact, you will find those defined in the DASH-AVC/264 document which is also public by the DASH IF group.

    Hope it helps,

    Winsen

     

    Last edit: Winsen 2014-03-26
  • kappolo

    kappolo - 2014-03-31

    Hello Winsen,

    I have used -rap (because -frag-rap argument doesn't work) Command line: MP4Box -dash 3000 -rap -out sample.mpd -segment-name ss_part_ ss.mp4

    The error I am seeing is identical to the one reported in my previous post.

    Note: Plays fine in Osmo4
    Note2: Segments have different duration

     
  • Winsen

    Winsen - 2014-04-01

    Hi, kappolo

    Sorry I hadn't notice you had post the video link.

    Try using this command line, it works with me:

    mp4box -dash 2000 -frag 2000 -rap -frag-rap -segment-name sample_%s -url-template sample.mp4

    Note: You need to add -frag-rap argument even with single fragment in a segment. I havn't check the source code of Mp4Box, this might be a bug.

    If you still get "Error creating source buffer" message, than check out the codecs from the Representation tag of MPD file, MediaSource Extensions in Chrome just support a few codecs. The codecs from your link should be "avc1.640029,mp4a.40.2"

    As for different durations, Dash.js index segment by video timeline, this problem will cause early ending and seeking mistake. It's easy to fix the ending problem but difficult for the second one. Hope Mp4Box can fix this problem soon.

    Winsen

     

    Last edit: Winsen 2014-04-01
  • kappolo

    kappolo - 2014-04-01

    I still get Option -frag-rap unknown. (do I need to get the SVN version?)
    Is there already a bug ticket for the different duration issues?
    Thanks!

     
  • Winsen

    Winsen - 2014-04-02

    You can use the GPAC Nightly Builds, I'm working with Windows OS, other platforms' version should make no different.

     

    Last edit: Winsen 2014-04-02
  • kappolo

    kappolo - 2014-04-02

    I have tried it with the Nightly Build.
    I still have the "Error creating source buffer" message. But the video now plays for 58 seconds (of a 2:09 video). Are you experiencing the same?
    Thanks for your help!

     
  • Winsen

    Winsen - 2014-04-03

    I didn't get the error reported, maybe we working on different versions.

    You can check out the durations in SegmentTemplate tag of MPD file, that should be 5760 of this video, and this makes Dash.js trying to request the 10th seg repeatly at 58 sec.

    Mp4Box using the duration of first segment to mark the SegmentTemplate tag, but the second key frame appears at 5.76 sec (138th frame) in this video. A better issue is to transcode video with timely key frames, you can use ffmpeg to achieve this, but the playback still behave unstable before Mp4Box can fix that bug.

    Winsen

     
  • kappolo

    kappolo - 2014-04-03

    Hello Winsen,

    Few question for you:
    1) How do I transcode the video with timely key frames with ffmpeg? (can you please give me the command line?)
    2) I don't see any bug tickets for the MP4Box bug you are mentioning. Did you reported the issue to them? Are they aware of the issue?

    Thanks,
    Andrea

     
  • Winsen

    Winsen - 2014-04-04

    Hi Andrea,

    Here's an example for ffmpeg command:

    ffmpeg -i input.webm -c:v libx264 -c:a libvo_aacenc -force_key_frames expr:gte(t,n_forced*2) output.mp4

    The key argument is -force_key_frames, it makes ffmpeg to generate key frames in every 2 sec, the interval depends on your segment durations.

    I hadn't create a bug ticket cause I'm not good at writting, can't make a clear description. Could you help to report this bug?

    Thanks,
    Winsen

     
  • Winsen

    Winsen - 2014-04-06

    Hi again,

    Recently I've found out that the file format for DASH.JS project was definded in the ISO BMFF Byte Stream Format. The main different between ISO BMFF BSF and MPEG-DASH stander is that it support only two types of Stream Access Point, and this's how -frag-rap argment works.

    Here's the link to ISO BMFF BSF:
    https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/isobmff-byte-stream-format.html

    Hope it helps,
    Winsen

     

    Last edit: Winsen 2014-04-06
  • Cyril Concolato

    Cyril Concolato - 2014-04-14

    Hi Winsen, Kappolo,

    It is indeed hard to generate streams that work well with Chrome. This is a combination of coding and packaging. We're trying to make things easier but it's not yet ready.

    Regarding the possible bug with MP4Box/Chrome, could you share a file that creates teh bug and give the command lines that work and don't work?

    Thanks,
    Cyril

     
  • Winsen

    Winsen - 2014-04-15

    Hi Cyril,

    The usage in Chrome needs the segments start with Stream Access Point, and the only problem we have is the segments durations are quite different. It turn out to be the cutting algorithm limits the duration not higher than what is asked, but sometimes the closest keyframe may beyond the range, like this post:
    https://sourceforge.net/p/gpac/discussion/287547/thread/40008d04/

    I've check out the latest build and found out the -rap argument now works well, maybe I had mistake this problem with the one I used to work with.

    Thanks for your works, it helps me a lot :)
    Winsen

     

    Last edit: Winsen 2014-04-15