[FFmpeg-devel] About guess_correct_pts / AVFrame.best_effort_timestamp

Michael Niedermayer michaelni
Thu Feb 17 02:12:22 CET 2011

On Wed, Feb 16, 2011 at 06:23:37PM -0500, Alexander Strange 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.

h264 allows Frame Field Frame, that is unpaired fields if i understand the
spec correctly. so combining 2 into one packet is not guranteed to be possible.
Merging them in the parser also leads to the problem that timestamps can be
associated with the second field, and in the extreem no timestamps on any first

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110217/c73673f2/attachment.pgp>

More information about the ffmpeg-devel mailing list