scripts:linux_multimedia

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scripts:linux_multimedia [2021-11-06 09:15] Tonyscripts:linux_multimedia [2025-03-11 02:28] (current) Tony
Line 1: Line 1:
 +====== Desktop Experience ======
 +
 +
 +===== PulseAudio modules =====
 +
 +Just making this short section to put a reference to the documentation for all modules. It lists all parameters for the different modules and might be of use.
 +
 +https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/
 +
 +
 +
 +
 +===== Microphone Loopback =====
 +
 +
 +If you're recording something and want to be able to hear something, then you can load the pulseaudio loopback module.
 +
 +To load the module and start loopback:
 +
 +<code>pactl load-module module-loopback latency_msec=1
 +</code>
 +To unload and stop playback:
 +
 +<code>pactl unload-module module-loopback
 +</code>
 +If it's looping the wrong device, you can change it using the 'pavucontrol' program.
 +
 +
 +===== Microphone noise reduction =====
 +
 +
 +You can use the echo-cancel module to some success. RMNoise from XiphMont is better
 +
 +<code>pactl load-module module-echo-cancel
 +</code>
 +
 +===== Pipewire =====
 +
 +
 +Pipewire is great. Instead of all the above, you can use either any PulseAudio or Jack method for both splitting outputs and microphone loopback.
 +
 +To split the output, just use Pipewire's "Pro Audio" mode. This will let you send a different stream to all the outputs individually.
 +
 +Instead of using Pavucontrol to map and manage the outputs, you can use a Jack controller, which can more easily route any output to any input.
 +
 +An example of this is to use QJackControl with Pipewire Jack instead of Jack2
 +
 +<code>pw-jack qjackctl
 +</code>
 +From there, you can map any program to output or input. It's so much more flexible then Pulseaudio if you want to run filters and whatnot, or you have a DAW like Ardour that you want to map multiple inputs and outputs to.
 +For example, if you have an audio interface with 4 inputs, you can map it to record 4 tracks simultaneously in Ardour (or more or less, depending on what you want to accomplish).
 +
 +Microphone loopback is also a lot easier, just connect the input device directly to the output device in Jack, and you'll get monitoring with less latency then Pulseaudio.
 +
 +Now, you do pay with extra CPU cycles and memory usage, and I still find the audio starts glitching sporadically if I run both pulse and jack applications at the same time with different sampling rates, but it's neat.
 +
 +Oh, also Bluetooth is buggier - as in, sometimes it just doesn't send the audio even though it's selected as an output when first turning on, and you need to mess with settings.
 +
 +Seriously though, give it a try!