[FFmpeg-devel] About guess_correct_pts / AVFrame.best_effort_timestamp

Michael Niedermayer michaelni
Wed Feb 16 20:11:59 CET 2011


On Wed, Feb 16, 2011 at 07:03:36PM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Wed, Feb 16, 2011 at 05:47:15PM +0000, M?ns Rullg?rd wrote:
> >> Martin Storsj? <martin at martin.st> writes:
> >> 
> >> > On Wed, 16 Feb 2011, 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?:
> >> >> >> AVI doesn't have timestamps, so the first decoded frame has PTS 0, and
> >> >> >> the following ones increment it by 1/framerate.  Simple.
> >> >> >
> >> >> > Are you saying that Mr X should put a special case in his code for AVI?
> >> >> 
> >> >> No, he should put a special case for no PTS on an input frame:
> >> >> 
> >> >> pts = frame.pkt_pts != AV_NOPTS_VALUE? frame.pkt_pts : prev_pts + 1/framerate;
> >> >> prev_pts = pts;
> >> >> 
> >> >> This code will always work.
> >> >
> >> > Wouldn't this break for VFR-streams? That is, shouldn't it prefer 
> >> > frame.pkt_dts over the calculated pts, if pkt_dts is present (and 
> >> > reliable, assuming that all guessing code is disabled).
> >> 
> >> A VFR stream obviously needs timestamps.
> >
> > tell that to the ISO-MPEG committee, mpeg-ps does not require timestamps on
> > each frame yet allows frames to be displayed for 2,3 and 4 field periods
> > effectively creating variable fps.
> 
> MPEG allows only a constant base rate, with any field repetitions
> explicitly indicated.  There is never any ambiguity.

theres no ambiguity but you have no timestamps for most frames
or you could say AVI has timestamps too

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20110216/765537a3/attachment.pgp>



More information about the ffmpeg-devel mailing list