Open Broadcaster Software/Advanced selective audio management with PulseAudio

This is your advanced selective audio management with Open Broadcaster Software and PulseAudio.

This guide is useful if you want to reproduce a professional selective audio management with just a computer and without the need of any professional hardware mixer.

With this solution you avoid extraneous audio sources from being broadcasted or recorded by OBS and you will have a large margin of management about what goes online and what you hear in the headphones ecc.

About
Is most GNU/Linux distributions (Debian, Ubuntu, ecc.) the default audio daemon is called PulseAudio.

PulseAudio has some professional features to create fake audio containers - called "sinks". With these sinks you can pipe the audio output of a single application to the input of Open Broadcaster Software and so on.

For example, with PulseAudio, you can redirect the audio of a browser tab into a "sink". Then, OBS can take as audio input that specific "sink". In this way OBS does not send on air the entire audio of your desktop.

If you want to learn everything about PulseAudio, this is for you:


 * https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/

This guide is somehow advanced. If you want a quick start guide instead, check the quick start with Open Broadcaster Software.

Use cases

 * selective audio management

Features

 * not being forced to silence everything else to avoid any interference

Disadvantages

 * you have to open your command line

Requirements

 * 30 minutes
 * Debian
 * Debian 10 buster is OK
 * Ubuntu
 * Ubuntu 20.04 LTS is OK
 * any other GNU/Linux distribution with PulseAudio
 * any other GNU/Linux distribution with PulseAudio
 * any other GNU/Linux distribution with PulseAudio

Step 1: configure Open Broadcaster Software
This guide is for OBS 25 (2021). Please update if it will be needed.


 * 1) Open Open Broadcaster Software
 * 2) Plug headphones
 * 3) File > Settings > Audio > Disable everything
 * Tip: you don't want to send OnAir any audio as default
 * 1) first scene "Welcome"
 * 2) Image: pick a start splash image
 * 3) Media source: weird jingle (in loop)
 * 4) Text: write something like "Welcome, starts at ...."
 * 5) second scene "OnAir" (← !)
 * 6) window capture on BigBlueButton
 * 7) audio input capture
 * 8) third scene "Pause"
 * 9) Image: pick a splash image
 * 10) Media source: another weird jingle (in loop)
 * 11) Text: write something like "Welcome, starts at ...."
 * 12) fourth scene "Final"
 * 13) Image: pick a splash image
 * 14) Media source: another weird jingle (in loop)
 * 15) Text: write something like "Thank you! That was really long but I'm still alive dehydrated and tired! Now let's go out to see the sunlight! asd"
 * 16) Edit > Advanced Audio Properties
 * 17) Test each scene
 * 18) if you do not ear something in your headphones, select "Monitor and output" on that element
 * Enable for "Media"
 * 1) if you do not want to ear something in your headphones, select "Monitor off"
 * Eventually disable for "Monitor output"

That's all!

Step 2: configure PulseAudio
On you GNU/Linux operating system, open your "Terminal emulator" and paste this long text and press enter:

pactl load-module module-null-sink sink_name=BrowsersOut
 * 1) Create a NULL sink
 * 2) Note: this can be used to capture browser's output
 * 3) Note: this creates also an internal 'BrowserOut.monitor' for its output
 * 4) Note: as default you cannot listen to it (you need a loopback)
 * 1) Note: this creates also an internal 'BrowserOut.monitor' for its output
 * 2) Note: as default you cannot listen to it (you need a loopback)

pactl load-module module-loopback source=BrowsersOut.monitor
 * 1) Create a loopback for the above NULL sink
 * 2) Note: this allow to listen it in your speaker/headphones
 * 1) Note: this allow to listen it in your speaker/headphones
 * 1) Note: this allow to listen it in your speaker/headphones

pacmd update-sink-proplist  BrowsersOut         device.description=BrowsersOut pacmd update-source-proplist BrowsersOut.monitor device.description=BrowsersOut.monitor
 * 1) Assign a nice description for my NULL sink
 * 2) Note: without this, in pavucontrol you will see weird things
 * 1) Note: without this, in pavucontrol you will see weird things
 * 1) Note: without this, in pavucontrol you will see weird things

Tip: BrowsersOut is just a dummy name and you can anything else instead. In this example we want the audio of a browser web so we called it in this way.

Close your terminal.

Now open your favorite browser (Chromium?) or whatever other app you want to stream and make sure it's playing audio.

Then open your audio mixer. It's called "Pavucontrol". It's usually pre-installed. If not:

sudo apt update sudo apt install -y pavucontrol
 * 1) first try to install Pavucontrol

pavucontrol
 * 1) then open pavucontrol

Now that you have opened pavucontrol, configure it in this way the playback section:



The recording section should be configured in this way:



That's it!

Now Open Broadcaster Software receives audio directly from Chromium (or whatever other app you have chosen) without any possible interference.