Skip to content

Instantly share code, notes, and snippets.

@jeffmcneill
Forked from miguelmota/soma.sh
Last active July 26, 2025 07:28
Show Gist options
  • Select an option

  • Save jeffmcneill/20589a5b4ffd4e487e2672e3130188d9 to your computer and use it in GitHub Desktop.

Select an option

Save jeffmcneill/20589a5b4ffd4e487e2672e3130188d9 to your computer and use it in GitHub Desktop.
Play soma fm radio from command line
# using cvlc (command-line vlc player)
# currently works. The lines below are for archival and hint purposes
curl -s https://somafm.com/groovesalad.pls | cvlc -
# 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