No audio when streaming using cvlc under debian squeeze
Posted: 16 Jul 2010 01:36
Hi
For two or three days I've been trying to get VLC streaming working using a webcam as input (/dev/video0) and a line-in as input (/dev/dsp0) or as an ALSA input.
Initially I was using the Debian etch vlc, but hit many issues with the lack of codecs supported, especially with no mp3lame support.
So, built a squeeze box from scratch, and have done the following:
Installed ALSA, configured using alsamixer, made the various dev's using snddevices. Checked that I get the input (my cellphone at the moment playing mp3s) coming out of the speaker socket on the sound card. All seems good.
I followed a few guides for getting ffmpeg and vlc compiled from scratch. In the end I checked ffmpeg out from the svn and compiled with:
Grabbed the latest VLC - wget http://sourceforge.net/projects/vlc/fil ... 2/download
Installed using:
I basically have no issues getting video working when using mms as my output. A command line similar to this works fine:
But I have no audio at all, just silence. When running the above command I think a key part of the output from vlc is:
I started to suspect something was wrong with my input so I recorded some sound using:
That works fine.
I suspected video was interfering with audio, so tried with no video at all:
No go - just silence.
I then wanted to get rid of the streaming part of things so tried something along these lines:
That made an mp4 file with silence as the audio.
So, my biggest hunch is that vlc is only hearing silence in terms of its audio input. This seemed to also be the case when I was not using the alsa input method of vlc and instead refering to the /dev/dsp0 itself. I think my command line for this was something along the lines of:
Can anyone help with this, or suggest anything? I can include the full output of what happens when vlc starts, but basically it happily opens either the alsa hw0,0 or the /dev/dsp0 device depending on what method I am using. I'm pretty experienced with linux, but have virtually no experience with streaming or codecs.
Does anyone maybe have a command line already that does what I'm trying to do. Basically, take a video source, an audio source (either from a dsp or preferably from ALSA) and stream it? I don't really mind if I use mms, or some http method, but I would like the total bandwidth to be less than 1mbit. Ideally something more like 384 kbit with 256 for vid and 128 for audio. Does that seem reasonable?
I don't currently have X installed but can install it if required for testing.
Cheers
Dave
For two or three days I've been trying to get VLC streaming working using a webcam as input (/dev/video0) and a line-in as input (/dev/dsp0) or as an ALSA input.
Initially I was using the Debian etch vlc, but hit many issues with the lack of codecs supported, especially with no mp3lame support.
So, built a squeeze box from scratch, and have done the following:
Installed ALSA, configured using alsamixer, made the various dev's using snddevices. Checked that I get the input (my cellphone at the moment playing mp3s) coming out of the speaker socket on the sound card. All seems good.
I followed a few guides for getting ffmpeg and vlc compiled from scratch. In the end I checked ffmpeg out from the svn and compiled with:
Code: Select all
./configure --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-shared --enable-nonfree --enable-libvorbis --enable-libgsm --enable-libspeex --enable-libschroedinger --enable-libdirac --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libopenjpeg --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-gpl --enable-libgsm --enable-libmp3lame
make
make install
Installed using:
Code: Select all
./configure --enable-merge-ffmpeg --enable-v4l --enable-dshow --enable-sout --disable-skins2 --enable-twolame --disable-xcb --disable-nls --disable-mozilla --disable-live555
make
make install
Code: Select all
cvlc 'v4l:///dev/video0:width=640:height=480' :input-slave=alsa://hw:0,0 --sout "#transcode{vcodec=WMV1,acodec=mp3,vb=1024,ab=512}:std{access=mmsh,mux=asfh,dst=:8080}" -vv
Code: Select all
[0x9633fe4] main input debug: adding slave input 'alsa://hw:0,0'
[0x9633fe4] main input debug: `alsa://hw:0,0' gives access `alsa' demux `' path `hw:0,0'
[0x9633fe4] main input debug: creating demux: access='alsa' demux='' path='hw:0,0'
[0x96354c4] main demux debug: looking for access_demux module: 1 candidate
[0x96354c4] access_alsa demux debug: opening device 'hw:0,0'
[0x96354c4] access_alsa demux debug: 'hw:0,0' is an audio device
[0x96354c4] access_alsa demux debug: opened adev=`hw:0,0' stereo 48000Hz
[0x96354c4] access_alsa demux debug: new audio es 2 channels 48000Hz
[0x96354c4] main demux debug: using access_demux module "access_alsa"
[0x96354c4] main demux debug: TIMER module_need() : 6.715 ms - Total 6.715 ms / 1 intvls (Avg 6.715 ms)
Code: Select all
arecord -r 48000 -c 1 -t wav foobar.wav
I suspected video was interfering with audio, so tried with no video at all:
Code: Select all
cvlc alsa://hw:0,0 --sout "#transcode{vcodec=WMV1,acodec=mp3,vb=1024,ab=512}:std{access=mmsh,mux=asfh,dst=:8080}" -vv
I then wanted to get rid of the streaming part of things so tried something along these lines:
Code: Select all
cvlc alsa://hw:0,0 --sout "#transcode{vcodec=mp4v,acodec=mp4a,vb=1024,ab=128}:std{access=file,mux=mp4,dst=test.mp4}" -vv
So, my biggest hunch is that vlc is only hearing silence in terms of its audio input. This seemed to also be the case when I was not using the alsa input method of vlc and instead refering to the /dev/dsp0 itself. I think my command line for this was something along the lines of:
Code: Select all
cvlc v4l:///dev/video0:adev=/dev/dsp0:audio=0 --sout "#transcode{vcodec=WMV1,acodec=mp3,vb=1024,ab=512}:std{access=mmsh,mux=asfh,dst=:8080}" -vv
Does anyone maybe have a command line already that does what I'm trying to do. Basically, take a video source, an audio source (either from a dsp or preferably from ALSA) and stream it? I don't really mind if I use mms, or some http method, but I would like the total bandwidth to be less than 1mbit. Ideally something more like 384 kbit with 256 for vid and 128 for audio. Does that seem reasonable?
I don't currently have X installed but can install it if required for testing.
Cheers
Dave