[FFmpeg-devel] About guess_correct_pts / AVFrame.best_effort_timestamp
Fri Feb 18 01:58:41 CET 2011
On Wed, Feb 16, 2011 at 6:23 PM, Alexander Strange
<astrange at ithinksw.com> wrote:
> On Feb 16, 2011, at 6:01 PM, Alexander Strange wrote:
>> 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.
> Note about this part: they could still be assigned before decoding, if the AVParser can combine the packets into one-packet-per-frame. But in practice, we have a lot of unimplemented AVParser functionality (I don't remember the details here), and it would make decoding slightly slower due to more memcpy.
?also, -mt is 2-3x slower with combined field samples. We can decode
each field in separate threads, but if they've been stuck into the
same packet it would need more code at the opposite end to split them.
I can promise nobody will ever implement this.
More information about the ffmpeg-devel