Trying to use rtl_fm, etc

Adam Nielsen a.nielsen at
Mon Dec 31 06:28:21 UTC 2012

> With rtl_fm, I get a tiny burst of audio about once a minute.
> A fresh run:
> freebie# rtl_fm -N -f 162550000 - | play -t raw -r 32k -e signed-integer -b 16
> -c 1 -V 4 -

Just FYI, you can see here that:

> Output at 24000 Hz.

However you have told 'play' to play the audio at a sampling rate of 32kHz, 
even though the audio data is only arriving at 24kHz.  So you will get 
stuttering as the audio buffer keeps running out and waiting for more data to 

For me (under Linux), I get best results using the -r option to rtl_fm to set 
the output audio sampling rate to 48kHz, then tell play to play at 48kHz too. 
  This way my system doesn't have to resample it to 48kHz before it can mix 
the stream into the system-wide audio output.

Note that the -s option sets the signal bandwidth and -r sets the output audio 
sampling rate.  A lot of people misunderstand the purpose of the -s option, 
however you shouldn't need it unless you are trying to receive data signals. 
-W and -N set -s to the correct values for voice transmissions.

I would also suggest playing a .wav file with the same 'play' options just to 
make sure your system can play mono audio at low sampling rates.  I know my 
sound card drivers won't (possibly because I am using a SPDIF connection to an 
external amplifier) so I need the Linux audio system to upmix it to 48kHz 
16-bit stereo or I won't hear anything.


More information about the osmocom-sdr mailing list