E-mail Print


One of my favorite webradio stations is PROJECT RELOADED, successor of the legendary PROJECT 89.0 DIGITAL (you probably had to live in the Northern part of Germany in 2001-2003 to know this station). Unfortunately, it is not broadcasting proper metadata in its stream, while almost every webradio device would display this information nicely.

Requests to improve the situation were unsuccessful, although there are already playlists available: on the official website and on the homepage of another enthusiastic listener. They are backed by two XML files, the preview list which drives the flash-based playlist and the main list which is said to be used by the old Windows gadget player PROJECT offers for download.

So I sat down and wrote a tiny program to plug the floating pieces together: project-relay was born. On its input side, project-relay connects to the webradio stream server and also periodically reads one of the two XML playlists. It converts the data about the currently played song and injects it conforming to the shoutcase format into the stream that it provides on its output side. As the playlist server is a bit instable, quite a few magic dances are performed to avoid presenting no or invalid metadata.

The relay is written in C for Unix in order to run it directly on my Musicpal (pictured above) which is Linux-based and only has a few KB space left. Pre-built binaries of the latest version are available for both x86 and the Musicpal. They run as daemon in the background by default, but can also be re-configured:

Usage: project-relay [OPTIONS]

-d, --debug stay in foreground and issue debug messages
-p, --port PORT provide radio stream on given TCP port (default: 8010)
-v, --version print version and exit

To push the Musicpal version on the device, telnet acces has to be enabled first (go to http://<local-musicpal-ip>/admin/cgi-bin/debug.cgi). Recent revisions of that webradio come with a USB plug and support mass storage devices so that the binary can be transferred via an USB stick. Alternatively, a tftp server can provide the binary for download. The required steps are then:

# telnet 
# login as root
~ $ ./make_rw.sh
# if there is already an older version:
~ $ killall project-relay
# copy from USB
~ $ cp /tmp/mnt/Flash_Disk\#sda1/project-relay /bin/project-relay
# or download from tftp server
~ $ tftp -g -r project-relay -l /bin/project-relay <server-ip>
# Add project-relay to start script
~ $ vi /etc/init.d/mainapp

The script should gain a call to project-relay:

#! /bin/sh

case "$1" in

echo "Starting Nashville."
/bin/logo 2 &
/bin/nashville | logger &

A short vi editor how-to: Press the Insert key, move the cursor and add the new line. Then press Esc and type ':x'. Finally press Enter.

Reboot the Musicpal to check if the installation succeeded:

~ $ reboot

The Musicpal will now provide a stream with proper metadata on <musicpal-ip>:8010 or (when addressing it locally). Note that only one client can connect in parallel. I was lazy and have no permant use for more so far. May change in the future, and I'm open for patches as well.

Last Updated on Saturday, 21 November 2009 14:55  
© Copyright 2009-2014 by Jan Kiszka (PGP Key), Impressum