[FFmpeg-devel] About guess_correct_pts / AVFrame.best_effort_timestamp
Alexander Strange
astrange
Thu Feb 17 00:01:15 CET 2011
On Feb 16, 2011, at 11:28 AM, M?ns Rullg?rd wrote:
> Nicolas George <nicolas.george at normalesup.org> writes:
>
>> L'octidi 28 pluvi?se, an CCXIX, M?ns Rullg?rd a ?crit :
>>> ??? = frame.pkt_pts
>>
>> AV_NOPTS_VALUE if the input format is AVI. This is not acceptable. Please
>> try again.
>
> AVI doesn't have timestamps, so the first decoded frame has PTS 0, and
> the following ones increment it by 1/framerate. Simple.
All kinds of formats commonly believed to be CFR are not CFR.
This includes avi, which only has monotone times (= DTS) but also has dropped frames, which lavf very reasonably outputs as VFR.
I don't have a sample less than 300MB, but some can be generated by:
mencoder -ofps 120000:1001 -vf pullup -o out.avi <a mixed 30fps/24fps MPEG file>
or by asking any Japanese person for 120fps files.
It also won't work with, say, h264 ES, because PAFF means some of the output CFR frames use different numbers of packets. So the 1/framerate times need to be assigned after decoding... and this is the place to do it.
More information about the ffmpeg-devel
mailing list