[FFmpeg-devel] [PATCH] ALSA for libavdevice

Reimar Döffinger Reimar.Doeffinger
Mon Dec 15 10:09:47 CET 2008


On Mon, Dec 15, 2008 at 12:05:31AM +0100, Nicolas George wrote:
> The timestamps from ALSA come in the form seconds+nanoseconds, not in
> samples, and as far as I could see in the kernel driver part, they are in
> that format from the very start, so I am afraid that converting to
> samplerate*128 is more likely to accumulate conversion errors than correct
> them.

Hm. The problem I see with that is that you have a sample rate, and you
can count the number of samples. This gives you a time.
As you say it, there is also another time.
What happens when those times diverge? If it is based on some real-time
clock they can easily diverge by 10 - 20 %, with regular "resets" (the
timing base frequencies of both PCs and soundcards can be truly bad).
If this divergence ends up in the encoded file, is it certain that most
(all?) players can interpret/handle it right?

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list