On Wed, Feb 26, 2014 at 1:21 PM, YIRAN LI <[email protected]> wrote: > Hi, > > Can anyone help to explain which duration is more accurate. > > 1. duration from the avstream object > 2. read out all packets from that avstream, find the max pts.
3. read out all packets from that avstream and add all durations in most cases (I do not remember where there were cases when duration was not reliable but I think there were some) The reliability of 1 differs a lot with the formats and for some even with the properties of individual files. For some it is normally exact and for others it is just an estimate which can be completely wrong. Solution #2 may fail if you have timestamp discontinuities like e.g. in transport streams IIRC. _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
