Yet Another Blog by Nitesh Mistry

Entries tagged "music"

Light Music - Internet Radio with mpg123
31st December 2010

Light music? No, I am not talking about any genre of music but about being light on your system while playing music.

Recently, I started playing (with) internet radio - one of the perks of having a unlimited broadband internet connection. Playing internet radio within the browser means managing one more window which needs to stay open all the while (constantly using around 100 MB of system memory), even if I am not browsing the web. So the other alternative is to give the url to your favourite gui music player to play. I use amarok for managing and playing locally stored music. It has a brilliant user interface to browse my music, manage playlists and all. But any modern graphical audio player also has a big memory foot-print (considering my poor 6 year old box) - grabbing almost 50-70 MB of RAM. And, since while playing internet radio, songs are automatically queued by the station, there is very little for me to tinker around, and the audio player usually stays minimised in the system tray.

Then why waste so much of resources when there is mpg123 to do the task. And it does the task really well. It runs from the terminal and still provides basic functionality (read man mpg123 for details). While it is playing, just check your system monitor; mgp123 rarely uses more than 700 KB of system memory (that is just 1% of what graphical audio players occupy) and it never shows up in the top 10 CPU users. As someone wisely said, "Frugal living is a virtue".

Wow! So how to go about it? Simple, run the following at the terminal:

sudo apt-get update; sudo apt-get install mpg123

To play internet radio with mpg123:

mpg123 <url of the radio station> &

For example, mpg123 & will play the classical guitar channel at internet radio station.

To stop playing the music, just bring the process up giving fg command and interrupt it with ctrl-c or simply kill the process by giving killall mpg123 command.

Cool. Now enjoy the "light" music. ;)

Email comments to Nitesh Mistry   Tags: geekosophy, howto, internet, linux, mpg123, music, radio.