[pulseaudio-discuss] audio source -> pa -> oggenc

Richard Henwood rjhenwood at yahoo.co.uk
Sat Sep 24 09:25:22 PDT 2011


Hi Col,

Just a quick message to say I've had a chance to follow up on your advice and it was helpful. Minor comments in-line, below:

--- On Sun, 18/9/11, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> From: Colin Guthrie <gmane at colin.guthr.ie>
> Subject: Re: [pulseaudio-discuss] audio source -> pa -> oggenc
> To: pulseaudio-discuss at lists.freedesktop.org
> Date: Sunday, 18 September, 2011, 9:38
> 'Twas brillig, and Richard Henwood at
<snip> 
> Add in a new sink does pretty much noting until you set
> some (or all)
> apps to use it, so using the Gnome sound prefs is what
> you're expected
> to do. Is this really problem 1?
> 

Yeah, I think problem 1 is minor - and it has been resolved now I understand that I should be 'listening' to the monitor.

> > PROBLEM 2: the whole task ('java StdAudio' and
> 'oggenc') is over in a
> > second or two. The duration of the 'sound' from
> StdAudio is ~10
> > seconds and what I'm aiming for is to drain audio from
> 'java
> > StdAudio' at real-time, not as 'fast as possible.'
> > 
> > If you can overlook my imprecise use of terms (drain,
> signal etc) I
> > would really appreciate help with this :)
> 
> Yeah the pipe sink is a bit of a hack/debug tool really,
> and in fact
> many distros don't ship it.
> 
> 
> What I'd suggest is the following solution with a couple
> variants
> depending on how you want to use things.
> 
> 
> The main question is: Do you want to hear the sounds as
> well as
> converting them to ogg?
> 

No. I'm going to run my sound generating code on a server, so I don't need to hear them as well...

> If you DO NOT want to hear the sounds, then you will do the
> following:
> 
> 1. pactl load-module module-null-sink sink_name=null
> 2. Start "java StdAudio"
> 3. Set the null sink to be default in the gnome GUI (or use
> pavucontrol
> to move only the java StdAudio stream to that device,
> letting all other
> sonds still use the build in h/w)
> 4. Use the following gst pipeline: gst-launch-0.10
> pulsesrc
> device=null.monitor ! audioconvert  ! vorbisenc !
> oggmux ! filesink
> uri=file:///path/to/file.ogg
> 

with: filesink location=/path/to/file.ogg
this work perfectly - thanks! 

<snip>
> 
> Also note that if you are wanting to make this available to
> others, then
> using the Shoutcast system is a pretty easy way to do this.
> You can push
> straight to shoutcast via GST:
> 
> gst-launch-0.10 pulsesrc
> device=alsa_output.pci_8086_27d8_alsa_playback_0.monitor !
> audioconvert
>  ! vorbisenc ! oggmux ! shout2send ip=SOMEIP port=8000
> password=hackme
> mount=stream.ogg
> 

Ok, so it seems that I need to drag in shoutcast dependency :/
It would be nice if there was a light-weight alternative to shoutcast - sighttpd might be a good place to start if I had copious free time...

Thanks again col!
cheers,
Richard


More information about the pulseaudio-discuss mailing list