[vlc] VLC + V4L = Audio Skipping Issue (Workaround)

videolan at topquark.net videolan at topquark.net
Tue Jan 20 23:11:17 CET 2004


I recently installed vlc 0.7.0, and I've been having issues with skipping
audio when using the v4l module.  VLC seems to work perfectly fine with
any files or access modules except v4l.  v4l video seems to work fine, but
using the example command lines from the VideoLAN HOWTO, the audio is
really choppy, and I got lots of messages like this:
[00000180] main audio output warning: computed PTS is out of range (2065),
clearing out
[00000180] main audio output warning: timing screwed, stopping resampling
[00000180] main audio output warning: output PTS is out of range (2689),
clearing out
[00000180] main audio output warning: input PTS is out of range (2398),
trashing
[00000180] main audio output warning: buffer is 266336 in advance,
triggering downsampling
[00000180] main audio output warning: input PTS is out of range (13866),
trashing
[00000180] main audio output warning: input PTS is out of range (2577),
trashing
[00000180] alsa audio output warning: recovered from buffer underrun
... you get the idea ...
This happens whether or not I am trying to stream the video.

It turns out that lowering the sample rate or switching from stereo to
mono seems to fix the problem for me.  Browsing around on google, it looks
like I'm not the only one having issues like this, and it doesn't seem
that anyone is aware that playing with the sample rate fixes it.  In
addition, the HOWTO doesn't mention the nifty 'samplerate=' or 'mono'
options to the v4l module, and I actually can't seem to find any
documentation anywhere which mentions it (you have to read the source to
find it).  So, some people out there might find it helpful if the HOWTO is
updated to mention those options, and maybe mention that playing with them
is a potential solution to audio skipping problems with v4l.

Of course, this isn't really so much of a solution as a workaround.  But
a workaround is better than nothing (and, actually, this is perfectly fine
by me, since my capture card is mono anyway).

As far as a real solution goes, I am currently using the OSS compatibility
drivers for ALSA in kernel 2.6.1.  And other programs on my machine are
able to record from the sound card via the OSS compatibility drivers at
88200/16/stereo with no problem.  So this must be something specific to to
vlc.  I would guess that at some point along the chain, the program isn't
reading the data fast enough (maybe it is assumed that the data will be
compressed, so there is actually a lot more data than expected?).  I've
spent about 6 hours hacking around in the code, but I haven't found
anything, and I don't really care to try anymore - atleast until I hear
from someone more familiar with the code.  Feel free to email me if you
want more info, I'll do my best to help anyone track down this problem if
they're interested in finding a real solution to the issue.  Otherwise,
I'll just stick to my mono audio and hope that switching to mono helps
some other people out there with similar problems.

-Paul Donohue

-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc mailing list