[FFmpeg-devel] About guess_correct_pts / AVFrame.best_effort_timestamp

Ronald S. Bultje rsbultje
Wed Feb 16 17:20:31 CET 2011


Hi,

2011/2/16 M?ns Rullg?rd <mans at mansr.com>:
> Jean-Daniel Dupas <devlists at shadowlab.org> writes:
>> Le 16 f?vr. 2011 ? 16:40, M?ns Rullg?rd a ?crit :
>>> Nicolas George <nicolas.george at normalesup.org> writes:
>>>> L'octidi 28 pluvi?se, an CCXIX, Luca Barbato a ?crit :
>>>>> Transcoding results in a foo.mp4 with the correct timing? (shouldn't)
>>>>
>>>> With:
>>>>
>>>> ./ffmpeg -i hellsing-h264-blocking.mkv t.mp4
>>>>
>>>> I get:
>>>>
>>>> pts_time=0.000000 ?dts_time=0.000000 ? ? ? ?(time_base = 1/24000)
>>>> pts_time=0.041708 ?dts_time=0.041708
>>>> pts_time=0.083417 ?dts_time=0.083417
>>>> pts_time=0.125125 ?dts_time=0.125125
>>>> pts_time=0.166833 ?dts_time=0.166833
>>>> pts_time=0.208542 ?dts_time=0.208542
>>>> pts_time=0.250250 ?dts_time=0.250250
>>>> pts_time=0.291958 ?dts_time=0.291958
>>>> pts_time=0.333667 ?dts_time=0.333667
>>>> pts_time=0.375375 ?dts_time=0.375375
>>>>
>>>> while the original had:
>>>>
>>>> pts_time=0.000000 ?dts_time=0.000000 ? ? ? ?(time_base = 1/1000)
>>>> pts_time=0.042000 ?dts_time=N/A
>>>> pts_time=0.084000 ?dts_time=0.084000
>>>> pts_time=0.125000 ?dts_time=0.125000
>>>> pts_time=0.167000 ?dts_time=0.167000
>>>> pts_time=0.209000 ?dts_time=0.042000
>>>> pts_time=0.251000 ?dts_time=0.209000
>>>> pts_time=0.292000 ?dts_time=0.251000
>>>> pts_time=0.334000 ?dts_time=0.334000
>>>> pts_time=0.376000 ?dts_time=0.292000
>>>>
>>>> I think these timestamps are completely valid.
>>>
>>> How did you obtain those timestamps? ?Whatever the answer, they are
>>> different from the original. ?They should not be.
>
> Altering the time base is an error too.

Just to reiterate what I just said on IRC: mkv has no dts field.
Whatever mechanism in whatever part of ffmpeg made up the dts above,
failed miserably and should be fixed instead. Adding a workaround is
unacceptable.

My guess is av_read_frame() made them up and failed. Your patch should fix that.

Ronald



More information about the ffmpeg-devel mailing list