l-wegner / radio-active

Play any radios around the globe right from the terminal :zap:

Home Page:https://www.radio-browser.info/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RADIOACTIVE

SEARCH - PLAY - RECORD - REPEAT

Play and record any radio stations around the globe right from your terminal

radio-active - Play more than 30K radio stations from your terminal | Product Hunt

UPI


GitHub PyPI PyPI - Downloads CodeFactor Grade Discord

YouTube Video Likes and Dislikes

Join Discord Server

Features

  • Supports more than 40K stations !! 📻
  • Saves last station information
  • Favorite stations (Aliasing) ❤️
  • Selection menu for favorite stations
  • Supports user-added stations 🔧
  • Looks minimal and user-friendly
  • Runs on Raspberry Pi
  • Finds nearby stations
  • Discovers stations by genre
  • Discovers stations by language
  • Record audio from live radio on demand ⚡
  • I'm feeling lucky! Play Random stations

See my progress here

Install

Just run: pip3 install --upgrade radio-active

External Dependency

It needs FFmpeg to be installed on your system in order to play the audio

on Ubuntu-based system >= 20.04 Run

sudo apt update
sudo apt install ffmpeg

For other systems including Windows see the above link

Installing FFmpeg

FFmpeg is required for this program to work correctly. Install FFmpeg by following these steps:-

Run

Search a station with radio --search [STATION_NAME] or simply radio ⚡ to select from the favorite menu.

Tips

  1. Use a modern terminal emulator, otherwise the UI might break! (gets too ugly sometimes)
  2. On Windows, instead of the default Command Prompt, use the new Windows Terminal or web-based emulators like Hyper, Cmdr, Terminus, etc. for better UI
  3. Let the app run for at least 5 seconds (not a serious issue though, for better performance)

Demo

Options

Argument Note Description Default
--search, -S Required (Optional from second run) Station name None
--play, -P Optional A station from fav list or url for direct play None
--last Optional Play last played station False
--uuid, -U Optional ID of the station None
--loglevel Optional Log level of the program Info
--add , -A Optional Add an entry to fav list False
--list, -W Optional Show fav list False
--favorite, -F Optional Add current station to fav list False
--flush Optional Remove all the entries from fav list False
--country, -C Optional Discover stations by country code False
--state Optional Discover stations by country state False
--tag Optional Discover stations by tags/genre False
--language optional Discover stations by False
--limit Optional Limit the # of results in the Discover table 100
--volume , -V Optional Change the volume passed into ffplay 80
--kill , -K Optional Kill background radios. False
--record , -R Optional Record a station and save to file False
--filename, -N Optional Filename to used to save the recorded audio None
--filepath Optional Path to save the recordings <DEFAULT_DIR>
--filetype, -T Optional Format of the recording (mp3/auto) mp3

--search, -S: Search for a station online.

--play, -P: You can pass an exact name from your favorite stations or alternatively pass any direct stream URL. This would bypass any user selection menu (useful when running from another script)

--uuid,-U: When station names are too long or confusing (or multiple results for the same name) use the station's uuid to play. --uuid gets the greater priority than --search. Example: 96444e20-0601-11e8-ae97-52543be04c81. type u on the runtime command to get the UUID of a station.

--loglevel,: Don't need to specify unless you are developing it. info, warning, error, debug

-F: Add the current station to your favorite list. Example: -F my_fav_1

-A: Add any stations to your list. You can add stations that are not currently available on our API. When adding a new station enter a name and direct URL to the audio stream.

--limit: Specify how many search results should be displayed.

--filetype: Specify the extension of the final recording file. default is mp3. you can provide -T auto to autodetect the codec and set file extension accordingly (in original form).

DEFAULT_DIR: is /home/user/Music/radioactive

Runtime Commands

Input a command during the radio playback to perform an action. Available commands are:

Enter a command to perform an action: ?

q/Q/quit: Quit radioactive
h/H/help/?: Show this help message
r/R/record: Record a station
f/F/fav: Add station to favorite list
rf/RF/recordfile: Specify a filename for the recording.

Bonus Tips

  1. when using rf: you can force the recording to be in mp3 format by adding an extension to the file name. Example "talk-show.mp3". If you don't specify any extension it should auto-detect. Example "new_show"

  2. You don't have to pass the exact option name, a portion of it will also work. for example --sea for --search, --coun for --country, --lim for --limit

  3. It's better to leave the --filetype as mp3 when you need to record something quickly. The autocodec takes a few milliseconds extra to determine the codec.

Changes

see CHANGELOG

Community

Share you favorite list with our community 🌐 ➡️ Here

Your favorite list .radio-active-alias is under your home directory as a hidden file :)

Support

Visit my contribution page for more payment options.

Buy Me A Coffee

Acknowledgements

Icons made by Freepik from www.flaticon.com

Happy Listening

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Joe Smith
Joe Smith

⚠️ 💻 🤔
salehjafarli
salehjafarli

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Play any radios around the globe right from the terminal :zap:

https://www.radio-browser.info/#/

License:MIT License


Languages

Language:Python 96.6%Language:Makefile 3.4%