Page 1 of 1

Setup option for sound input with VLM

Posted: 04 Jan 2011 17:02
by peladobonansea
Hello, Im having troubles to capture sound using this configuration.

new cn3 broadcast enabled
#Video device
setup cn3 input v4l2:///dev/video0

#Video device input
setup cn3 option v4l2-input=1

#Audio device
setup cn3 option oss-audio-device=/dev/oss/oss_hdaudio0/pcmin1

#Transcoding options
setup cn3 output #transcode:rtp
setup cn3 option sout-transcode-vcodec=h264
setup cn3 option sout-transcode-vb=1500
setup cn3 option sout-transcode-scale=1
setup cn3 option sout-transcode-deinterlace
setup cn3 option sout-transcode-fps=25
#Audio transcoding options
setup cn3 option sout-transcode-acodec=mp3
setup cn3 option sout-transcode-ab=128
setup cn3 option sout-transcode-channels=2
#Streaming method
setup cn3 option sout-rtp-dst=200.50.160.187
setup cn3 option sout-rtp-port=5554
setup cn3 option sout-rtp-sdp=rtsp://200.50.160.187:5554/canal3.sdp

With this setup video works great with no sound. Using vlc to connect, and no Audio is received

root@videoserver:/home/sop# fuser -vu /dev/video0
USER PID ACCESS COMMAND
/dev/video0: root 2909 F...m (root)vlc

root@videoserver:/home/sop# fuser -vu /dev/oss/oss_hdaudio0/pcmin1
The sound device is not used as the video device.

Watching the vlc logs, no error related to oss or the device is found

Maybe this line is wrong about the vlm parameter for oss audio device: setup cn3 option oss-audio-device=/dev/oss/oss_hdaudio0/pcmin1 (also tryed with pcmin0)
It would be nice if someone can help me with this.

best regards

Re: Setup option for sound input with VLM

Posted: 04 Jan 2011 21:51
by Rémi Denis-Courmont
V4L2 does not provide any audio. That's normal behaviour. You need to set a slave input if you want audio.

Re: Setup option for sound input with VLM

Posted: 06 Jan 2011 14:30
by peladobonansea
Thanks Remi, I make it work in command line, but its better for my setup to have a configuration file to run vlc as a service. Im trying different options, this one doesnt throws an error but neither have audio.
setup cn3 input v4l2:///:input-slave="alsa://hw:0,0"

I also tried this one with no success
setup cn3 input v4l2:///dev/video0 --input-slave="alsa://hw:0,0"

If you can help me I´ll be very glad

Re: Setup option for sound input with VLM

Posted: 19 Jan 2011 15:06
by jvdstoel
Hello,
This is a major bug in Ubuntu (I guess), not in VLC. See my posting about the same topic today.
Johan