On 4/25/2019 3:40 PM, Moritz Barsnick wrote:
The length of a video as indicated in its header and its actual length
can differ. There's nothing much you can do about this, except to demux
/ decode a file to its end to check for the actual timestamps (and
possible discontinuities).

Yep. If you want an actual accurate run time (length), you pretty much have to demux/decode the entire file- some file formats support a changing frame rate, there are variable-rate encodings, and there's the dread 3:2 pulldown flag to account for. Don't even trust the first frame rate * the frame count :(. (I've been bitten by all of them.)

About the only time you might trust the header's run time is on well-encoded files from a trusted source.

z!
_______________________________________________
ffmpeg-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to