-
Notifications
You must be signed in to change notification settings - Fork 38
Use cases
The full command to decode RDS live via rtl_fm
is:
rtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 20 -F 9 -f 87.9M | redsea
For Raspberry Pi 1 it's necessary to change -A std
to -A fast
. This way
more CPU cycles will be left to redsea.
Note that rtl_fm
will tune the receiver a bit off-center; this is normal and
is done to avoid the DC spike. See the rtl_fm
FAQ for more about this
behavior.
csdr can be used to demodulate streams from other radios on the command line, like AirSpy:
airspy_rx -d -r /dev/stdout -f 87.9 -a 2500000 -v 15 -m 15 -l 14 |\
csdr convert_i16_f | csdr fir_decimate_cc 10 0.05 HAMMING |\
csdr fmdemod_quadri_cf | csdr convert_f_i16 | ./src/redsea -r 250000
It's easy to decode audio files containing a demodulated FM carrier. Note that the file must have around 128k samples per second or more. 171k will work fastest, because it doesn't require resampling internally.
redsea -f multiplex.wav
If your sound card supports recording at high sample rates (192 kHz) you
can also decode the MPX output of an FM tuner or RDS encoder, for instance
with this sox
command:
rec -t .s16 -r 171k -c 1 - | redsea
By default, the raw MPX input is assumed to be 16-bit signed-integer single-channel samples at 171 kHz.
The --feed-through
option lets you use both the original signal and
the decoded RDS via different streams. For example, the signal can be listened
to using sox
, while RDS groups are printed to stderr:
rtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 20 -F 9 -f 87.9M |\
redsea --feed-through |\
play -t .s16 -r 171k -c 1 -
This command writes a hex-format outputfile with a timestamp in its file name.
rtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 40 -F 9 $@ | \
redsea -x | tee `head -12l | tail -1l | \
cut -d" " -f1`_`date +%F`_`date +%k`-`date +%M`-`date +%S`_$2Hz.spy