[vlc-devel] DASH specific MP4 boxes

Frederic YHUEL fyhuel at viotech.net
Thu Mar 15 16:18:49 CET 2012

On Thu, Mar 15, 2012 at 3:33 PM, Robert Forsman
<bob.forsman at ericsson.com> wrote:
> On Thu, 15 Mar 2012 04:26:28 -0400
> Frederic YHUEL <fyhuel at viotech.net> wrote:
>> My problem is that with this DASH content [1], the tfhd box doesn't
>> give a default sample duration, and the trun box doesn't give sample
>> durations either. So I was wondering if I could get the information
>> from DASH specific boxes.
>> For now, I use a hack, I divide the fragment duration by the number of
>> samples, I will see that later.
>> [1] http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/ElephantsDream/MPDs/ElephantsDream_2s_isoffmain_DIS_23009_1_v_2_1c2_2011_08_30.mpd
> Ouch.  I guess if you are really forgiving you could just figure out
> the sample duration from the video or audio samples.  AAC samples have
> 1024 samples per AU (and you get the sample rate from the
> AudioSampleEntry box).

Ok, thanks for the tip.

> Video is harder to figure out because I'm pretty sure H.264 has an
> analog to the repeat_first_field of MPEG2 (pic_struct in the
> pic_timing() SEI, table D-1), and you have to get the field/frame rate
> from the VUI parameters.  Even worse: ffmpeg and mplayer disagree about
> the interpretation.
> I think mplayer's interpretation is that the vui_parameters have a
> frame rate if SPS.frame_mbs_only is true, and a field rate if
> SPS.frame_mbs_only is false.
> ffmpeg appears to put a field rate in the vui_parameters no matter what.
> This makes transport streams encoded by ffmpeg play out wrong in
> mplayer with high-speed video and total A/V sync failure.

Seems tricky... :-s

Since DASH provides a sidx box, I think I will get the (sub-)fragment
duration from it (subsegment_duration / timescale).

>  oh, and Flying Spaghetti Monster help you if there's an 'elst' box.

No elst box...

I didn't know Flying Spaghetti Monster, I think it's not very well
known outside America :-)
(or maybe I'm uncultured)

Best Regards,


More information about the vlc-devel mailing list