Do you like to listen to music or news? Are you a Linux user? If yes, this project may interest you.
OverviewThis project shows you how to implement your own on-line radio receiver in Linux, using as major basis the mplayer application. Mplayer will operate in slave mode and receive commands by named pipes.
It's possible to make this project work both in embedded and non-embedded Linux. It means that, if your Linux system has audio output, it's able to run Python scripts and runs mplayer application, you're ready to implement it easily.
Getting startedBefore implementing this project, some preparation is necessary.
1. Be sure your Python version is 2.7 (for later versions, please check compatibility of functions print and raw_input).
2. Install mplayer. In Debian-based distros (it includes Ubuntu and Raspbian), it can be done by the following command:
sudo apt-get install mplayer2
3. Choose the on-line radios to listen to. A very good website to get some radios is Shoutcast. Especifically to this project, the on-line radio's URL must be a .pls playlist file. Here are three examples of on-line radio's URLs:
4. Test if mplayer can play on-line radio you want to listen to. To do this, considering on-line radio URL equal http://panel3.serverhostingcenter.com:2199/tunein/radiobackstage1.pls, type the following command:
mplayer -playlist http://panel3.serverhostingcenter.com:2199/tunein/radiobackstage1.pls
It's alive!Do you want to check this project alive? See these two following videos:
Comments