[pulseaudio-discuss] How to combine microphone audio and music from application to pipe to video conference

Samir Parikh spython01 at gmail.com
Tue Jun 2 02:27:51 UTC 2020


Sean Greenslade wrote on 5/24/20 1:44 AM:
> On Sat, May 23, 2020 at 11:49:54AM -0400, Samir Parikh wrote:
>> Ok, I'm back after researching and trying some things a bit more.
>>
>> Sean Greenslade wrote on 5/16/20 1:23 AM:
>>> This is definitely possible entirely within pulseaudio. I'll go over the
>>> basic concepts here, then show an example.
>> ...
>>> Now you can begin playing music, and in the Playback tab of pavucontrol
>>> move the music playback to the VirtualMixer.
>>
>> I got this far in following your instructions but got stumped on that last
>> part about moving the music playback to the VirtualMixer.  This screenshot
>> shows my options for where to direct the Rhythmbox output:
>> https://imgur.com/a/PRCYV3B
>>
>> If I select VirtualMixer, playback of the music continues but I can no
>> longer hear it.  Is there a way for me to also hear it through my own
>> speakers/headset?
> 
> This is possible, but adds some complexity to the setup. To hopefully
> make this easier to follow, I've made a little flowchart of all the
> components:
> 
> https://dumbpic.link/manu/2020-05-23_pulse_diagram_mic_mix_with_mon.png
> 
> Remember that pulseaudio draws a distinction between sources and sinks,
> and normally doesn't allow you to route a source to sink or vice-versa.
> So source components have a rounded face, and sink components have a
> pointed face.
> 
> Certain endpoints are "exclusive," meaning that they can only have one
> thing connected to or from it. These points have a grey shading to
> indicate that property.
> 
> Modules with a thick border are real hardware. Modules with a thin
> border are software. The dotted line around "auto monitor" refers to the
> fact that it is auto-created when a virtual sink is created.
> 
> The thick lines connecting modules are the routings within Pulse. These
> routings can all be modified in realtime within pavucontrol.
> 
> Hopefully this makes enough sense to help you to augment your script.
> For comparison, here's the flowchart for my original suggestion that
> does not let you monitor the music:
> 
> https://dumbpic.link/manu/2020-05-23_pulse_diagram_mic_mix.png
> 
> --Sean
> 
Hi All,

I was finally able to get this work!  Thanks to the help of Sean as well 
as following some of the steps on this site[1], I was finally able to 
pipe BOTH my microphone AND the music from Rhythmbox to Jitsi while also 
being able to hear BOTH the music and the incoming video conference 
audio on my headphones!  That site also referenced a helpful Stack 
Exchange post[2] which also led me to this GitHug repository[3] which 
contained a sample script[4] which I modeled to create my own[5].

My pavucontrol settings can be found here[6].

Still lots to learn now about how to improve latency, etc. but feels 
good to have finally solved this.

Thanks again to Sean and everyone on this list who chimed in to help!

Samir

[1] https://endless.ersoft.org/pulseaudio-loopback
[2] 
https://askubuntu.com/questions/257992/how-can-i-use-pulseaudio-virtual-audio-streams-to-play-music-over-skype
[3] https://github.com/toadjaune/pulseaudio-config
[4] 
https://raw.githubusercontent.com/toadjaune/pulseaudio-config/master/pulse_setup.sh
[5] https://pastebin.com/raw/vLaYmhCe
[6] https://imgur.com/a/1wD0851


More information about the pulseaudio-discuss mailing list