Provides an ability to play any AM/FM radio station in your browser or any RTMP-supported player, like VLC.
When using browser client, it allows to switch to a station from a predefined list (configured on server side), as well as seeking to any other FM/AM frequency.
- An SDR dongle on RTL2832 chip, like rtl-sdr.com (tested), or HackRF, BladeRF, or any other, compatible with rtl_fm.
- Node 16+ installed on your system
- Linux or macOS system
- Installed
ffmpeg
(brew install ffmpeg
on OSX andapt install ffmpeg
on Ubuntu/Debian) - Installed
rtl_fm
binary (brew install librtlsdr
on OSX andapt install rtl-sdr
on Ubuntu/Debian)
- Clone the repo:
git clone https://github.com/matrunchyk/fm-radio
- Install dependencies:
npm install
- Run server:
npm run server
After this step you can already test the server using RTMP-supported player, like VLC by opening a network stream at the following address: rtp://127.0.0.1:1234
- Run client:
npm run server
Now, open your client application in a browser at the http://127.0.0.1:8080/ URL.
Enjoy!
To define station names and their frequencies, simply edit packages/fm-radio-server/src/config/configuration.ts
file and update stations
property in the following format:
stations: {
88.7: 'Lux FM & Radio Maximum',
89.8: 'FM Galychyna',
106.2: 'Hit FM',
},