V4L2 and ALSA capture do not synch
On !Ubuntu/Kubuntu 10.04 to 11.04 (versions I have tried), audio capture is broken with Pulse.
The following command line results in choppy audio being captured. Not only that, but looking at the "Recording" tab in the pavucontrol the entry for VLC keeps appearing/disappearing/flickering. No other audio capture application I have shows these symptoms when used with pulse.
vlc --input-slave alsa://pulse v4l2:// :v4l2-dev=/dev/video0 :v4l2-samplerate=48000 :v4l2-standard=0 :v4l2-width=720 :v4l2-height=576 :v4l2-input=1 :v4l2-audio-input=0 :v4l2-io=0 :v4l2-controls-reset :v4l2-autogain=1
As a work-around I can use the padsp utility and capture from OSS...
padsp vlc --input-slave oss:///dev/dsp v4l2:// :v4l2-dev=/dev/video0 :v4l2-samplerate=48000 :v4l2-standard=0 :v4l2-width=720 :v4l2-height=576 :v4l2-input=1 :v4l2-audio-input=0 :v4l2-io=0 :v4l2-controls-reset :v4l2-autogain=1
This only works when the pavucontrol application is also running. If I close pavucontrol then the sound becomes broken and choppy again. Also, out of two machines, a quad-xenon and a quad-i5, it only works on the older quad-xenon. The i5 machine still has some breaks in the audio even with padsp and the pavucontrol app running.
I have tried all combinations of sample rate e.g. 44100 vs 48000 and input device e.g. alsa://default alsa://hw0,0 etc. with no improvement in result.