Re: Re: Video4linux-list digest, Vol 1 #225 - 12 msgs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Ori Pessach wrote:
> 
> Congratulations!
> 
> It's not everyday that I read a technical description that causes me to cringe to
> the point of physical discomfort. I'm impressed.
> 
> Now, please don't take this personally, but this is simply the wrong thing to do.
> Dropping audio, or "padding" it is definitely going to be noticable. I heard
> off-by-one errors, resulting in just _one_ sample being set to zero, causing
> audible clicks on buffer boundaries. Think of what you're doing to the frequency
> spectrum, around the edges of the padding: basically, you're introducing a lot of
> high frequency noise at the point of transition. Dropping samples causes a
> discontinuity in the time domain, which translates to, again, high frequency noise
> in the frequency domain.
> 
> If you're looking for a quick and dirty approach, you're far better off dropping
> or repeating the occasional video frame, instead. I guess the absolutely correct,
> anal retentive thing to do would be to keep the video time line as the capture's
> main time line, and resample the audio to stretch or squeeze it, so it tracks the
> video. Not very easy to do without introducing some aliasing artifacts, but
> certainly possible in real time. The only tricky part is determining by how much
> to stretch.
> 
> On the flip side, this approach will, indeed, maintain perfect synchronization. I
> just feel that the tradeoff is unaaceptable.
> 
> Ori

Please don't knock it before trying it.

1) I don't pad with zeros - I said you duplicate the last byte.  Yes,
this still does introduce some distortion, but it is almost inaudible.
2) Dropping blocks does lead to clicks.  Fortunately, the clicks are
single sample, and are filtered out almost completely by the
reconstruction filter of the sound card.
3) Dropping/duping video frames is perceptually worse (at least from
what I have seen) than manipulating the audio. (You get regular jerks in
video playback, where by manipulating the audio you get regular
sub-perseptive audio distortions.)

Just try the technique, and listen to the results - I am sure you will
be pleasantly surprised (Oh yes - don't listen to the results with
qtplay - it sucks).

And by the way, all my high  quality capture applications use
post-filtering+stretching to match the streams.  This technique is only
supposed to be use for vcr-like applications, where it is more important
to get a once-off recording, than absolute quality (in which case you
wouldn't be using streamer anyway).

-justin





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux