Streaming RTL-SDR over HTTP
Realtek makes a $20 USB software-defined radio tuner device called an RTL2832U, also known as an rtl-sdr. This chip was originally used in European TV tuners, but all kinds of demodulation are available in software. Mine has a frequency range of 48 MHz to 863 MHz but the range varies between models.
I’ve been using the amazing GQRX graphical program to browse frequencies as well as the rtl-fm command-line utilities which use way less processing power. On my low-power netbook, rtl-fm runs pretty much smoothly, and GQRX stutters some.
The examples on the rtl-fm page show how to pipe audio data to your speakers, but what I had wanted was to stream this data over my network. This is the solution I came up with, using shell scripts.
I used LAME for mp3 encoding,
and VLC for streaming.
The settings used here are 320 kB/s and port 8080.
I put these aliases into streaming.sh
:
I also put some local station shortcuts in there:
To listen to WXJ87, for example, you could run:
Now you can use a media player to play your stream at http://localhost:8080
.