PulseAudio is the built-in audio system in ubuntu. As a result of the quick tutorial, you are able to combine and fork audio stream on your computer.
You may want to plug your headset first.
# Outputs pacmd list-sinks # Inputs pacmd list-sources
We create the „recording“ bubble from above.
pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
A loopback device for connecting inputs to recording. The latency is important to avoid delays.
pacmd load-module module-loopback latency_msec=1 sink=recording sink_dont_move=true
The combining bubble. To figure the name of your headset, call the list-commands mentioned above. My headset is from Logitech.
pacmd load-module module-combine-sink sink_name=combined sink_properties=device.description=combined slaves=recording,alsa_output.usb-Logitech_Logitech_USB_Headset_000000000000-00.analog-stereo
You are all set. Install PulseAudio Volume Control. This is additionally needed to ubuntu’s sound settings.
sudo apt install pavucontrol
Lavf… is ffmpeg capturing my screen, adding a logo to it, and recording the related audio stream. All at once. Also, my voice, and the voices of all attendees of a video call get recorded, while not hearing myself during the online session.
In ubuntu’s sound settings, my headset listens to the headset’s default „Headphones – 960“. You probably want to check that.
All recordings are done? Unload all modules.
pacmd list-modules pacmd unload-module <number of the module>
Learn more about screen recording with ffmpeg.