jueves, 11 de febrero de 2021

Radios en internet -Desde terminal bash - Linux

Radios en internet
Desde terminal bash
Linux


Navegando por internet encontré este serie de comandos bash para oír radios de internet desde un terminal, https://www.ubuntu-user.com/Magazine/Archive/2014/20/Playing-streams-off-the-web-with-FFplay.
He añadido algunas emisoras españolas como modelo.
radio.sh
!/bin/bash

declare -A STATION

STATION["RNE"]="http://rne.rtveradio.cires21.com/rne/mp3/icecast.audio"
STATION["RNE3"]="http://radio3.rtveradio.cires21.com/radio3.mp3"
STATION["RNE4"]="http://radio4.rtveradio.cires21.com/radio4.mp3"
STATION["RNE5"]="http://radio5.rtveradio.cires21.com/radio5/mp3/icecast.audio"
STATION["RNE_CLA"]="http://radioclasica.rtveradio.cires21.com/radioclasica/mp3/icecast.audio"
STATION["RNE5_EXT"]="http://radioexterior.rtveradio.cires21.com/radioexterior/mp3/icecast.audio"
STATION["kissfm"]="http://kissfm.kissfmradio.cires21.com/kissfm.mp3"
STATION["hitfm"]="http://hitfm.kissfmradio.cires21.com/hitfm.mp3"
STATION["CADENADIAL"]="http://playerservices.streamtheworld.com/api/livestream-redirect/CADENADIAL.mp3"
STATION["RADIOLE"]="http://playerservices.streamtheworld.com/api/livestream-redirect/RADIOLE.mp3"
STATION["KEBUENA_ES"]="http://playerservices.streamtheworld.com/api/livestream-redirect/KEBUENA_ES.mp3"
STATION["Los40"]="http://playerservices.streamtheworld.com/api/livestream-redirect/Los40.mp3"
STATION["CadenaSer"]="http://playerservices.streamtheworld.com/api/livestream-redirect/CADENASER.mp3"
STATION["OndaCero"]="http://icecast-streaming.nice264.com/ondacero"
STATION["esRadio"]="http://livestreaming3.esradio.fm/stream64.mp3"
STATION["COPE"]="http://flucast-b05-05.flumotion.com/cope/net1.mp3"
STATION["RockFM"]="http://flucast-m04-03.flumotion.com/cope/rockfm.mp3"

clear
echo "Selecciona la radio:"

select ENTRY in "${!STATION[@]}"; do
   TITLE="${ENTRY}"
   URL=${STATION[${ENTRY}]}
   echo "Seleccionada Radio->" $URL
   ffplay -x 300 -y 100 -window_title "${TITLE}" ${URL} &>/dev/null
   echo "Selecciona la radio:"
done



Saludos.
Juan Galaz

No hay comentarios:

Publicar un comentario