Didj MP3 Streaming

Overview
This page describes how to play mp3 format audio streams and files on your Didj using madplay, a command-line mp3 player.

Prerequisites
In this example we assume you are using the buildcross-generated cross compiler environment http://elinux.org/Didj_Build_Environment and have properly set your environment variables for cross-compilation.

Download the latest sources for the following packages:

madplay-0.15.2b.tar.gz http://sourceforge.net/projects/mad/files/

libmad-0.15.1b.tar.gz http://sourceforge.net/projects/mad/files/

libid3tag-0.15.1b.tar.gz http://sourceforge.net/projects/mad/files/

zlib-1.2.5.tar.gz http://www.zlib.net/

Building madplay
Create a folder called madplay_build and then extract the abovementioned archives into folders in madplay_build.

Set the following variables:

Build zlib

Enter the directory zlib-1.2.5 and run:

then run

Build libid3tag

Enter the directory libid3tag-0.15.1b and type

then type

after which, type (note the trailing dot)

Build libmad

Enter the directory libmad-0.15.1b and type

Note: Edit the Makefile, removing '-fforce-mem' from the CFLAGS directive.

then type

after which, type (note the trailing dot)

Build madplay

Enter the directory madplay-0.15.2b and type

then type

Finally, strip the madplay file as follows:

Install madplay

Transfer the file, plus one or more MP3s of your choosing, to your Didj.

Make sure the lightning application is stopped. On the Didj:

Playing MP3s
To execute madplay, On the Didj:

Streaming MP3s
In order to stream a networked MP3 stream, first set up networking. (You can using the information in http://elinux.org/Didj_Networking_HOWTO and http://elinux.org/Route_Your_Didj to set up networking and routing)

To stream audio, wget a stream (the example is NPR news), while piping the stream through madplay:

Note that .pls files are not supported in madplay. (but you can open them with a text editor to get the URL)

Enjoy the sound!