An API and web application to interact with a running instance of RTL_FM
This is a Python library built upon the RTL-SDR project and allows you to use the RTL-SDR dongle to tune in arbitrary stations either with a simple web application running on a built-in server, or programmatically with Python or any language using the REST API provided.
I wanted a minimalist remote control for demodulated audio coming from the usb stick and something that could also provide that functionality on the Raspberry PI, or allow for control of multiple dongles through web scripting, VPNs and internet.
- Based on the rtl_fm utility from the RTL-SDR Project https://github.com/steve-m/librtlsdr
- Drop in replacement for rtl_fm
- Live web interface based on React http://facebook.github.io/react/ and Flask http://flask.pocoo.org/
- RESTful API
- Change frequency, demodulation, and gain while running
- Read the RMS signal level
- Interact with rtl_fm with Python
- HTML5 audio player
How to Build
Install the RTL-SDR software
Install Python dependencies for Flask
sudo pip install flask
Compile and link the modified rtm_fm source rtl_fm_python.c
If you have problems let me know. I may not be able to help as I'm not very experienced with building C applications.
- Change to your server ip in files web.sh and /static/index.html
- If your server is behind NAT open and forward tcp ports 10100 and 10101
- Install vlc
- Can crash, probably
- Works best if started with WBFM modulation and sample rates if you're going to be switching around demodulation.
- May get out of sync with the features of rtl_fm due to my time and interest. Pull requests accepted!
- Audio may delay 15 seconds in streaming
How to Run
Web Interface & API
Included is a script called web.sh that shows an example usage. This script tunes to a broadcast FM station and pipes the audio to vlc to transcode and stream.
The rtl-sdr team and community for being awesome. Th0ma5w, vlc