LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-19-2021, 01:57 PM   #1
MirceaKitsune
Member
 
Registered: May 2009
Distribution: Manjaro
Posts: 156

Rep: Reputation: 1
Trying to stream webcam with VLC, video works but no audio


I created a bash script a while back to stream my webcam to http with VLC. The line I used was:

Code:
cvlc -vvv v4l2:///dev/video0 input_stream --sout '#transcode{vcodec=MJPG,vb=0,scale=1,acodec=none}:standard{access=http,mux=mpjpeg,dst=:1234}'
That works fine but no audio. I've been trying to update it to capture sound from the webcam as well, but nothing I do seems to get that working. I know the ALSA address of the mic which is "hw:2,0" and using the arecord command as a test confirms it works, it's just vlc that isn't capturing or streaming accordingly. Here's the latest command I managed to work out, video is functional but no audio:

Code:
cvlc -vvv v4l2:///dev/video0 alsa://hw:2,0 --live-caching=5000 --sout '#transcode{vcodec=h264,vb=1024,acodec=mpga,ab=128,samplerate=44100,channels=2}:standard{access=http,mux=ffmpeg{mux=flv},dst=:1234}'
What is wrong with it and how do you recommend improving this? Thanks.
 
Old 08-19-2021, 05:39 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
So many cameras we can't guess yet.
See if you can get vlc to just output audio. https://wiki.videolan.org/Documentation:Modules/v4l2/
https://medium.com/@petehouston/use-...s-17cf839b72d0
 
  


Reply

Tags
ffmpeg, video streaming, vlc



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
video works on vlc if opened in brower but does not works if opened in file manager DRAGSTER_TUNER Linux - Desktop 17 11-05-2018 04:34 AM
ffmpeg mixing audio/video - trying to end vid after video stream completes joejoe99 Linux - Software 2 06-21-2012 11:44 PM
[SOLVED] how to stream a webcam to http with VLC ? golden_boy615 Linux - General 2 02-15-2012 07:54 AM
how to get vlc-0.9.0_beta3 to save webcam stream to file jimerickso Linux - Software 0 08-22-2008 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration