https://github.com/theori-io/nrsc5 Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} theori-io / nrsc5 Public * Notifications * Fork 98 * Star 725 NRSC-5 receiver for rtl-sdr License View license 725 stars 98 forks Activity Star Notifications * Code * Issues 42 * Pull requests 1 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights theori-io/nrsc5 This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 4 branches 1 tag Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/t] Use Git or checkout with SVN using the web URL. [gh repo clone theori] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @argilo argilo Merge pull request #331 from argilo/remove-fftwf-cleanup ... 80ab64e Oct 8, 2023 Merge pull request #331 from argilo/remove-fftwf-cleanup Remove call to fftwf_cleanup 80ab64e Git stats * 466 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Temporarily disable Python tests on macOS December 8, 2022 23:04 doc Add Doxygen documentation for libnrsc5 API April 1, 2022 14:23 include Merge pull request #321 from theori-io/struct-api-compatibility July 9, 2023 20:57 src Remove call to fftwf_cleanup October 8, 2023 18:15 support Remove input length restrictions from pipe API October 7, 2023 18:59 .gitignore Add Python API. February 10, 2019 21:20 .travis.yml Update to a newer osx_image September 5, 2020 10:39 CMakeLists.txt Fix distortion with parametric stereo and re-enable parametric stereo September 12, 2022 22:48 LICENSE Public release June 9, 2017 17:46 README.md Merge pull request #296 from trs79/master April 10, 2023 21:11 nrsc5.rb Also require git for build June 13, 2017 12:02 View code [ ] nrsc5 Building on Ubuntu, Debian or Raspbian Building on Fedora Building on macOS using Homebrew Building for Windows Building on Windows with MSYS2 Cross-compiling for Windows from Ubuntu / Debian Cross-compiling for Windows from macOS Usage Command-line options: Examples: Keyboard commands: RTL-SDR drivers on Windows README.md nrsc5 This program receives NRSC-5 digital radio stations using an RTL-SDR dongle. It offers a command-line interface as well as an API upon which other applications can be built. Before using it, you'll first need to compile the program using the build instructions below. Building on Ubuntu, Debian or Raspbian $ sudo apt install git build-essential cmake autoconf libtool libao-dev libfftw3-dev librtlsdr-dev $ git clone https://github.com/theori-io/nrsc5.git $ cd nrsc5 $ mkdir build $ cd build $ cmake [options] .. $ make $ sudo make install $ sudo ldconfig Available build options: -DUSE_NEON=ON Use NEON instructions. [ARM, default=OFF] -DUSE_SSE=ON Use SSSE3 instructions. [x86, default=OFF] -DUSE_FAAD2=ON AAC decoding with FAAD2. [default=ON] -DLIBRARY_DEBUG_LEVEL=1 Debug logging level for libnrsc5. [default=5] -DBUILD_DOC=ON Generate html API documentation [default=OFF] You can test the program using the included sample capture: $ xz -d < ../support/sample.xz | src/nrsc5 -r - 0 Building on Fedora Follow the Ubuntu instructions above, but replace the first command with the following: $ sudo dnf install make patch cmake autoconf libtool libao-devel fftw-devel rtl-sdr-devel libusb-devel Building on macOS using Homebrew $ curl https://raw.githubusercontent.com/theori-io/nrsc5/master/nrsc5.rb > /tmp/nrsc5.rb $ brew install --HEAD -s /tmp/nrsc5.rb Building for Windows To build the program for Windows, you can either use MSYS2 on Windows, or else use a cross-compiler on an Ubuntu, Debian or macOS machine. Scripts are provided to help with both cases. Building on Windows with MSYS2 Install MSYS2. Open a terminal using the "MSYS2 MinGW 32-bit" shortcut. (Or use the 64-bit shortcut if you prefer a 64-bit build.) $ pacman -Syu If this is the first time running pacman, you will be told to close the terminal window. After doing so, reopen using the same shortcut as before. $ pacman -Su $ pacman -S git $ git clone https://github.com/theori-io/nrsc5.git $ nrsc5/support/msys2-build You can test your installation using the included sample file: $ cd ~/nrsc5/support $ xz -d sample.xz $ nrsc5.exe -r sample 0 If the sample file does not work, make sure you followed all of the instructions. If it still doesn't work, file an issue with the error message. Please put "[Windows]" in the title of the issue. Once everything is built, you can run nrsc5 independently of MSYS2. Copy the following files from your MSYS2/mingw32 directory (e.g. C:\ msys64\mingw32\bin): * libnrsc5.dll * nrsc5.exe Cross-compiling for Windows from Ubuntu / Debian $ sudo apt install mingw-w64 $ support/win-cross-compile 32 Replace 32 with 64 if you want a 64-bit build. Once the build is complete, copy *.dll and nrsc5.exe from the build-win32/bin (or build-win64/bin) folder to your Windows machine. Cross-compiling for Windows from macOS $ brew install mingw-w64 $ support/win-cross-compile 32 Replace 32 with 64 if you want a 64-bit build. Once the build is complete, copy *.dll and nrsc5.exe from the build-win32/bin (or build-win64/bin) folder to your Windows machine. Usage Command-line options: frequency center frequency in MHz or Hz (do not provide frequency when reading from file) program audio program to decode (0, 1, 2, or 3) -g gain gain (example: 49.6) (automatic gain selection if not specified) -d device-index rtl-sdr device -p ppm-error rtl-sdr ppm error -H rtltcp-host rtl_tcp host with optional port (example: localhost:1234) -r iq-input read IQ samples from input file -w iq-output write IQ samples to output file -o audio-output write audio to output file -t audio-type type of audio output (wav or raw) (default is wav. used in conjunction with -o) -q disable log output -l log-level set log level (1 = DEBUG, 2 = INFO, 3 = WARN) -v print the version number and exit --am receive AM signals (default is FM) -T enable bias-T -D direct-sampling-mode enable direct sampling (1 = I-ADC input, 2 = Q-ADC input) --dump-aas-files dir-name dump AAS files (WARNING: insecure) --dump-hdc file-name dump HDC packets Examples: Tune to 107.1 MHz and play audio program 0: $ nrsc5 107.1 0 Tune to 107.1 MHz and play audio program 0. Manually set gain to 49.0 dB and save raw IQ samples to a file: $ nrsc5 -g 49.0 -w samples1071 107.1 0 Read raw IQ samples from a file and play back audio program 0: $ nrsc5 -r samples1071 0 Tune to 90.5 MHz and convert audio program 0 to WAV format for playback in an external media player: $ nrsc5 -o - 90.5 0 | mplayer - Keyboard commands: To switch between audio programs at runtime, press 0 through 7. To quit, press Q. RTL-SDR drivers on Windows If you get errors trying to access your RTL-SDR device, then you may need to use Zadig to change the USB driver. Once you download and run Zadig, select your RTL-SDR device, ensure the driver is set to WinUSB, and then click "Replace Driver". If your device is not listed, enable "Options" -> "List All Devices". About NRSC-5 receiver for rtl-sdr Resources Readme License View license Activity Stars 725 stars Watchers 45 watching Forks 98 forks Report repository Releases 1 tags Packages 0 No packages published Contributors 13 * @argilo * @awesie * @icb- * @cjbarker * @davide125 * @logiconcepts819 * @supersat * @japm48 * @trs79 * @KeyserSoze1 * @MikeRich88 + 2 contributors Languages * C 85.4% * Python 9.9% * CMake 4.1% * Other 0.6% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.