[vlc-devel] [PATCH] demux: mp4: extract framerate from mp4 files with DASH encapsulation, using frame duration stored in elst 'i_media_time'
Emeric Grange
emeric.grange at gmail.com
Wed Oct 28 14:01:57 CET 2015
2015-10-07 11:46 GMT+02:00 Emeric Grange <emeric.grange at gmail.com>:
> 2015-10-06 17:54 GMT+02:00 Francois Cartegnie <fcvlcdev at free.fr>:
>> Le 06/10/2015 14:57, Emeric Grange a écrit :
>>
>>> + if( p_track->p_elst && p_track->BOXDATA(p_elst)->i_entry_count > 0 )
>>> + {
>>> + vlc_ureduce( pi_num, pi_den,
>>> + (uint64_t) BOXDATA(p_mdhd)->i_timescale,
>>> + (uint64_t) p_track->BOXDATA(p_elst)->i_media_time[p_track->i_elst],
>>> + UINT16_MAX );
>>
>> Well, changing my mind.
>> What does guarantee that timescale has always framerate relationship ?
>
> I don't really have any guarantee but the mp4 spec does state
> "media_time is an integer containing the starting time within the
> media of this edit segment (in media time scale units, in composition
> time)" so I guess media_time should always by relative to media
> timescale.
>
> Proper framerate should be in the DASH MPD I think. However when not
> in streaming situation, but only trying to play the actual mp4 files
> being streamed, this is a way to get the samples duration (and by the
> way these files comes from youtube).
>
> Emeric
Anything new about this patch?
Emeric
More information about the vlc-devel
mailing list