[FFmpeg-devel] About guess_correct_pts / AVFrame.best_effort_timestamp

Måns Rullgård mans
Wed Feb 16 17:24:50 CET 2011

Nicolas George <nicolas.george at normalesup.org> writes:

> L'octidi 28 pluvi?se, an CCXIX, M?ns Rullg?rd a ?crit?:
>> MKV does provide PTS for every frame, yet the conversion above changed
>> them.  If that is not an error, I don't know what is.
> Even if it is indeed an error (which I do not agree: the output time base is
> better than the input), it is not an error caused by the patch we are
> discussing, so stop bringing it up.

Please refer to Ronald's explanation.

>> There are no subtleties.  Correct timestamp handling is trivial if one
>> assumes the container-provided ones are correct by default.
> Please show me: Mr X is writing a trivial video player. His code has just
> called avcodec_decode_video2:
> 	avcodec_decode_video2(..., &frame, ...);
> 	if (error || !got_frame) continue;
> 	frame_pts = ???;
> 	usleep(frame_pts - now);
> 	display_frame(frame);
> Please show me what should go instead of "???" to work with any correct file
> with most supported containers.

??? = frame.pkt_pts

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list