An API and web application to interact and listen a running instance of RTL_FM thru internet
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead of th0ma5w:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
convenience
getopt
static
.gitignore
LICENSE
README.md
build.sh
rtl_fm.c
rtl_fm_python.c
rtl_fm_python_common.py
rtl_fm_python_thread.py
rtl_fm_python_web.py
start_web.sh
web.sh

README.md

rtl_fm_python

An API and web application to interact with a running instance of RTL_FM

Screenshot
and with html5 audio player
Screenshot

What

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.

Why

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.

Features

License

GPLv2

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

    ./build.sh

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

Issues

  • 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.

By default the application should be running at http://127.0.0.1:10100/ and the audio stream (ogg) at http://127.0.0.1:10101/

REST API

See https://github.com/th0ma5w/rtl_fm_python

Thanks

The rtl-sdr team and community for being awesome. Th0ma5w, vlc