I managed to get it going with the steps on the Ubuntu Forums, for clarity here is what I did:
sudo apt-get install gtk-recordmydesktop pavucontrol
- Opened the Pulse Audio Volume Control dialog:
Applications > Sound & Video > PulseAudio Volume Control
- Opened gtk-recordmydesktop
- In gtk-rmd advanced preferences, "Sound" tab, set "Device" to
pulse
- In gtk-rmd start a recording
- In Volume Control goto the Recording tab and change the recordmydesktop entry to 'Monitor of '
This is what seems to have worked for me.
Let me repeat: A single program or group of programs A (game) should output sound both to OBS and the headphone, while another single program or group of programs B (voice chat) should only output sound to the headphone, all on the Pulseaudio level. Correct?
Don't use snd-dummy
, it works on the ALSA level. Instead, create a "null sink" on the Pulseaudio level:
pacmd load-module module-null-sink sink_name=game_sink sink_properties=device.description=Game-Sink
Use pavucontrol
or, if it can do that, the sound configuration of elementary OS to switch all group A sound outputs to that sink. Each sink in Pulseaudio comes with a corresponding "monitor" source (you can see those in the OBS menu you included), so setup OBS to record from "Monitor of Game Sink".
That takes care of recording from group A only, but doesn't output it to the headphones. For that, you need a loopback from the mentioned monitor source to the headphone sink:
pacmd load-module module-loopback source="game_sink.monitor" sink="your-headphone-sink"
You can find out the names of all sinks, including the headphone sink, with
pacmd list-sinks | grep name:
Leave out the angular brackets when using the names as arguments.
Best Answer
Just add
-ad device_you_want_to_record
You might also want to tweak your audio codec.
This site has good examples: https://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linux/