VLC 1.0.0/1.0.1 V4L2 + ALSA capture, xcode and stream prob.

About encoding, codec settings, muxers and filter usage
krakorar
New Cone
New Cone
Posts: 2
Joined: 18 Aug 2009 14:43

VLC 1.0.0/1.0.1 V4L2 + ALSA capture, xcode and stream prob.

Postby krakorar » 18 Aug 2009 15:02

Hello,

I am surprised that I can no longer capture video from a v4l2 device and an alsa device simultaneously (video from webcam and audio from mic), transcode them and send them out via RTP with VLC 1.0.0->1.0.1. Instead of the v4l2-adev directive there is now a slave-input directive that does not appear to direct captured alsa input to the sout module like v4l2-adev did for previous versions of vlc. I can capture and transcode video and audio independently, but not together. Here is the command line that I am trying to invoke under vlc 1.0.1:

vlc -I dummy -V dummy --verbose=3 --dscp=0x01 v4l2:///dev/video1 :width=720 :height=480 :standard=0 :input-slave:alsa="hw:0,0" --sout '#transcode{vcodec=mp4v,vb=6000,fps=30,scale=1,acodec=mpga,ab=32,channels=2}:duplicate{dst=rtp{mux=ts,sdp=rtsp://192.168.1.178:16200/camera.sdp}' vlc://quit

...the result is a video only RTP encapsulated MPEG2 transport stream. What am I doing wrong??? Thanks in advance.

Rob Krakora

Papageno
New Cone
New Cone
Posts: 8
Joined: 02 Jan 2010 16:00

Re: VLC 1.0.0/1.0.1 V4L2 + ALSA capture, xcode and stream prob.

Postby Papageno » 03 Jan 2010 16:02

Hi Krakorar,

I've a similar problem. I am using a webcam with mircophone and I can't stream the audio. What was your solution. Please can you post it.
My recorddevices:

Code: Select all

$ arecord -l ---]Karte 1: U0x46d0x9a1 [USB Device 0x46d:0x9a1], Gerät 0: USB Audio [USB Audio] Untergeordnete Geräte: 1/1 Untergeordnetes Gerät '0: subdevice #0 ...
My streaming-script:

Code: Select all

cvlc v4l2:///dev/video0:input-slave=alsa// :sout="#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=udp,mux=ts{ttl=12},dst=239.155.1.1:1234},dst=display}"
Thanks.

dj3c1t
New Cone
New Cone
Posts: 1
Joined: 22 Feb 2010 13:38

Re: VLC 1.0.0/1.0.1 V4L2 + ALSA capture, xcode and stream prob.

Postby dj3c1t » 22 Feb 2010 13:44

Hello,

Same problem here with VLC 1.0.2 on Ubuntu 9.10

this one plays line-in ok :

Code: Select all

vlc alsa://hw:0,0
this one plays webcam ok :

Code: Select all

vlc v4l2://
but this one only shows video without sound :

Code: Select all

vlc v4l2://:input-slave="alsa://hw:0,0"
did someone find a solution ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15229
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC 1.0.0/1.0.1 V4L2 + ALSA capture, xcode and stream prob.

Postby Rémi Denis-Courmont » 24 Feb 2010 17:50

Code: Select all

vlc v4l2:// :input-slave="alsa://hw:0,0"
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Papageno
New Cone
New Cone
Posts: 8
Joined: 02 Jan 2010 16:00

Re: VLC 1.0.0/1.0.1 V4L2 + ALSA capture, xcode and stream prob.

Postby Papageno » 24 Feb 2010 22:27

:D Thanks a lot. The endless searching and trial/error is ended.

Here is my skript for a Video conversation directly to a specified computer (192.168.2.20). It needs only to play a network stream using rtp://:5004.

Code: Select all

cvlc v4l2:///dev/video1 :input-slave="alsa://hw:3,0" :sout="#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:duplicate{dst=rtp{mux=ts{ttl=12},dst=192.168.1.20},dst=display}"
If you use this, don't forget to set v4l2:///dev/video1 and :input-slave="alsa://hw:3,0" to your device. And of course the IP of the receiver.

Live could be so easy (if you know the syntax for it :lol: )

Kind Regards
Hans


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 25 guests