Resource icon

OBS Studio Include/Exclude audio sources using PulseAudio(Linux)


New Member
Xandaros submitted a new resource:

Include/Exclude audio sources using PulseAudio(Linux) - Basically Virtual Audio Cable for Linux

Sometimes you want to stream the audio of one application, but not the other. Here is how to do that on Linux using PulseAudio:

First of all, you are probably going to need pavucontrol as a nice user interface to PulseAudio. If you are able to use pactl for everything, you can probably do that, too.
On Arch Linux and Ubuntu the package is simply called "pavucontrol".

Next, you need to figure out the internal name of your standard output device. Open up pavucontrol and select "Output Devices"...

Read more about this resource...


New Member
The combine sink step: "pactl load-module module-combine-sink slaves=<number>,<name>" may result in an error, and a failure to initialise.

I believe this is due to the way in which pulseaudio references. Instead of <number>, <name> where <number> was the number provided on sink creation, it should be thus:

"pactl load-module module-combine-sink slaves=<number1>,<number2>"

Where <number1> and <number2> are the numbers provided when 'pactl list short sinks' is ran.

In my instance, this was 'pactl load-module module-combine-sink slaves=0,2', as 0 was my headset, and 2 was the newly created null sink. ( You will have to run 'pactl list short sinks' prior to running combine-sink to see what number your null sink was assigned ).

Hope this helps others who are having difficulty.


New Member
Still relevant in year 2020. I will however leave a codeblock for myself to be able to copy paste later on.
module_name=$(pactl list short sinks | grep alsa_output.pci | awk '{print $2}')
pactl load-module module-null-sink
null_sink_no=$(pactl list short sinks | grep null | awk '{print $1}')
pactl load-module module-combine-sink slaves="$null_sink_no,$module_name"
echo "This only works if you have 1 sound card and no null sinks already"