Capturing from Pulse Audio

*nix specific usage questions
avi9526
Blank Cone
Blank Cone
Posts: 12
Joined: 05 Aug 2010 00:23

Capturing from Pulse Audio

Postby avi9526 » 09 Nov 2012 23:17

Hi
I want to use «VLC» for capturing audio from system sound output. I run «VLC» with command

Code: Select all

vlc pulse://
«VLC» trying to capture input called «Built-in Audio Analog Stereo», but this seems to be an output, and result with silence in captured sound. So I use program called «pavucontrol» to switch «VLC» input to «Monitor of Built-in Audio Analog Stereo», and «VLC» start capturing audio correctly. Is there any way to tell «VLC» to use this audio input when run it from command line? So it will be not necessary to change «Pulse Audio» setting…
Thanks!

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

Re: Capturing from Pulse Audio

Postby Rémi Denis-Courmont » 10 Nov 2012 13:46

VLC records the default source unless specified otherwise. In this case, that is probably the Line or Microphone input of your internal sound card.

You should specify the source name if you want a specific source. It's easier from the playlist audio capture category...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

avi9526
Blank Cone
Blank Cone
Posts: 12
Joined: 05 Aug 2010 00:23

Re: Capturing from Pulse Audio

Postby avi9526 » 10 Nov 2012 21:36

Hi, thanks for reply! Sorry for my bad english!

Hmm, no, I don't need capture audio from microphone, I need capture audio that play in my headphones (to make screencast, for example).
The problem is that when I open «VLC» GUI there is no option for capturing audio from my OS output. Category «Devices» — «Audio capture» don't have item for capturing audio signal that played by other programs. So I run «VLC» from command line with option to open «pulse audio» («vlc pulse://»), but it opens little wrong (silence, no sound captured). Thats why I need to use external program to switch «VLC» input. This is not a big deal. But I am just asking if there any way to specify more clearly what «VLC» should capture.
Maybe something like this?
cvlc pulse://"Monitor of Built-in Audio Analog Stereo"
I read a wiki, but it's doesn't say anything about using MRL «pulse://», so I go here for advice.
Here is a screenshot of what I need
Image
On the screenshot all ok, but when I just run VLC it's try to capture input called «Built-in Audio Analog Stereo» but I need it to capture input called «Monitor of Built-in Audio Analog Stereo». And I am asking how to force it from command line…

Thanks!

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

Re: Capturing from Pulse Audio

Postby Rémi Denis-Courmont » 10 Nov 2012 21:47

You need to use the name of the source then, e.g. "pulse://alsa_output.pci-0000_00_1b.0.analog-stereo.monitor".
Again, it's a LOT simpler with the playlist...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

avi9526
Blank Cone
Blank Cone
Posts: 12
Joined: 05 Aug 2010 00:23

Re: Capturing from Pulse Audio

Postby avi9526 » 11 Nov 2012 10:35

Thanks!
Your advice works for me.
If someone else will need same, there is the way how I find a proper device name for my system:

Code: Select all

pacmd list-sources | awk '/name:.+\.monitor/'
it gives me

Code: Select all

name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor> name: <alsa_output.usb-FORTEMEDIA_FM1083-00-FM1083.analog-mono.monitor> name: <alsa_output.pci-0000_00_14.2.analog-stereo.monitor>
I choose «alsa_output.pci-0000_00_14.2.analog-stereo.monitor»
so command to launch «VLC» looks like

Code: Select all

vlc pulse://alsa_output.pci-0000_00_14.2.analog-stereo.monitor
and it works for me…

Solved!


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 45 guests