Aus einer Vorlage habe ich ein Internetradio "gebaut". Datei ausführbar machen und Sender per Nr. wählen.
#!/bin/bash
declare -A SENDER
SENDER["Antenne 1"]="http://stream.antenne1.de/stream2/livestream.mp3"
SENDER["1 Live"]="http://1live.akacast.akamaistream.net/7/706/119434/v1/gnl.akacast.akamaistream.net/1live"
SENDER["Antenne Bayern"]="http://mp3.webradio.antenne.de"
SENDER["Antenne top40"]="http://mp3channels.webradio.antenne.de/top-40"
SENDER["Bayern 1"]="http://br-mp3-bayern1obb-m.akacast.akamaistream.net/7/273/142690/v1/gnl.akacast.akamaistream.net/br_mp3_bayern1obb_m"
SENDER["Bayern 3"]="http://br-mp3-bayern3-m.akacast.akamaistream.net/7/442/142692/v1/gnl.akacast.akamaistream.net/br_mp3_bayern3_m"
SENDER["Bayern 5"]="http://br-mp3-b5aktuell-m.akacast.akamaistream.net/7/779/142694/v1/gnl.akacast.akamaistream.net/br_mp3_b5aktuell_m"
SENDER["Bayern Klassik"]="http://br-mp3-br-klassik-m.akacast.akamaistream.net/7/120/142693/v1/gnl.akacast.akamaistream.net/br_mp3_br-klassik_m"
SENDER["big FM"]="http://srv05.bigstreams.de/bigfm-mp3-96"
SENDER["Bremen 1"]="http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w48a"
SENDER["Das Ding"]="http://swr-mp3-m-dasding.akacast.akamaistream.net/7/588/137139/v1/gnl.akacast.akamaistream.net/swr-mp3-m-dasding"
SENDER["detector FM"]="http://detektor.fm/stream/mp3/musik"
SENDER["DLF"]="http://stream.dradio.de/7/249/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_m"
SENDER["Deutschlandfunk"]="http://dradio_mp3_dlf_m.akacast.akamaistream.net/7/249/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_m"
SENDER["Deutschlandradio Wissen"]="http://dradio_mp3_dwissen_m.akacast.akamaistream.net/7/728/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dwissen_m"
SENDER["Deutschlandradio Kultur"]="http://dradio_mp3_dkultur_m.akacast.akamaistream.net/7/530/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dkultur_m"
SENDER["Hitradio Antenne"]="http://stream.antenne.com/hra-nds/mp3-128/MDADevice/"
SENDER["Hellweg Radio"]="http://87.118.64.215:8080/"
SENDER["Radio Berlin"]="http://rbb.ic.llnwd.net/stream/rbb_radioberlin_mp3_m_b"
SENDER["Musicalradio"]="http://mp3.musicalradio.de/musicalradio.mp3"
SENDER["hr 1"]="http://hr-mp3-m-h1.akacast.akamaistream.net/7/783/142131/v1/gnl.akacast.akamaistream.net/hr-mp3-m-h1"
SENDER["hr 3"]="http://hr-mp3-m-h3.akacast.akamaistream.net/7/785/142133/v1/gnl.akacast.akamaistream.net/hr-mp3-m-h3"
SENDER["kiss FM"]="http://stream.kissfm.de/kissfm/mp3-128/internetradio/"
SENDER["Klassikradio"]="http://edge.live.mp3.mdn.newmedia.nacamar.net/klassikradio128/livestream.mp3"
SENDER["Radio ffh"]="http://mp3.ffh.de/radioffh/hqlivestream.mp3"
SENDER["SWR 1"]="http://swr-mp3-m-swr1bw.akacast.akamaistream.net/7/245/137133/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr1bw"
SENDER["SWR 2"]="http://swr-mp3-m-swr2.akacast.akamaistream.net/7/721/137135/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr2"
SENDER["SWR 3"]="http://swr-mp3-m-swr3.akacast.akamaistream.net/7/720/137136/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr3"
SENDER["SWR 4"]="http://swr-mp3-m-swr4bw.akacast.akamaistream.net/7/426/137137/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr4bw"
SENDER["Radio eins"]="http://rbb.ic.llnwd.net/stream/rbb_radioeins_mp3_m_a"
SENDER["Rock Antenne"]="http://mp3.webradio.rockantenne.de:80"
SENDER["Top 100"]="http://87.230.101.12/"
SENDER["WDR 2"]="http:/wdr-mp3-m-wdr2-koeln.akacast.akamaistream.net/7/812/119456/v1/gnl.akacast.akamaistream.net/wdr-mp3-m-wdr2-koeln"
SENDER["WDR 4"]="http:/wdr-4.akacast.akamaistream.net/7/42/119438/v1/gnl.akacast.akamaistream.net/wdr-4"
clear
echo "Sender waehlen"
select ENTRY in "${!SENDER[@]}"; do
TITLE=${ENTRY}
echo "play ${TITLE}"
URL=${SENDER[${ENTRY}]}
mplayer ${URL}
done
Aufnahme ist mit ffmpeg möglich.
Zweitletzte Zeile ersetzen durch
ffmpeg -i ${URL} -acodec copy record.mp3
das Ergebnis landet in record.mp3
Viel Spaß
Joachim
#!/bin/bash
declare -A SENDER
SENDER["Antenne 1"]="http://stream.antenne1.de/stream2/livestream.mp3"
SENDER["1 Live"]="http://1live.akacast.akamaistream.net/7/706/119434/v1/gnl.akacast.akamaistream.net/1live"
SENDER["Antenne Bayern"]="http://mp3.webradio.antenne.de"
SENDER["Antenne top40"]="http://mp3channels.webradio.antenne.de/top-40"
SENDER["Bayern 1"]="http://br-mp3-bayern1obb-m.akacast.akamaistream.net/7/273/142690/v1/gnl.akacast.akamaistream.net/br_mp3_bayern1obb_m"
SENDER["Bayern 3"]="http://br-mp3-bayern3-m.akacast.akamaistream.net/7/442/142692/v1/gnl.akacast.akamaistream.net/br_mp3_bayern3_m"
SENDER["Bayern 5"]="http://br-mp3-b5aktuell-m.akacast.akamaistream.net/7/779/142694/v1/gnl.akacast.akamaistream.net/br_mp3_b5aktuell_m"
SENDER["Bayern Klassik"]="http://br-mp3-br-klassik-m.akacast.akamaistream.net/7/120/142693/v1/gnl.akacast.akamaistream.net/br_mp3_br-klassik_m"
SENDER["big FM"]="http://srv05.bigstreams.de/bigfm-mp3-96"
SENDER["Bremen 1"]="http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w48a"
SENDER["Das Ding"]="http://swr-mp3-m-dasding.akacast.akamaistream.net/7/588/137139/v1/gnl.akacast.akamaistream.net/swr-mp3-m-dasding"
SENDER["detector FM"]="http://detektor.fm/stream/mp3/musik"
SENDER["DLF"]="http://stream.dradio.de/7/249/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_m"
SENDER["Deutschlandfunk"]="http://dradio_mp3_dlf_m.akacast.akamaistream.net/7/249/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_m"
SENDER["Deutschlandradio Wissen"]="http://dradio_mp3_dwissen_m.akacast.akamaistream.net/7/728/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dwissen_m"
SENDER["Deutschlandradio Kultur"]="http://dradio_mp3_dkultur_m.akacast.akamaistream.net/7/530/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dkultur_m"
SENDER["Hitradio Antenne"]="http://stream.antenne.com/hra-nds/mp3-128/MDADevice/"
SENDER["Hellweg Radio"]="http://87.118.64.215:8080/"
SENDER["Radio Berlin"]="http://rbb.ic.llnwd.net/stream/rbb_radioberlin_mp3_m_b"
SENDER["Musicalradio"]="http://mp3.musicalradio.de/musicalradio.mp3"
SENDER["hr 1"]="http://hr-mp3-m-h1.akacast.akamaistream.net/7/783/142131/v1/gnl.akacast.akamaistream.net/hr-mp3-m-h1"
SENDER["hr 3"]="http://hr-mp3-m-h3.akacast.akamaistream.net/7/785/142133/v1/gnl.akacast.akamaistream.net/hr-mp3-m-h3"
SENDER["kiss FM"]="http://stream.kissfm.de/kissfm/mp3-128/internetradio/"
SENDER["Klassikradio"]="http://edge.live.mp3.mdn.newmedia.nacamar.net/klassikradio128/livestream.mp3"
SENDER["Radio ffh"]="http://mp3.ffh.de/radioffh/hqlivestream.mp3"
SENDER["SWR 1"]="http://swr-mp3-m-swr1bw.akacast.akamaistream.net/7/245/137133/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr1bw"
SENDER["SWR 2"]="http://swr-mp3-m-swr2.akacast.akamaistream.net/7/721/137135/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr2"
SENDER["SWR 3"]="http://swr-mp3-m-swr3.akacast.akamaistream.net/7/720/137136/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr3"
SENDER["SWR 4"]="http://swr-mp3-m-swr4bw.akacast.akamaistream.net/7/426/137137/v1/gnl.akacast.akamaistream.net/swr-mp3-m-swr4bw"
SENDER["Radio eins"]="http://rbb.ic.llnwd.net/stream/rbb_radioeins_mp3_m_a"
SENDER["Rock Antenne"]="http://mp3.webradio.rockantenne.de:80"
SENDER["Top 100"]="http://87.230.101.12/"
SENDER["WDR 2"]="http:/wdr-mp3-m-wdr2-koeln.akacast.akamaistream.net/7/812/119456/v1/gnl.akacast.akamaistream.net/wdr-mp3-m-wdr2-koeln"
SENDER["WDR 4"]="http:/wdr-4.akacast.akamaistream.net/7/42/119438/v1/gnl.akacast.akamaistream.net/wdr-4"
clear
echo "Sender waehlen"
select ENTRY in "${!SENDER[@]}"; do
TITLE=${ENTRY}
echo "play ${TITLE}"
URL=${SENDER[${ENTRY}]}
mplayer ${URL}
done
Aufnahme ist mit ffmpeg möglich.
Zweitletzte Zeile ersetzen durch
ffmpeg -i ${URL} -acodec copy record.mp3
das Ergebnis landet in record.mp3
Viel Spaß
Joachim