Skip to content

Instantly share code, notes, and snippets.

@sergev
Last active October 28, 2024 17:43
Show Gist options
  • Save sergev/67110c3f7c0f5baf5ea34864afcee72e to your computer and use it in GitHub Desktop.
Save sergev/67110c3f7c0f5baf5ea34864afcee72e to your computer and use it in GitHub Desktop.
Listen radio from command line (Linux or Mac OS X)
#!/bin/bash
#
# Start radio broadcast from one of listed stations.
#
declare -a list=(
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
"BBC Radio 1: Contemporary Hits"
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_two/bbc_radio_two.isml/bbc_radio_two-audio%3d96000.norewind.m3u8
"BBC Radio 2: Adult Contemporary"
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_three/bbc_radio_three.isml/bbc_radio_three-audio%3d96000.norewind.m3u8
"BBC Radio 3: Classical, jazz"
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_fourfm/bbc_radio_fourfm.isml/bbc_radio_fourfm-audio%3d96000.norewind.m3u8
"BBC Radio 4: News, talk"
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_world_service/bbc_world_service.isml/bbc_world_service-audio%3d96000.norewind.m3u8
"BBC World Service English News"
https://hls.kqed.org/kqed-iheart/playlist.m3u8
"KQED Public Radio"
https://playerservices.streamtheworld.com/pls/KDFCFMAAC.pls
"KDFC Classical"
https://an04.cdn.eurozet.pl/ant-web.mp3
"Antyradio Warszawa"
http://stream.radioparadise.com/rock-flac
"Radio Paradise Rock FLAC"
https://streaming.exclusive.radio/er/pinkfloyd/icecast.audio
"Exclusively Pink Floyd"
https://streaming.exclusive.radio/er/mikeoldfield/icecast.audio
"Exclusively Mike Oldfield"
https://streaming.exclusive.radio/er/ericclapton/icecast.audio
"Exclusively Eric Clapton"
https://stream.pcradio.ru/akvarium-hi
"Радио Аквариум"
)
exec 3>&1
url=`${DIALOG:-dialog} 2>&1 1>&3 \
--no-tags \
--title " Radio " \
--menu "Choose Station:" 0 40 13 "${list[@]}"`
killall audacious && sleep 1
if [ -n "$url" ]; then
audacious "$url" &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment