Prerequisites
- some Linux distribution (I am doing this on Debian Testing, but it should work anywhere, where PulseAudio is running)
- PulseAudio
pavucontrol
- you can probably do the same without a GUI or the audio settings of your desktop environment, but
pavucontrol
gives a nice overview - you can install it with
sudo apt install pavucontrol
on Debian/Ubuntu
- you can probably do the same without a GUI or the audio settings of your desktop environment, but
- OBS (or any other program using the audio channel)
Sources and more Information
This guide is mostly an extended summary of https://obsproject.com/forum/resources/include-exclude-audio-sources-using-pulseaudio-linux.95/.