Open Broadcaster Software/Advanced selective audio management with PulseAudio

From Wikibooks, open books for an open world
Jump to navigation Jump to search
With this configuration you can handle complex audio pipes .

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[edit | edit source]

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:

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

Use cases[edit | edit source]

  • selective audio management

Features[edit | edit source]

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

Disadvantages[edit | edit source]

  • you have to open your command line

Requirements[edit | edit source]

  • 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[edit | edit source]

(Step 3) File > Settings > Audio > Disable everything

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[1]
    Tip: you don't want to send OnAir any audio as default
  4. first scene "Welcome"
    1. Image: pick a start splash image
    2. Media source: weird jingle (in loop)
    3. Text: write something like "Welcome, starts at ...."
  5. second scene "OnAir" (← !)
    1. window capture on BigBlueButton
    2. audio input capture
  6. third scene "Pause"
    1. Image: pick a splash image
    2. Media source: another weird jingle (in loop)
    3. Text: write something like "Welcome, starts at ...."
  7. fourth scene "Final"
    1. Image: pick a splash image
    2. Media source: another weird jingle (in loop)
    3. 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"
  8. Edit > Advanced Audio Properties
    1. Test each scene
      1. if you do not ear something in your headphones, select "Monitor and output" on that element
        Enable for "Media"
      2. if you do not want to ear something in your headphones, select "Monitor off"
        Eventually disable for "Monitor output"

That's all!

Notes[edit | edit source]

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

Step 2: configure PulseAudio[edit | edit source]

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

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

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

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

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:

# first try to install Pavucontrol
sudo apt update
sudo apt install -y pavucontrol

# then open pavucontrol
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.