https://github.com/FoxxMD/nrsc5-rtlsdr-icecast
Based on sample-icecast-nrsc5 by zacs.
Use an RTL-SDR device to stream HD radio to an Icecast server or ENV-provided ffmpeg output.
If you do not already have an Icecast server setup I would recommend jeer/docker-icecast.
ghcr.io/foxxmd/nrsc5-rtlsdr-icecast
docker.io/foxxmd/nrsc5-rtlsdr-icecast
Images for x86/arm are built with optimized instruction sets (NEON/SSSE3).
docker build -t nrsc5 .Substitute nrsc5 for remote images (docker.io/ghcr.io) in documentation.
Image will be built with optimized instruction set (NEON/SSSE3) based on your host architecture.
Minimal run command example:
docker run -e "RADIO_STATION=90.1" -e "ICECAST_URL=192.168.1.10:8000/myradio" -e "ICECAST_PWD=icecastPass" --device /dev/bus/usb/005/006 ghcr.io/foxxmd/nrsc5-rtlsdr-icecast
Or use the docker-compose.yml example.
| Environmental Variable | Required | Default | Description |
|---|---|---|---|
RADIO_STATION | Yes | The radio station to tune to | |
CHANNEL | No | 1 | The HD channel on the radio station to tune in to |
RTL_TCP | No | Connect to rtl-tcp server instead of using hardware device. Syntax [HOST]:[PORT] -- EX 192.168.1.10:1234 | |
AUDIO_FORMAT | No | MP3 | Encode icecast stream to this format. Options: MP3, OGG, WAV |
ICECAST_URL | No | Icecast server and path to stream to IE => 192.168.1.10/myRadio | |
ICECAST_PWD | No | The Icecast server source password | |
FFMPEG_OUTPUT | No | Provide your own output args to ffmpeg rather than using icecast | |
STATS_INTERVAL | No | 0.5 | Interval, in seconds, ffmpeg outputs progress stats. Set to a high number to avoid noisy, non-interactive log output OR set to 0 to disable |
Along with ffmpeg stats the container will log changes to the program title.
Connect to a rtl_tcp server (dockerized example) by using the RTL_TCP ENV documented under usage.
Run lsusb to get a list of USB devices attached to your host. It will look like this:
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0032 Intel Corp. AX210 Bluetooth
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
...
Bus 005 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Look for your device, it usually has RTL or DVB-T in the name. Use the Bus and Device identifiers to build the path to your usb device. EX:
Bus 005 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
/dev/bus/usb/005/006
Pass this into your docker run command like this:
--device /dev/bus/usb/005/006
Alternatively, use --privileged to pass all host capabilities (not very secure) which will ensure your USB device is visible regardless of where it is.
Content type
Image
Digest
sha256:a2cf6c361…
Size
55.8 MB
Last updated
9 months ago
docker pull foxxmd/nrsc5-rtlsdr-icecast