Visitors

News Flash!‎ > ‎

Managing sound for broadcasting

posted Jan 10, 2010, 12:27 PM by Patrick Balleux   [ updated Jan 10, 2010, 12:57 PM ]
After some bit of testing, I 've found a way to manage the sound recorded by the Flash player in your browser to mix your microphone and the audio output of any application supporting Pulseaudio.

You will need:
  • pavucontrol
  • pulseaudio (of course...)
  • And good music ;)

The basic idea is to load the "module-combine" in your pulseaudio server:

pactl load-module module-combine

Then you launch a gstreamer pipeline to redirect your microphone to the default output

gst-launch pulsesrc ! pulsesink

And finally, launch pavucontrol to manage the sound

pavucontrol

In pavucontrol, you will need to make sure that gst-launch is recording from the proper microphone and in the playing tab, redirect to output to the combine module.  Of course, you'll hear your self in the speaker, so make sure to put head phone to avoid a loopback effect.

Once you can hear yourself, launch any music player.  Then, in pavucontrol, you will see that the output of your media player is going to the default output card.  Redirect the output to the combine module.  Adjust volumes so your voice and music will be audible.

And finally, start your browser and go to any broadcasting site.  Start your broadcast as usual and once it is started, look in pavucontrol in the Recording tab, you should see an entry for Flash (or your browser) recording from the default input.  Redirect the input to read from the combine module...

That's it!

I've attached to this post a small script that will do the job for you to load everything.  Also, you can play with the gstreamer pipeline to add echo, or change the pitch of your voice...

And easier way is to simply load the module loopback:

pactl load-module module-loopback

So all input will be redirected to the output.  And using pavucontrol, you redirect any recodings to the Audio output monitor instead of the default input.  You will have less control on your voice, but you won't need any script to manage it.


Have fun!

Patrick

Č
ċ
ď
soundmanager.sh
(1k)
Patrick Balleux,
Jan 10, 2010, 12:38 PM
Comments