RTL_FM_PLAYER allows FM Stereo listening with TimeShift and Recording functions, using RTL DVB-T compatible USB dongles on Linux and Windows. TimeShift function can go back some minutes in time to listen your song again. 🎵 Use recording function save Stereo WAV files.
RTL FM Player is a small tool to listen FM stereo radio by using a compatible RTL DVB-T dongle. Is a console application that runs on Linux and Windows, all commands like changing stations and timeshifting is controlled by keyboard keys. Outputs stereo audio to soundcard using SDL library. Record stereo .wav file format.
- Runs on ANY Linux version (if compiled from source). 👍
- Runs on ANY Windows version (from XP to 11). 👍
The DVB-T dongle has to be based on the Realtek RTL2832U. See http://sdr.osmocom.org/trac/wiki/rtl-sdr for more RTL SDR details.
Or you can buy from Ebay, Aliexpress searching for "RTL SDR BLOG".
You need to install a new driver to use this dongle.
First time configuration, open a new terminal as root (sudo -s
or su
):
- Disable dvb_usb_rtl28xxu kernel driver:
cd /etc/modprobe.d/
gedit ban-rtl.conf
Type this line in the text file you created:
blacklist dvb_usb_rtl28xxu
Save and exit.
- Download project file rtl-sdr.rules and save as
/etc/udev/rules.d/10-rtl-sdr.rules
cd /etc/udev/rules.d/
wget -O 10-rtl-sdr.rules https://raw.githubusercontent.com/rafaelferrari0/rtl_fm_player/master/rtl-sdr.rules
- Install required libraries
apt-get install libusb-1.0 libsdl2-2.0
- Download a compiled RTL FM Player here: >> Releases << (Linux versions)
Tip
Or you can compile a new one, see below in Building section.
Reboot.
1. Download Zadig driver https://zadig.akeo.ie/
2. Plug in the RTL-SDR USB.
3. Run Zadig as administrator by right clicking it and choosing run as administrator.
4. Go to Options -> List all devices and make sure it is checked.
5. In the drop down box choose Bulk-In, Interface (Interface 0). This may also sometimes show up as something prefixed with “RTL28328U”. That choice is also valid.
6. Make sure that WinUSB is selected as the target driver and click on Replace Driver.
- Download a compiled RTL FM Player here: >> Releases << (Win32 or Win64 versions)
1. Download version **zadig_xp-2.2.exe** from https://zadig.akeo.ie/downloads/
2. Plug in the RTL-SDR USB. Windows XP does not have drivers for it, just proceed "New Hardware Wizard" window to the end.
3. Run Zadig.
4. Go to Options -> List all devices and make sure it is checked.
5. In the drop down box choose Bulk-In, Interface (Interface 0). This may also sometimes show up as something prefixed with “RTL28328U”. That choice is also valid.
6. Make sure that WinUSB is selected as the target driver and click on Replace Driver.
- Download a compiled RTL FM Player here: >> Releases << (Win32 versions)
On Linux open a console, extract one of the compiled release file, and type ./rtl_fm_player
On Windows just double click rtl_fm_player.exe
Type S
or W
to change frequency.
Use keyboard to control frequency, timeshift, mute and recording.
You can also open Command Prompt and type parameters manually:
C:\>rtl_fm_player.exe -h
./rtl_fm_player -h
Show all available parameters
rtl_fm_player -h
Start and tune to frequency in Hz
(97.7Mhz)
rtl_fm_player -f 97700000
Tune to frequency and record audio to FileName.wav
(Keyboard controls disabled)
rtl_fm_player -f 97700000 FileName.wav
On "modern" PCs (x86, x64) mono and stereo decoding should be possible easily. "Modern" is any processor from 2002 Year and UP. 😆
Latency increase as SDL2 audio queue becomes larger. Buffer cleared when changing stations or Timeshifting.
Note
Tested on Debian 10 "buster" and Debian 12 "bookworm"
- sudo
apt-get install cmake
- sudo
apt-get install libusb-1.0-0-dev
- sudo
apt-get install libsdl2-dev
- Extract this project source to any directory
- Enter subdirectory
[projectsourcedirectory]\build\linux
- Run:
./1st-cmake.sh
./2nd-make.sh
MinGW64 manual installation. You can install to any directory name without spaces in root drive, (eg: C:\MinGW64-RTL, D:\MinGWTemp). In this example we install to C:\MinGW64
Note
Target is 64bit, compiler is 64bit.
- Download latest mingw-w64 toolchain targeting architecture x86_64, win32 threads, seh exception
- Extract the mingw-w64 toolchain 7zip file to root directory, keeping the structure:
C:\mingw64\ \bin \etc ...
- Download CMake Windows win64-x64 Zip file (not the installer)
- Extract CMake Zip file inside
C:\MinGW64\CMake
directory, keeping the structure:C:\mingw64\cmake\ \cmake\bin \cmake\doc \cmake\man \cmake\share
- Download SDL2 Development Libraries for MinGW
- Extract SDL2 zip file
x86_64-w64-mingw32\lib\libSDL2.dll.a
toc:\mingw64\x86_64-w64-mingw32\lib\
- Extract SDL2 zip directory
x86_64-w64-mingw32\include\SDL2
toc:\mingw64\x86_64-w64-mingw32\include\SDL2
check the directory structure: C:\mingw64\x86_64-w64-mingw32\include\SDL2\ \SDL.h
Tip
Note the x86_64-w64-mingw32 folder name.
- Download libusb-1.0 7zip file
- Extract libusb-1.0 Zip
MinGW64\dll\libusb-1.0.dll.a
toc:\mingw64\x86_64-w64-mingw32\lib\
- Extract libusb-1.0 Zip
include\libusb-1.0\libusb.h
toc:\mingw64\x86_64-w64-mingw32\include\
- Extract this project source to any subdirectory below
c:\mingw64\
- Enter subdirectory
c:\mingw64\[projectsourcedirectory]\build\mingw64
- Run:
1st-cmake.bat
2nd-make.bat
- If successfull, compiled
rtl_fm_player.exe
will be on[projectsourcedirectory]\build\mingw64\src
subdirectory.- Copy SDL2 zip file
\x86_64-w64-mingw32\bin\SDL2.dll
tosrc
- Copy libusb-1.0 7zip file
\MinGW64\dll\libusb-1.0.dll
tosrc
- Copy SDL2 zip file
MinGW32 manual installation. You can install to any directory name without spaces in root drive, (eg: C:\MinGW32-RTL, D:\MinGWTemp). In this example we install to C:\MinGW32
Note
Target is 32bit, compiler is 32bit.
- Download latest mingw-w64 toolchain targeting architecture i686, win32 threads, dwarf exception
- Extract the mingw-w64 toolchain 7zip file to root directory, keeping the structure:
C:\mingw32\ \bin \etc ...
- Download CMake Windows win32-x86 Zip file (not the installer)
- Extract CMake zip file inside
C:\MinGW32\CMake
directory, keeping the structure:C:\mingw32\cmake\ \cmake\bin \cmake\doc \cmake\man \cmake\share
- Download SDL2 Development Libraries for MinGW
- Extract in SDL2 tar.gz, the file
i686-w64-mingw32\lib\libSDL2.dll.a
toc:\mingw32\i686-w64-mingw32\lib\
- Extract in SDL2 tar.gz, the folder
i686-w64-mingw32\include\SDL2
toc:\mingw32\i686-w64-mingw32\include\SDL2
check the directory structure: C:\mingw32\i686-w64-mingw32\include\SDL2\ \SDL.h
Tip
Note the i686-w64-mingw32 folder name.
- Download libusb-1.0 7zip file
- Extract in libusb-1.0 7zip, the file
\MinGW32\dll\libusb-1.0.dll.a
toc:\mingw32\i686-w64-mingw32\lib\
- Extract in libusb-1.0 7zip, the file
\include\libusb-1.0\libusb.h
toc:\mingw32\i686-w64-mingw32\include\
- Extract this project source to any subdirectory below
c:\mingw32\
- Enter subdirectory
c:\mingw32\[projectsourcedirectory]\build\mingw32
- Run:
1st-cmake.bat
2nd-make.bat
- If successfull, compiled
rtl_fm_player.exe
will be on[projectsourcedirectory]\build\mingw32\src
directory.- Copy SDL2 zip file
\i686-w64-mingw32\bin\SDL2.dll
tosrc
- Copy libusb-1.0 7zip file
\MinGW32\dll\libusb-1.0.dll
tosrc
- Copy SDL2 zip file
Using old MinGW installer for Win32
- Download mingw-get-setup https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/
- Install MinGW on
\MinGW
(C:, D: ...) with packagesmingw32-base-bin
andmingw32-pthreads-w32
- Install MinGW on
- Install CMake on
\MinGW\CMake
- Download http://libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz
- extract
(tar.gz file)\i686-w64-mingw32\lib\libSDL2.dll.a
to\MinGW\lib
- extract the folder
(tar.gz file)\i686-w64-mingw32\include\SDL2
to\MinGW\include\SDL2
(tar.gz file)\i686-w64-mingw32\bin\SDL2.dll will be requered when runing rtl_fm_streamer.exe
- extract
- Download https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.23/libusb-1.0.23.7z/download
- extract (7zip file)\MinGW32\dll\libusb-1.0.dll.a to \MinGW\lib
- extract (7zip file)\include\libusb-1.0\libusb.h to \MinGW\include
(7zip file)\MinGW32\dll\libusb-1.0.dll will be requered when runing rtl_fm_streamer.exe
- Extract this project source to any subdirectory below \MinGW\
- Enter subdirectory
[projectsourcedirectory]\build\mingw
- Run:
1st-cmake.bat
2nd-make.bat
-
This project is based on RTL SDR FM Streamer by Albrecht Lohoefener
-
RTL-SDR-BLOG library files from https://github.com/rtlsdrblog/rtl-sdr-blog
-
Libusb. A cross-platform library that gives apps easy access to USB devices
-
SDL. Simple DirectMedia Layer development library
- RTL SDR FM Streamer
- FM Radio receiver based upon RTL-SDR as pvr addon for KODI
- rtl_fm
- This tool is the base of rtl_fm_streamer
- http://sdr.osmocom.org/trac/wiki/rtl-sdr
- sdr-j-fmreceiver
- GPRX