Question / Help Capture single pulseaudio Stream

Using OBS Multiplatform 0.11.2 on Ubuntu 14.04 based system with pulse audio.

Is there a way to directly capture a single pulse audio stream instead of capturing my output device as a whole? In a perfect world I do not want my local adjustments to volume to affect what is being sent to the stream.

Thanks!
 

leopardb

New Member
It is possible but it's not really OBS related, rather pulseaudio related. Do you know what a monitor is ? (pulseaudio comes with its own names for different things : source, sink, monitor etc...). Do you have a bit of pulseaudio experience ?

Can you describe your setup ? for instance : "you are streaming a game, while listening to music, you want the game sound to be heard by you *and* the stream, but the music *only* by you."
 
I'm streaming an application and music and want the music to always be heard by the stream at the same level. So even if I turn my sound up / down or mute it I want to music being sent to the stream to stay consistent.
 

leopardb

New Member
So what you want looks like this :

Web Stream <------ WebStreamSlider <--------- Music
|
Headphones <------ your_volume_slider <---------|


1) So you want to create a special "sink" for your stream :

pactl load-module module-null-sink sink_name="webstream_sink" sink_properties=device.description="web_stream"

2) Then you want to direct the sound of your music application to this new sink, using pavucontrol (in the playback tab, you can choose the sink in which each application outputs its sound). Choose the sink "web_stream" for your music application.

3) In OBS sound properties, choose the device "Monitor of web_stream"

4) Since you want to hear your music too, make a loopback of the web stream sound to your headphones :

pactl load-module module-loopback source=webstream_sink.monitor sink=alsa_output.pci-0000_00_1b.0.analog-surround-51 rate=44100

The sink is "alsa_output.pci-0000_00_1b.0.analog-surround-51" for me. To know yours, run

pactl list short sinks

you should have only 2, the right one is the first one (*not* "webstream_sink").

5) Now when you mute your general volume, the music keeps on being sent to the web stream, while you do not hear it anymore, at the same level.


It's quite complicated at first, but once you understanbd the pulseaudio logic, it's quite powerful.


Tell me if it worked or if you need more details :)
 
Thank you very much for the help! I'm going to have to write up a short tutorial for myself so I don't forget how to do this in the future. Works like a charm.
 
Top