0

I am recording some lectures in OBS. Using Pulse Audio and have also done some tests with JACK.

Problem I am having is that I listen to the audio while recording and as a result the recording-audio is “connected” to the same sink / output - so when I adjust volume, the volume is also adjusted for the recording.

I also mainly use cabled headset, but sometimes switch to Bluetooth when I have to step away from the desk. This causes the recording to lose audio. (Lost entire recording of today due to this - 6h with no sound).

What happens is that a new “sink” is created for the BT and recording continue on the jack/cable, which has no sound - all sound is routed to BT. When I switch back to jack/cable something get messed up and sound does not get back.


Question is how I can set up the recording to use its own sink/source that is not affected by my headset use and volume adjustments?

Something like:

                               +----||- [Cable|BT]-Headset (w/vol)
                              /
[AUDIO] => [DEVICE] => [MAGIC]------- FIREWALL ----------------
                              \
                               +-----|- Recorder (w/vol)

When switching devices I have to select either:

Cabled:

enter image description here

Bluetooth:

enter image description here

But want a "source" I can add to Recorder which is independent on selected device. Source of the audio in the lectures is web-browser.


EDIT:

Looks like I get partially there by using this https://unix.stackexchange.com/a/219769/403363

It's all a bit confusing I think. I add a new sink called MySink. Then in the recorder (OBS) I add a new Audio Output Capture (MySink) where I select MySink and mute Desktop Audio.

enter image description here

In pavucontrol I have to:

[Playback]

Set Firefox to output to Built-In Audio Analog Stereo and the loopback to MySink.

enter image description here

[Recording]

Set Loopback to MySink from Monitor of Built-In Audio Analog Stereo

enter image description here

And OBS: Audio Output Capture (MySink) from Monitor of Null Output

enter image description here

Do not understand much of this and not sure if it is the way to go.

When I use Bluetooth headset I have to set:

  • [Playback] loopback to my headset, Firefox kept as is.
  • [Recording] Here MySink is gone and the headset is in place of it.
  • [Output devices] Change Built-In Audio Analog Stereo to Port: Line Out (Unplugged) and my BT Headset is on port Headset (plugged in)

Would be better if desktop audio was like a raw stream where I could record in OBS and have the BT / cable headset not affecting this output. (If you get what I mean).

1 Answer 1

0

You are nearly there.

Think of "MySink" as the point where you want to record the audio. So connect everything you want to record (Firefox, OBS, whatever) to that sink.

From the .monitor source of "MySink" you do the recording. Never touch the volume settings of "MySink" after initial setup, and your recording will stay at the same level.

Now, loopback the .monitor source of "MySink" to whatever physical device you use: your headset ("Built-in Audio Analog Stereo"), your Bluetooth Sink, whatever. When you change what you use, change the sink of the loopback connection. Use the volume on the physical sink to adjust it for this particular physical sink.

Do the same for all applications you don't want to record: For example, if you don't want to record Firefox, connect it to either your headset, or your Bluetooth sink.

Done.

If you want to automatically switch all applications between your headset and bluetooth in one go, you can use a second null sink.

Edit

If you do something like

pacmd load-module module-null-sink sink_name=recording_sink sink_properties=device.description=Recording-Sink

then at least on my pavucontrol, the source shows up as "Monitor of Recording-Sink".

1
  • Thank you very much. Believe I have gotten it right. Scared to reboot and test, but no way out haha. I also added one more null sink, but in pavucontrol under tab "Recording" both show as "Monitor of Null Output". I used the same one for all, but hard to distinguish if they swap places in the drop down.
    – Moba
    Commented Apr 2, 2020 at 0:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .