# 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

## Step 1: configure Open Broadcaster Software

This guide is for OBS 25 (2021). Please update if it will be needed.
* Open Open Broadcaster Software
* Plug headphones
* File > Settings > Audio > Disable everything
    Tip: you don't want to send OnAir any audio as default
* first scene "Welcome"
** Image: pick a start splash image
** Media source: weird jingle (in loop)
** Text: write something like "Welcome, starts at ...."
* second scene "OnAir" (← !)
** window capture on BigBlueButton
** audio input capture
* third scene "Pause"
** Image: pick a splash image
** Media source: another weird jingle (in loop)
** Text: write something like "Welcome, starts at ...."
* fourth scene "Final"
** Image: pick a splash image
** Media source: another weird jingle (in loop)
** 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"
* Edit > Advanced Audio Properties
** Test each scene
*** if you do not ear something in your headphones, select "Monitor and output" on that element
    Enable for "Media"
*** if you do not want to ear something in your headphones, select "Monitor off"
    Eventually disable for "Monitor output"
That's all!

## Notes

* ↑ File:Open Broadcaster Software 25 - Audio settings - General - Devices disabled.png

## Step 2: configure PulseAudio

On you GNU/Linux operating system, open your "Terminal emulator" and paste this long text and press enter:
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:
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.