T
T
Tonatos2018-05-08 13:03:27
VLC
Tonatos, 2018-05-08 13:03:27

How to teach to stream VLC audio in parallel with video with input-slave=alsa?

I'm trying to learn how to stream video and audio from a webcam using VLC on Ubuntu Server. For some reason, only the audio or only the video stream is streamed. I run this command and only audio is played at the output.

cvlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-standard=1 :input-slave=alsa:// ':sout=#transcode{vcodec=theo,vb=3500,width=1920,height=1080,acodec=vorbis,ab=192,channels=2,samplerate=44100}:http{mux=ogg,dst=:8080/webcam.ogg}'

In case I start without input-slave=alsa:// in this way:
cvlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-standard=1 :input-slave=alsa:// ':sout=#transcode{vcodec=theo,vb=3500,width=1920,height=1080,acodec=vorbis,ab=192,channels=2,samplerate=44100}:http{mux=ogg,dst=:8080/webcam.ogg}'

All that's left is the video.
In the event that the main and slave threads are swapped
cvlc alsa://hw:1,0 :input-slave=v4l2:///dev/video0 :sout="#transcode{vcodec=theo,vb=2000,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{dst=:8080/webcam.ogg}

Also gives only audio.
VLC version:
$ vlc --version
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
Версия VLC 2.2.7 Umbrella (2.2.2+git20170721+r59033+56~ubuntu16.04.1)

VLC log -vvv
How to merge audio and video?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question