Audio Sample Rate with Jack and GStreamer

Scott Kidder kidder.scott at
Wed Apr 2 07:49:38 PDT 2014

Hi all,

Where's the best place to specify the audio sample-rate when using Jack and
GStreamer to encode with the Opus codec?  Should the sample-rate be
specified in the Jack config, GStreamer pipeline, or both?

I'd like to have the Opus codec use a sample rate of 24000 instead of the
default of 48000.  It seems that it would be best to have Jack use a
sample-rate of 24000, so as to reduce the load on Jack and eliminate the
need to resample in the GStreamer pipeline.  Is this advisable?

Here are the settings I'm using today:


jackd --realtime -d alsa --capture --period 256 --nperiods 2

This leads to the following Jack configuration:

configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods

GStreamer pipeline:

jackaudiosrc buffer-time=30000 ! audioconvert !
'audio/x-raw,channels=1,rate=24000' ! opusenc frame-size=20 bitrate=28000
bandwidth=superwideband ! rtpopuspay ! udpsink host= port=16502

Thanks in advance,

--Scott Kidder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list