[FFmpeg-devel] How is the total duration set in a fragmented MP4?
alx.sukhanov at gmail.com
Tue Jan 27 20:01:18 CET 2015
On Tue, Jan 27, 2015 at 8:43 AM, Gerard <ggarcia at deic.uab.cat> wrote:
> I'm having trouble determining how is set the total duration of a
> fragmented MP4. If mvhd, tkhd and mdhd boxes have the duration set to
> 0xffffffff how does the demuxer know how long is the stream?
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
if duration is not set in tkhd, mvhd, demuxer can guess duration using
bitrate and file size. If I recall correctly, this is what MPEG2-TS demuxer
does in ffmpeg.
I don't think that there is other way to find out duration without
processing entire stream.
More information about the ffmpeg-devel