Over several years of using Linux distros (Debian happens to be my fave) and BSDs for my primary computing, I've picked up the odd piece of useful info.
Online Radio Fun
Posted 11-04-2009 at 08:05 PM by ofaring
In the spirit of old hardware and minimalism I've set up my fave radio stations in a little bash script. Perhaps not the most elegant solution, but it works for me. Especially since I employ Debian Multimedia's mplayer-nogui package.
The usual rules apply. Copy/paste it as (really, whatever you like) "Radio.sh". Move it to your preferred location. Chmod 777 it, or change the ownership to your regular user and chmod 700 it. Give'r. E.G.:
Or simply put it somewhere safe, and:
Obviously you are better off with a console version of mplayer or something similar. I used mpg123 for quite a while, but I find mplayer more robust.
One of the reasons I appreciate Debian is its flexibility. When I install KDE or GNOME software through apt-get, I can verify that I'm getting the bare minimum of dependencies required to run that program. Awesome. Especially when you know that my Linux fun began with fat distros like (at the time called) Mandrake and Suse. I may still respect their efforts, but their newest versions would barely run on my old hardware today. No diss intended, but this flexibility even beats Slackware.
Remember that I run old hardware.
I could pick through the KDE sources and build minimal versions of KDE and Qt to run the KDE programs which I use. Of course the build takes f-o-r-e-v-e-r. (Intel never intended a 400MHz Celeron processor with 192Mb of RAM to compile bloated modern software.) And then I have to hope that everything is kosher, 'cause I ain't in the mood to spend three days just supplying dependencies for, let's say, the Opera web browser. (Version 10 kicks ass, by the way. It seems to have solved stability issues which version 9 had introduced.)
So, the fact that I'm able to choose between the normal mplayer install with a gui included and a version without the gui - 'cause I never use it anyway - is very Debian-minimalist like.
Code:
#!/bin/bash
#
# "Radio.sh" An online radio station list/script from ofaring @ linuxquestions.org
#
OPTIONS="Pure.DJ DI.Trance Proton.Radio Bassdrive MTH.House DI.C.Techno Tags.Trance.Trip Dark.Wax Trance.Ah ----- "
OPTIONS="${OPTIONS}Bluemars.Ambient DI.Chillout Groove.Salad Secret.Agent ----- "
OPTIONS="${OPTIONS}Lush.SomaFM Radio.Paradise ----- "
OPTIONS="${OPTIONS}Mostly.Classical Quit"
select opt in $OPTIONS; do
if [ "$opt" = "Pure.DJ" ]; then
mplayer http://81.23.249.40:8000 # http://www.puredj.com/etc/pls/128K.pls #
exit
elif [ "$opt" = "DI.Trance" ]; then
mplayer http://scfire-dtc-aa01.stream.aol.com:80/stream/1003 # http://di.fm/mp3/trance.pls #
exit
elif [ "$opt" = "Proton.Radio" ]; then
mplayer http://scfire-ntc-aa03.stream.aol.com:80/stream/1041 # http://protonradio.com/proton.m3u #
exit
elif [ "$opt" = "Bassdrive" ]; then
mplayer http://aol.streams.bassdrive.com:8008 # http://www.bassdrive.com/v2/streams/BassDrive.m3u #
exit
elif [ "$opt" = "MTH.House" ]; then
mplayer http://stream.mth-house.de:8500 # http://stream.mth-house.de:8500/listen.pls #
exit
elif [ "$opt" = "DI.C.Techno" ]; then
mplayer http://205.188.215.225:8004 # http://di.fm/mp3/classictechno.pls #
exit
elif [ "$opt" = "Tags.Trance.Trip" ]; then
mplayer http://205.188.215.230:8012 # http://somafm.com/tagstrance.pls #
exit
elif [ "$opt" = "Trance.Ah" ]; then
mpalyer http://ca.ah.fm:9000 # http://www.ah.fm/192k.m3u #
exit
elif [ "$opt" = "Dark.Wax" ]; then
mplayer http://217.168.150.207:8000/listen # http://www.darkwaxradio.com/listen.m3u #
exit
### ---------------------------------- ###
elif [ "$opt" = "Bluemars.Ambient" ]; then
mplayer http://207.200.96.225:8020 # http://207.200.96.225:8020/listen.pls #
exit
elif [ "$opt" = "DI.Chillout" ]; then
mplayer http://scfire-ntc-aa01.stream.aol.com:80/stream/1035 # http://di.fm/mp3/chillout.pls #
exit
elif [ "$opt" = "Groove.Salad" ]; then
mplayer http://streamer-ntc-aa04.somafm.com:80/stream/1018 # http://www.somafm.com/groovesalad.pls #
exit
elif [ "$opt" = "Secret.Agent" ]; then
mplayer http://streamer-dtc-aa03.somafm.com:80/stream/1021 # http://somafm.com/secretagent.pls #
exit
### -------------------------------- ###
elif [ "$opt" = "Lush.SomaFM" ]; then
mplayer http://streamer-ntc-aa01.somafm.com:80/stream/1073 # http://somafm.com/lush.pls #
exit
elif [ "$opt" = "Radio.Paradise" ]; then
mplayer http://scfire-ntc-aa04.stream.aol.com:80/stream/1048 # http://www.radioparadise.com/musiclinks/rp_128.m3u #
exit
### -------------------------------- ###
elif [ "$opt" = "Mostly.Classical" ]; then
mplayer http://scfire-mtc-aa02.stream.aol.com:80/stream/1006 # http://www.sky.fm/mp3/classical.pls #
exit
### ---------------------- ###
elif [ "$opt" = "Quit" ]; then
exit
else
echo 'Wrong, sucka!'
fi
done
Code:
# mv Radio.sh /opt/bin # chmod 777 Radio.sh % Radio.sh
Code:
% cd your_save_location % chmod 700 % ./Radio.sh
One of the reasons I appreciate Debian is its flexibility. When I install KDE or GNOME software through apt-get, I can verify that I'm getting the bare minimum of dependencies required to run that program. Awesome. Especially when you know that my Linux fun began with fat distros like (at the time called) Mandrake and Suse. I may still respect their efforts, but their newest versions would barely run on my old hardware today. No diss intended, but this flexibility even beats Slackware.
Remember that I run old hardware.
I could pick through the KDE sources and build minimal versions of KDE and Qt to run the KDE programs which I use. Of course the build takes f-o-r-e-v-e-r. (Intel never intended a 400MHz Celeron processor with 192Mb of RAM to compile bloated modern software.) And then I have to hope that everything is kosher, 'cause I ain't in the mood to spend three days just supplying dependencies for, let's say, the Opera web browser. (Version 10 kicks ass, by the way. It seems to have solved stability issues which version 9 had introduced.)
So, the fact that I'm able to choose between the normal mplayer install with a gui included and a version without the gui - 'cause I never use it anyway - is very Debian-minimalist like.
Total Comments 0









