[FFmpeg-devel] commit b02493e47668e66757b72a7163476e590edfea3a force video timebase to be 0.1ms precisse at least.

Michael Niedermayer michaelni at gmx.at
Wed Feb 6 18:49:52 CET 2013


On Wed, Feb 06, 2013 at 12:20:22PM +0100, Robert Krüger wrote:
> On Tue, Feb 5, 2013 at 10:39 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Tue, Feb 05, 2013 at 01:30:39PM +0100, Robert Krüger wrote:
> >> Hi,
> >>
> >> the commit message was
> >>
> >>     The timebases before where only guranteed to be 1/fps precisse
> >>     and could cause AV sync errors on low fps
> >>
> >> Is there a track issue that is fixed by this? Would it be possible to
> >> explain how 1/fps as a timebase for the video track would cause AV
> >> sync errors?
> >
> > there was a bug, not sure where it was reported
> > the issue basically is that with a 1/25 timebase you can only
> > specify each frames timestamp in 1/25 second precission, so you
> > cannot avoid av sync errors on that scale if the actual true timestamps
> > fall in between the representable points
> >
> > one can argue about if 1/25 is good enough but consider a 1fps slide
> > show, there it does make a difference if everything is offset by
> > 0.5sec
> >
> 
> Thanks for taking the time to respond.
> 
> I may be wrong but I thought the timescale in the mdhd header was only
> for the track (the media timescale in Quicktime terminology) and if
> the video track only has a timescale of the frame rate (if it is an
> integer frame rate) was good enough for perfect av sync if the
> timescale for the audio track was precise enough for the audio track
> (e.g. sample rate), regardless of whether the video timescale is 1 for
> 1 FPS or 25 for 25 FPS. Of course this is different for the movie
> timescale (in the mvhd atom), which is used for edit lists which will
> cause av sync issues if it is chosen too small but in this case ist is
> the media timescale AFAICS (and the movie timescale seems to be
> hardcoded to 1000 which is probably good enough for all practical use
> cases). That was why I asked. I simply don't understand in which case
> the change can affect av sync for fixed integer frame rate content
> compared to setting the media timescale of the track to the frame
> rate.

A better solution is welcome if you know one, but when you add into
the "equation" that some major players do not support edit lists
it gets tricky to achive AV sync by shifting the audio.

Also if you consider 2 video streams, lets say 25fps and 30fps
instead of limiting yourself to 1 video stream things dontg get easier.
simply working with timebases that are finegrained enough seemed the
simplest solution to me but iam surely not unhappy if someone
implements a better solution

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

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130206/2e531882/attachment.asc>


More information about the ffmpeg-devel mailing list