deep5050 / radio-active

Play any radios around the globe right from the terminal :zap:
https://www.radio-browser.info/#/
MIT License
469 stars 24 forks source link

Support for other media players (e.g. VLC) #82

Closed robinhood2014 closed 6 months ago

robinhood2014 commented 9 months ago

I'd like this program to one day add support for other media players such as VLC, in that it passes a radio stream to that app. For example, it might call "vlc XXX", where XXX is the URL of the requested stream.

github-actions[bot] commented 9 months ago

Hi, @robinhood2014, Thanks for your contribution :blue_heart: . Contributors :people_holding_hands: like you make the open source community :earth_africa: such an amazing place to learn :book: , inspire :angel:, and create :art: . We will investigate :eyes: and get back to you as soon as possible :+1: . Just make sure you have given us sufficient information :information_source:.

By that time enjoy this meme :point_down: , hope you like it :smile:

meme

Use this action on your projects. Use jokes on issues instead.

ZaxonXP commented 9 months ago

Or choosing mpv as player would be already good alternative as mpv used IPC, so it can be controlled remotely.

robinhood2014 commented 8 months ago

I suppose I could just take the path to the stream -- i.e. https://example.com/path/to/stream -- and append it to an mpv command, such that mpv https://example.com/path/to/stream, and that's that. Of course, not all of us are as savvy with the command line as I am, so maybe we ought to consider adding support for mpv and other command-line audio players natively, such that this program is a frontend.

ZaxonXP commented 8 months ago

@robinhood2014: radioactive allows adding a station to favorite list, so you will have the stream URL. With that I am using my mpv.sh script to play it and control it with another script.

#!/bin/sh
$(which mpv) --input-ipc-server=/tmp/soc_mpv "$@"

Then I use my media buttons mapped to other script which allows play/pause operations:

#!/bin/sh
# play
echo '{ "command": ["set", "pause", "no"] }' | socat - /tmp/soc_mpv
#!/bin/sh
# pause
echo '{ "command": ["set", "pause", "yes"] }' | socat - /tmp/soc_mpv

The best would be to have some way to configure radioactive to allow external player command and also play and pause commands.

deep5050 commented 8 months ago

I'll work on this next week.

ZaxonXP commented 6 months ago

What about command line parameters for the autio players? Is there a way to pass them to the radioactive?