Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deep5050/radio-active
Play any radios around the globe right from the terminal :zap:
https://github.com/deep5050/radio-active
audio cli commandline-interface favorite-station music music-bot music-player online-radio pyradio pyradios radio radios stations stream-processing streaming
Last synced: 6 days ago
JSON representation
Play any radios around the globe right from the terminal :zap:
- Host: GitHub
- URL: https://github.com/deep5050/radio-active
- Owner: deep5050
- License: mit
- Created: 2021-04-27T05:18:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T16:06:45.000Z (2 months ago)
- Last Synced: 2024-10-01T08:40:12.585Z (about 1 month ago)
- Topics: audio, cli, commandline-interface, favorite-station, music, music-bot, music-player, online-radio, pyradio, pyradios, radio, radios, stations, stream-processing, streaming
- Language: Python
- Homepage: https://www.radio-browser.info/#/
- Size: 675 KB
- Stars: 495
- Watchers: 7
- Forks: 25
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-cli-apps - radio-active - Internet radio player with 40k+ stations. (Entertainment / Music)
- fucking-awesome-cli-apps - radio-active - Internet radio player with 40k+ stations. (Entertainment / Music)
- starred - deep5050/radio-active - Play any radios around the globe right from the terminal :zap: (Python)
README
# Demo
### Features
- [x] Supports more than 40K stations !! :radio:
- [x] Record audio from live radio on demand :zap:
- [x] Get song information on run-time 🎶
- [x] Saves last station information
- [x] Favorite stations :heart:
- [x] Selection menu for favorite stations
- [x] Supports user-added stations :wrench:
- [x] Looks minimal and user-friendly
- [x] Runs on Raspberry Pi
- [x] Finds nearby stations
- [x] Discovers stations by genre
- [x] Discovers stations by language
- [x] VLC, MPV player support
- [x] Default config file
- [ ] I'm feeling lucky! Play Random stations> See my progress ➡️ [here](https://github.com/users/deep5050/projects/5)
### Why radioactive?
While there are various CLI-based radio players like [PyRadio](https://github.com/coderholic/pyradio) and [TERA](https://github.com/shinokada/tera), Radioactive stands out for its simplicity. It's designed to work seamlessly right from the start. You don't need to be a hardcore Linux or Vim expert to enjoy radio stations with Radioactive. The goal of Radioactive is to offer a straightforward user interface that's easy to grasp and comes preconfigured, without unnecessary complexities.
### In the Spotlight
The praise from YouTube channels and blogs underscores Radioactive's emergence as a top choice for radio enthusiasts. Its simple yet powerful features, make it a must-try application for radio lovers of all expertise levels. Discover the world of radio with ease – experience Radioactive today.
1. See DistroTube YouTube channel talks about my app: https://www.youtube.com/watch?v=H7sf1RDFXpU&pp=ygUYcmFkaW9hY3RpdmUgcGxheWVyIHJhZGlv
2. Ubunlog: https://ubunlog.com/en/radio-activate-an-application-to-listen-to-the-radio-from-the-terminal/
3. LinuxLinks: https://www.linuxlinks.com/radio-active-listen-radio-terminal/3/
4. Official entry in the RadioBrowser API: [https://www.radio-browser.info/users](https://www.radio-browser.info/users#:~:text=Sources-,radio%2Dactive,-Sources)
5. ThingsAndStuff: https://wiki.thingsandstuff.org/Streaming#:~:text=com/billniakas/bash_radio_gr-,radio%2Dactive,-https%3A//github.com
6. Awesome-stars: https://arbal.github.io/awesome-stars/#:~:text=deep5050/radio%2Dactive%20%2D%20Play%20any%20radios%20around%20the%20globe%20right%20from%20the%20terminal%20%3Azap%3A
7. OpenSourceAgenda: https://www.opensourceagenda.com/projects/my-awesome-stars#:~:text=deep5050/radio%2Dactive%20%2D%20Play%20any%20radios%20around%20the%20globe%20right%20from%20the%20terminal%20%3Azap%3A### Install
Simply run: `pip3 install --upgrade radio-active`
I recommend installing it using `pipx install radio-active`
#### TODO:
- [ ] Create deb, rpm and exe packages
- [ ] Add it to various Linux distribution package repositories.
- [ ] Add to scoop, chocolately### External Dependency
It needs [FFmpeg](https://ffmpeg.org/download.html) to be installed on your
system in order to record the audioon 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:-
- On Linux -
- On Windows -### Run
Search a station with `radio --search [STATION_NAME]` or simply `radio` :zap: 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
| Options | Note | Description | Default | Values |
| ------------------ | -------- | ---------------------------------------------- | ------------- | ---------------------- |
| (No Option) | Optional | Select a station from menu to play | False | |
| `--search`, `-S` | Optional | Station name | None | |
| `--play`, `-P` | Optional | A station from fav list or url for direct play | None | |
| `--country`, `-C` | Optional | Discover stations by country code | False | |
| `--state` | Optional | Discover stations by country state | False | |
| `--language` | optional | Discover stations by | False | |
| `--tag` | Optional | Discover stations by tags/genre | False | |
| `--uuid`, `-U` | Optional | ID of the station | None | |
| `--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 | | |
| `--filetype`, `-T` | Optional | Format of the recording | mp3 | `mp3`,`auto` |
| `--last` | Optional | Play last played station | False | |
| `--random` | Optional | Play a random station from favorite list | False | |
| `--sort` | Optional | Sort the result page | votes | |
| `--filter` | Optional | Filter search results | None | |
| `--limit` | Optional | Limit the # of results in the Discover table | 100 | |
| `--volume` , `-V` | Optional | Change the volume passed into ffplay | 80 | [0-100] |
| `--favorite`, `-F` | Optional | Add current station to fav list | False | |
| `--add` , `-A` | Optional | Add an entry to fav list | False | |
| `--list`, `-W` | Optional | Show fav list | False | |
| `--remove` | Optional | Remove entries from favorite list | False | |
| `--flush` | Optional | Remove all the entries from fav list | False | |
| `--kill` , `-K` | Optional | Kill background radios. | False | |
| `--loglevel` | Optional | Log level of the program | Info | `info`, `warning`, `error`, `debug` |
| `--player` | Optional | Media player to use | ffplay | `vlc`, `mpv`, `ffplay` |
> [!NOTE]
> Once you save/play at least one station, invoking `radio` without any options will show a selection menu> `--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: ?t/T/track: Current song name (track info)
r/R/record: Record a station
f/F/fav: Add station to favorite list
rf/RF/recordfile: Specify a filename for the recording.
h/H/help/?: Show this help message
q/Q/quit: Quit radioactive
```### Sort Parameters
you can sort the result page with these parameters:
- `name` (default)
- `votes` (based on user votes)
- `codec`
- `bitrate`
- `lastcheckok` (active stations)
- `lastchecktime` (recent active)
- `clickcount` (total play count)
- `clicktrend` (currently trending stations)
- `random`### Filter Parameters
Filter search results with `--filter`. Some possible expressions are
- `--filter "name=shows"`
- `--filter "name=shows,talks,tv"`
- `--filter "name!=news,shows"`
- `--filter "country=in"`
- `--filter "language=bengali,nepali"`
- `--filter "bitrate>64"`
- `--filter "votes<500"`
- `--filter "codec=mp3"`
- `--filter "tags!=rock,pop"`Allowed operators are:
- `=`
- `,`
- `!=`
- `>`
- `<`
- `&`Allowed keys are: `name`, `country` (countrycode as value), `language`, `bitrate`, `votes`, `codec`, `tags`
Provide multiple filters at one go, use `&`
A complex filter example: `--filter "country!=CA&tags!=islamic,classical&votes>500"`
> [!NOTE]
> set `--limit` to a higher value while filtering results### Default Configs
Default configuration file is added into your home directory as `.radio-active-configs.ini`
```bash
[AppConfig]
loglevel = info
limit = 100
sort = votes
filter = none
volume = 80
filepath = /home/{user}/recordings/radioactive/
filetype = mp3
player = ffplay
```> [!WARNING]
> Do NOT modify the keys, only change the values. you can give any absolute or relative path as filepath.### 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](./CHANGELOG.md)
### Community
Share you favorite list with our community 🌐 ➡️ [Here](https://github.com/deep5050/radio-active/discussions/10)
> Your favorite list `.radio-active-alias` is under your home directory as a hidden file :)
### Support
Visit my contribution page for more payment options.
### Acknowledgements
Happy Listening
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Joe Smith
⚠️ 💻 🤔
salehjafarli
💻
marvoh
💻 🐛
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
![Alt](https://repobeats.axiom.co/api/embed/753765f73315fcacbddcacbabc672771d939ebcb.svg "Repobeats analytics image")