<div dir="ltr">Hi all,<div><br></div><div>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?</div>
<div><br></div><div>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?</div>
<div><br></div><div>Here are the settings I'm using today:</div><div><br></div><div>Jack:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>jackd --realtime -d alsa --capture --period 256 --nperiods 2</div>
</blockquote><div><br></div><div>This leads to the following Jack configuration:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods</div>
</blockquote><div><br></div><div><br></div><div>GStreamer pipeline:</div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>jackaudiosrc buffer-time=30000 ! audioconvert ! 'audio/x-raw,channels=1,rate=24000' ! opusenc frame-size=20 bitrate=28000 bandwidth=superwideband ! rtpopuspay ! udpsink host=224.0.0.1 port=16502<br>
</div></blockquote></div><div><br></div><div>Thanks in advance,</div><div><br></div><div>--Scott Kidder</div><div><br></div></div>