{"id":13441171,"url":"https://github.com/windytan/redsea","last_synced_at":"2026-01-10T05:54:44.842Z","repository":{"id":43738098,"uuid":"2017232","full_name":"windytan/redsea","owner":"windytan","description":"Command-line FM-RDS decoder with JSON output.","archived":false,"fork":false,"pushed_at":"2024-07-25T13:26:06.000Z","size":1478,"stargazers_count":388,"open_issues_count":4,"forks_count":36,"subscribers_count":39,"default_branch":"master","last_synced_at":"2024-07-25T22:27:06.905Z","etag":null,"topics":["json","linux","macos","raspberry-pi","rds","rtl-sdr","tmc"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/windytan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-07-08T10:05:12.000Z","updated_at":"2024-07-25T13:26:09.000Z","dependencies_parsed_at":"2024-01-23T18:16:28.046Z","dependency_job_id":"a1d6795c-57c2-42ef-b9da-085a8f6aba5e","html_url":"https://github.com/windytan/redsea","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windytan%2Fredsea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windytan%2Fredsea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windytan%2Fredsea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windytan%2Fredsea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/windytan","download_url":"https://codeload.github.com/windytan/redsea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213299608,"owners_count":15566650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","linux","macos","raspberry-pi","rds","rtl-sdr","tmc"],"created_at":"2024-07-31T03:01:30.714Z","updated_at":"2026-01-10T05:54:44.794Z","avatar_url":"https://github.com/windytan.png","language":"C++","funding_links":[],"categories":["C++","Other SDR Software"],"sub_categories":[],"readme":"# redsea RDS decoder\n\nredsea is a lightweight command-line [FM-RDS](https://en.wikipedia.org/wiki/Radio_Data_System)\ndecoder that supports many [RDS features][Wiki: Features].\n\n[![release](https://img.shields.io/github/release/windytan/redsea.svg)](https://github.com/windytan/redsea/releases/latest)\n[![build](https://github.com/windytan/redsea/workflows/build/badge.svg)](https://github.com/windytan/redsea/actions/workflows/build.yml?query=branch%3Amaster)\n\nIt prints [newline-delimited JSON](https://jsonlines.org/) where\neach line corresponds to one RDS group. It can also print \"raw\" undecoded hex blocks (`--output hex`).\nPlease refer to the wiki for [input data formats][Wiki: Input].\n\nRedsea is compatible with the [RTL-SDR][About RTL-SDR] USB radio stick via the\n`rtl_fm` tool, and any other SDR via a tool like `csdr` (see [wiki][Wiki: Use cases]). It can decode MPX from\nraw PCM or audio files, ASCII bitstreams, the hex format used by RDS Spy, or the TEF6686 serial format.\n\n[About RTL-SDR]: http://www.rtl-sdr.com/about-rtl-sdr\n[Wiki: Features]: https://github.com/windytan/redsea/wiki/Supported-RDS-features\n[Wiki: Input]: https://github.com/windytan/redsea/wiki/Input-formats\n\nExample output:\n\n```json\n{\"pi\":\"0xD3C2\",\"group\":\"0A\",\"ps\":\"MDR JUMP\",\"di\":{\"dynamic_pty\":true},\"is_music\":true,\"prog_type\":\"Pop music\",\"ta\":false,\"tp\":false}\n{\"pi\":\"0xD3C2\",\"group\":\"2A\",\"prog_type\":\"Pop music\",\"tp\":false}\n{\"pi\":\"0xD3C2\",\"group\":\"2A\",\"radiotext\":\"Das Leichteste der Welt von Silbermond JETZT AUF MDR JUMP\",\"prog_type\":\"Pop music\",\"tp\":false}\n{\"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}\n{\"pi\":\"0xD3C2\",\"group\":\"3A\",\"open_data_app\":{\"app_name\":\"RadioText+ (RT+)\",\"oda_group\":\"12A\"},\"prog_type\":\"Pop music\",\"tp\":false}\n```\n\n## Contents\n\n  * [How to install](#how-to-install)\n  * [Usage](#usage)\n    * [Full usage](#full-usage)\n    * [Formatting and filtering the JSON output](#formatting-and-filtering-the-json-output)\n  * [Requirements](#requirements)\n  * [Troubleshooting](#troubleshooting)\n    * [Can't find liquid-dsp on macOS](#cant-find-liquid-dsp-on-macos)\n    * [Can't find liquid-dsp on Linux](#cant-find-liquid-dsp-on-linux)\n  * [Contributing](#contributing)\n  * [Licensing](#licensing)\n\n## How to install\n\nRedsea needs to be built from source, but this is not very complicated. Commands are provided\nbelow (you can skip the `$` at the start of each command).\n\n### 1. Install dependencies\n\nOn Ubuntu:\n\n        $ sudo apt install git build-essential meson libsndfile1-dev libliquid-dev\n\nOr on older Debians:\n\n        $ sudo apt-get install python3-pip ninja-build build-essential libsndfile1-dev libliquid-dev nlohmann-json3-dev\n        $ pip3 install --user meson\n\nOr on macOS using Homebrew:\n\n        $ brew install meson libsndfile liquid-dsp nlohmann-json\n        $ xcode-select --install\n\nMeson will later download nlohmann-json for you if it can't be found in the package repositories.\n\nIt's also possible to build redsea on Windows, either in Cygwin or by building\nan .exe with MSYS2/MinGW. This is a bit more involved - instructions are in [the wiki][Wiki: Windows build].\n\n[Wiki: Windows build]: (https://github.com/windytan/redsea/wiki/Installation#windows).\n\n### 2. Get redsea\n\nDownloading a [release version](https://github.com/windytan/redsea/releases) is recommended.\n\nAlternatively, if you wish to have the latest snapshot, you can also clone this git repository.\nThe snapshot might be more work-in-progress than the releases, although we attempt to\nkeep the main branch stable.\n\n        $ git clone https://github.com/windytan/redsea.git\n        $ cd redsea\n\n### 3. Compile redsea\n\n        $ meson setup build \u0026\u0026 cd build\n        $ meson compile\n\nNow the binary executable is compiled and you can run it!\n\nYou can install the binary using `meson install` if you so wish. By default,\nit will be installed under `/usr/local`, but this can be changed by providing\ne.g. `meson setup build --prefix /usr/local`. See the\n[Meson guide](https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project)\nfor more.\n\nIf you cloned the repository you can later get the latest updates and recompile:\n\n        $ git pull\n        $ cd build \u0026\u0026 meson compile\n\nIf your Linux system has very little RAM (e.g. Raspberry Pi), please use the below\nline instead of `meson compile` to limit the number of build processes:\n\n        $ taskset -c 0 meson compile\n\nThe compilation will still require at least 500 MB of free RAM.\n\n## Usage\n\nRedsea reads an MPX signal from stdin by default. It expects the input\nto be raw 16-bit signed-integer PCM.\n\nHere's an example command that listens to 87.9 MHz using `rtl_fm` and displays\nthe RDS groups:\n\n```bash\nrtl_fm -M fm -l 0 -A std -p 0 -s 171k -g 20 -F 9 -f 87.9M | redsea -r 171k\n```\n\nPlease refer to the [wiki][Wiki: Use cases] for more details and usage examples.\n\n[Wiki: Use cases]: https://github.com/windytan/redsea/wiki/Use-cases\n\n\n### Full usage\n\n```\nradio_command | redsea [OPTIONS]\nredsea -f WAVEFILE\n\n-b, --input-bits       Same as --input bits (for backwards compatibility).\n\n-c, --channels CHANS   Number of channels in the raw input signal. Channels are\n                       interleaved streams of samples that are demodulated\n                       independently.\n\n-e, --feed-through     Echo the input signal to stdout and print decoded groups\n                       to stderr. This only works for raw PCM.\n\n-E, --bler             Display the average block error rate, or the percentage\n                       of blocks that had errors before error correction.\n                       Averaged over the last 12 groups. For hex input, this is\n                       the percentage of missing blocks.\n\n-f, --file FILENAME    Read MPX input from a wave file with headers (.wav,\n                       .flac, ...). If you have headered wave data via stdin,\n                       use '-'. Or you can specify another format with --input.\n\n-h, --input-hex        Same as --input hex (for backwards compatibility).\n\n-i, --input FORMAT     Decode input as FORMAT (see the redsea wiki in github\n                       for more info).\n                         bits Unsynchronized ASCII bit stream (011010110...).\n                              All characters but '0' and '1' are ignored.\n                         hex  RDS Spy hex format. (Timestamps will be ignored)\n                         mpx  MPX as raw mono S16LE PCM. Remember to also\n                              specify --samplerate. If you're reading from a\n                              sound file with headers (WAV, FLAC, ...) don't\n                              specify this.\n                         tef  Serial data from the TEF6686 tuner.\n\n-l, --loctable DIR     Load TMC location table from a directory in TMC Exchange\n                       format. This option can be specified multiple times to\n                       load several location tables.\n\n--no-fec               Disable forward error correction; always reject blocks\n                       with incorrect syndromes. In noisy conditions, fewer errors\n                       will slip through, but also fewer blocks in total; see wiki\n                       for discussion.\n\n-o, --output FORMAT    Print output as FORMAT:\n                         hex  RDS Spy hex format.\n                         json Newline-delimited JSON (default).\n\n-p, --show-partial     Under noisy conditions, redsea may not be able to fully\n                       receive all information. Multi-group data such as PS\n                       names, RadioText, and alternative frequencies are\n                       especially vulnerable. This option makes it display them\n                       even if not fully received, prefixed with partial_.\n\n-r, --samplerate RATE  Set sample frequency of raw PCM input in Hz. Will\n                       resample if this differs from 171000 Hz.\n\n-R, --show-raw         Include raw group data as hex in the JSON stream.\n\n-t, --timestamp FORMAT Add time of decoding to JSON groups; see man strftime\n                       for formatting options (or try \"%c\"). Use \"%f\" to add\n                       hundredths of seconds.\n\n-u, --rbds             RBDS mode; use North American program type names and\n                       \"back-calculate\" the station's call sign from its PI\n                       code. Note that this calculation gives an incorrect call\n                       sign for most stations that transmit TMC.\n\n-v, --version          Print version string and exit.\n\n-x, --output-hex       Same as --output hex (for backwards compatibility).\n```\n\n\n## Requirements\n\n### Runtime\n\n* Linux/macOS/Windows\n* For realtime decoding, a Raspberry Pi 1 or faster\n* libiconv 1.16\n* libsndfile 1.0.31\n* [liquid-dsp][liquid-dsp] release 1.3.2\n* nlohmann-json\n* `rtl_fm` (from [rtl-sdr](http://sdr.osmocom.org/trac/wiki/rtl-sdr)) or any\n   other source that can output demodulated FM multiplex signals\n\n[liquid-dsp]: https://github.com/jgaeddert/liquid-dsp/releases/tag/v1.3.2\n\n### Build\n\n* Linux/macOS/Cygwin/MSYS2+MinGW\n* C++14 compiler\n* meson + ninja\n* 500 MB of free memory for non-parallel build ([breakdown](https://github.com/windytan/redsea/issues/120#issuecomment-2559254338))\n\n### Testing\n\n* Catch2\n\n## Troubleshooting\n\n### Can't find liquid-dsp on macOS\n\nIf you've installed [liquid-dsp][liquid-dsp] yet meson can't find it, it's\npossible that XCode command line tools aren't installed. Run this command to fix\nit:\n\n    xcode-select --install\n\n### Can't find liquid-dsp on Linux\n\nTry running this in the terminal:\n\n    sudo ldconfig\n\n## Contributing\n\nWe welcome bug reports and documentation contributions. Or take a peek at our\n[open issues](https://github.com/windytan/redsea/issues) to see where we could use a hand. See\n[CONTRIBUTING](CONTRIBUTING.md) for more information.\n\nAlso, if a station in your area is transmitting an interesting RDS feature\nthat should be implemented in redsea, I would be happy to see a minute or\ntwo's worth of hex data using the `--output hex` switch. You could use a\ngist or an external pastebin service and post a link to it in our Github\nDiscussions.\n\n## Licensing\n\nRedsea is released under the MIT license, which means it is copyrighted to Oona\nRäisänen OH2EIQ yet you're free to use it provided that the copyright\ninformation is not removed. (iconvpp has its own license.) See LICENSE.\n\n**Note**: This software is not safety certified. Do not rely on it for emergency\ncommunication, accurate traffic / weather information, or life-critical situations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindytan%2Fredsea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindytan%2Fredsea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindytan%2Fredsea/lists"}