redsea is a lightweight command-line FM-RDS decoder that supports many RDS features.
It can decode RDS live into newline-delimited JSON where each line corresponds to one RDS group; or it can print them as raw hex.
Example output:
{"pi":"0xD3C2","group":"0A","ps":"MDR JUMP","di":{"dynamic_pty":true},"is_music":true,"prog_type":"Pop music","ta":false,"tp":false}
{"pi":"0xD3C2","group":"2A","prog_type":"Pop music","tp":false}
{"pi":"0xD3C2","group":"2A","radiotext":"Das Leichteste der Welt von Silbermond JETZT AUF MDR JUMP","prog_type":"Pop music","tp":false}
{"pi":"0xD3C2","group":"12A","prog_type":"Pop music","radiotext_plus":{"item_running":true,"item_toggle":1,"tags":[{"content-type":"item.title","data":"Das Leichteste der Welt"},{"content-type":"item.artist","data":"Silbermond"}]},"tp":false}
{"pi":"0xD3C2","group":"3A","open_data_app":{"app_name":"RadioText+ (RT+)","oda_group":"12A"},"prog_type":"Pop music","tp":false}
Redsea needs to be built from source, but this is not very complicated. Commands are provided
below (you can skip the $
at the start of each command).
On Ubuntu:
$ sudo apt install git build-essential meson libsndfile1-dev libliquid-dev
Or on older Debians:
$ sudo apt-get install python3-pip ninja-build build-essential libsndfile1-dev libliquid-dev nlohmann-json3-dev
$ pip3 install --user meson
Or on macOS using Homebrew:
$ brew install meson libsndfile liquid-dsp nlohmann-json
$ xcode-select --install
Meson will later download nlohmann-json for you if it can't be found in the package repositories.
It's also possible to build redsea on Windows, either in Cygwin or by building an .exe with MSYS2/MinGW. This is a bit more involved - instructions are in the wiki.
Downloading a release version is recommended.
Alternatively, if you wish to have the latest snapshot, you can also clone this git repository. The snapshots are work-in-progress, but we attempt to always keep the main branch in a working condition.
$ git clone https://github.com/windytan/redsea.git
$ cd redsea
$ meson setup build && cd build
$ meson compile
Now the binary executable is compiled and you can run it!
You can install the binary using meson install
if you so wish. By default,
it will be installed under /usr/local
, but this can be changed by providing
e.g. meson setup build --prefix /usr/local
. See the
Meson guide
for more.
If you cloned the repository you can later get the latest updates and recompile:
$ git pull
$ cd build && meson compile
If your Linux system has very little RAM (e.g. Raspberry Pi), please use the below
line instead of meson compile
to limit the number of build processes:
$ taskset -c 0 meson compile
The compilation will still require at least 500 MB of free RAM.
See the full list of command line options in the wiki
or type redsea --help
.
We also have more usage examples in the wiki.
Redsea reads an MPX signal from stdin by default. It expects the input
to be raw 16-bit signed-integer PCM. This means it can easily be used with rtl_fm
.
Here's an example command that listens to 87.9 MHz using rtl_fm
and displays
the RDS groups:
rtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 20 -F 9 -f 87.9M | redsea -r 171k
redsea --input hex < sample_hex_file.spy
redsea -f mpx_input.wav --output hex
- Linux/macOS/Windows
- For realtime decoding, a Raspberry Pi 1 or faster
- libiconv 1.16
- libsndfile 1.0.31
- liquid-dsp release 1.3.2
- nlohmann-json
rtl_fm
(from rtl-sdr) or any other source that can output demodulated FM multiplex signals
- Linux/macOS/Cygwin/MSYS2+MinGW
- C++14 compiler
- meson + ninja
- 500 MB of free memory for non-parallel build (breakdown)
- Catch2
If you've installed liquid-dsp yet meson can't find it, it's possible that XCode command line tools aren't installed. Run this command to fix it:
xcode-select --install
Try running this in the terminal:
sudo ldconfig
We welcome bug reports and documentation contributions. Or take a peek at our open issues to see where we could use a hand. See CONTRIBUTING for more information.
Redsea is released under the MIT license, which means it is copyrighted to Oona Räisänen OH2EIQ yet you're free to use it provided that the copyright information is not removed. (iconvpp has its own license.) See LICENSE.
Note: This software is not safety certified. Do not rely on it for emergency communication, accurate traffic / weather information, or life-critical situations.