11

I'm trying to capture microphone input in VLC media player via the http interface and stream this but so far I have arrived at nothing. Is this actually possible?

Dark Star1
  • 6,986
  • 16
  • 73
  • 121
  • 2
    which platform? I'm mac so i know for sure this is possible with VLC 2.0 for the other platforms this should work as well. haven't tested those commands though. Mac: Use VLC 2.0.0 or later and utilize the qtsound module: vlc -vvv qtsound:// Win: Use sth like: vlc dshow:// :dshow-vdev="None" :dshow-adev="Your Audio Device" Linux: Use sth like: vlc alsa://plughw:0,0 – Mike F May 10 '12 at 08:19
  • Thanks very much. Might give this ago later as I've abandoned the project for now. – Dark Star1 May 10 '12 at 08:22
  • @MichaelF.Could you put your response down as an answer so I can accept it? Cheers – Dark Star1 Sep 04 '12 at 16:53

3 Answers3

15

Which platform? I'm on Mac so i know for sure this is possible with VLC 2.0 for the other platforms this should work as well.

Haven't tested those commands though.

Mac: Use VLC 2.0.0 or later and utilize the qtsound module:

vlc -vvv qtsound:// 

Win: Use sth like:

vlc dshow:// :dshow-vdev="None" :dshow-adev="Your Audio Device" 

Linux: Use sth like:

vlc alsa://plughw:0,0
Mike F
  • 1,224
  • 4
  • 26
  • 44
9

On Linux if you need to stream also video remember to separate all the options with ":" . In this case I am streaming the usb cam with the default alsa microphone.

cvlc v4l2:///dev/video0 :v4l2-standard=ALL :input-slave=alsa://hw:0,0 :live-caching=300  ':sout=#transcode{vcodec=mp4v,vb=3500,width=1920,height=1080,acodec=mp3,ab=192,channels=2,samplerate=44100}:http{mux=ts,dst=:8080/}'
Zioalex
  • 3,441
  • 2
  • 33
  • 30
1

Just my input on Linux. This works across the Internet as well

Get the mic device id

arecord -l

Streams to port 8080. Just remember on your router to put a port forward to this server

vlc alsa://plughw:1,0 --sout='#transcode{vcodec=none,acodec=mp3,ab=256,channels=2,samplerate=44100,scodec=none}:http{mux=mp3,dst=:8080/}' --no-sout-all --sout-keep
ahoffer
  • 6,347
  • 4
  • 39
  • 68
zeroprobe
  • 580
  • 1
  • 8
  • 19
  • This works if I download the file in Safari, but in VLC it's just complete silence (no errors either). How can I play the stream in VLC as a client? – hawk Aug 02 '23 at 08:42