electroZ microsystems

Internet radio


This article show an easy way to play Internet radio on Linux from the shell. It present also solutions to control the radio by an other way than the keyboard.

We need first to install mplayer.
 >mplayer   -msglevel all=-1 -quiet -afm acm http://broadcast.infomaniak.ch/rsr-couleur3-high.mp3

Direct RSR streems

  1. http://broadcast.infomaniak.ch/rsr-la1ere-high.mp3
  2. http://broadcast.infomaniak.ch/rsr-espace2-high.mp3
  3. http://broadcast.infomaniak.ch/rsr-couleur3-high.mp3
  4. http://broadcast.infomaniak.ch/rsr-optionmusique-high.mp3
  5. more

We provide in this article a one step install command which install four scripts in /usr/bin : lapremier, espace2, couleur3 and option.

Just execute this line as root:

  wget electroz.org/install/radio.rsr -O-|bash

Control by another programm

The principle is to start mplayer as slave and send commends trouth a fifo file.

First we create the fifo (named pipes).

 >mkfifo /tmp/fifofile

Second, we start mplayer in slave mode

 >mplayer -slave -input file=/tmp/fifofile -msglevel all=-1  -quiet 
   -afm acm http://broadcast.infomaniak.ch/rsr-couleur3-high.mp3 &

Third we can control Mplayer by writing command in /tmp/fifofile

 >echo q> /tmp/fifofile