Last active
March 6, 2016 03:39
-
-
Save Barteks2x/d70e96d7b0e6be91ba89 to your computer and use it in GitHub Desktop.
A simple linux "play and record" online radio command that uses mplayer. You may want to create "radio" (sh) with this: screen -A -m -d -S "radio" "radiocmd" so that it starts that in a screen session. In this example it plays radiozet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir ~/radio || true | |
#change to other online radio? | |
RADIO_NAME=radiozet | |
NAME=~/radio/$RADIO_NAME-$(date).mp3 | |
LINK_TO_RADIO=http://radiozetmp3-07.eurozet.pl:8400/ | |
mplayer $LINK_TO_RADIO -dumpstream -dumpfile "$NAME" -vc dummy -vo null & | |
sleep 2 | |
mplayer -vo null "$NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment