Last active
February 2, 2020 03:53
-
-
Save miguelmota/61e289c002396abdc8f817b9158ea0bb to your computer and use it in GitHub Desktop.
Play soma fm radio from command line
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
# using mpg321 player | |
curl -s http://ice1.somafm.com/defcon-128-mp3 2>&1 | mpg321 - | |
# using mpv player | |
curl -s http://ice1.somafm.com/defcon-128-mp3 2>&1 | mpv - | |
# using afplay player (preinstalled on mac osx). Note afplay doesn't support streaming so we create a file descriptor to stream to. | |
exec 3<> /tmp/file.mp3 && curl -s http://ice1.somafm.com/defcon-128-mp3 2>&1 | tee >&3 | (sleep 1; afplay /tmp/file.mp3) | |
# using ffplay player (preinstalled on fedora) | |
curl -s http://ice1.somafm.com/defcon-128-mp3 2>&1 | ffplay -nodisp - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment