[Ffmpeg-devel] Re: [Ffmpeg-user] ffmpeg encoding, really slowvideo when recording with audio
Erik Slagter
erik
Fri Feb 3 15:19:49 CET 2006
On Fri, 2006-02-03 at 14:42 +0100, Michael Niedermayer wrote:
> > I am curious how it long it will take before the first "bug" reports
> > come in on Cynergy cards. These have a bad crystal that make audio and
> > video go out of sync :-( Workaround is in the driver, but has to be
> > enabled and tuned by the user.
>
> ffmpeg does contain code to compensate samplerate drift, dunno if its
> used for capturing audio+video though and obviously it depends upon
> correct timestamps, if the timestamps are calculated by
> sample_number/sample_rate it wont work
Just to make sure we're on the same track here:
The saa7134 (on which the cinergy cards are based) delivers both video
and audio, the latter one via it's own, more or less oss compatible
interface. If everything is alright, it will try and succeed in keeping
audio and video in sync; it is able to vary the samplerate of the audio
slightly to compensate for drifts, which works very nicely. But if the
crystal is wrong, it doesn't work. Luckily there is a register where you
can program the actual crystal frequency (instead of the supposed value)
and that is what the driver does, with the appropriate parameters. If
you manage to get the value right, everything works _perfectly_ no sync
drift whatsoever, even without any special treatment from the
application.
So IMHO it's better to get the source of the problem right than to try
to fix the symptoms.
I only said this so you were warned and could propose the right fix.
BTW it's a shame oss does not feature timestamps on audio frames, like
v4l2 does on video frames.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2771 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060203/5011e97b/attachment.bin>
More information about the ffmpeg-devel
mailing list