Difference between revisions of "Didj MP3 Streaming"
(→Prerequisites) |
m |
||
| Line 1: | Line 1: | ||
| − | == | + | == Summary == |
This page describes how to play mp3 format audio streams and files on your Didj using madplay, a command-line mp3 player. | This page describes how to play mp3 format audio streams and files on your Didj using madplay, a command-line mp3 player. | ||
==Prerequisites== | ==Prerequisites== | ||
| − | |||
[[LeapFrog_Pollux_Platform:_Build_Environment| Set up the Build Environment]] | [[LeapFrog_Pollux_Platform:_Build_Environment| Set up the Build Environment]] | ||
| Line 20: | Line 19: | ||
[http://www.zlib.net/ zlib-1.2.5.tar.gz] | [http://www.zlib.net/ zlib-1.2.5.tar.gz] | ||
| − | ==Building madplay== | + | |
| + | == Building madplay == | ||
Create a folder called madplay_build and then extract the abovementioned archives into folders in madplay_build. | Create a folder called madplay_build and then extract the abovementioned archives into folders in madplay_build. | ||
| − | + | In addition to setting your build environment variables, you need to set these variables also. | |
| − | + | ||
export CC=arm-linux-uclibcgnueabi-gcc | export CC=arm-linux-uclibcgnueabi-gcc | ||
export CXX=arm-linux-uclibcgnueabi-gcc | export CXX=arm-linux-uclibcgnueabi-gcc | ||
export CPPFLAGS='-I/full/path/to/madplay_build/libmad-0.15.1b -I/full/path/to/madplay_build/libid3tag-0.15.1b -I/full/path/to/madplay_build/zlib-1.2.5' | export CPPFLAGS='-I/full/path/to/madplay_build/libmad-0.15.1b -I/full/path/to/madplay_build/libid3tag-0.15.1b -I/full/path/to/madplay_build/zlib-1.2.5' | ||
export LDFLAGS='-L/full/path/to/madplay_build/libmad-0.15.1b -L/full/path/to/madplay_build/libid3tag-0.15.1b -L/full/path/to/madplay_build/zlib-1.2.5' | export LDFLAGS='-L/full/path/to/madplay_build/libmad-0.15.1b -L/full/path/to/madplay_build/libid3tag-0.15.1b -L/full/path/to/madplay_build/zlib-1.2.5' | ||
| − | + | ||
| Line 35: | Line 34: | ||
Enter the directory zlib-1.2.5 and run: | Enter the directory zlib-1.2.5 and run: | ||
| − | + | $ ./configure | |
| − | + | ||
| − | + | ||
| − | + | ||
then run | then run | ||
| − | |||
| − | |||
make | make | ||
| − | |||
Revision as of 08:07, 12 July 2011
Contents |
Summary
This page describes how to play mp3 format audio streams and files on your Didj using madplay, a command-line mp3 player.
Prerequisites
In order to stream a networked MP3 stream, first set up networking.
Software Needed
Building madplay
Create a folder called madplay_build and then extract the abovementioned archives into folders in madplay_build.
In addition to setting your build environment variables, you need to set these variables also.
export CC=arm-linux-uclibcgnueabi-gcc export CXX=arm-linux-uclibcgnueabi-gcc export CPPFLAGS='-I/full/path/to/madplay_build/libmad-0.15.1b -I/full/path/to/madplay_build/libid3tag-0.15.1b -I/full/path/to/madplay_build/zlib-1.2.5' export LDFLAGS='-L/full/path/to/madplay_build/libmad-0.15.1b -L/full/path/to/madplay_build/libid3tag-0.15.1b -L/full/path/to/madplay_build/zlib-1.2.5'
Build zlib
Enter the directory zlib-1.2.5 and run:
$ ./configure
then run
make
Build libid3tag
Enter the directory libid3tag-0.15.1b and type
configure --host=arm
then type
make
after which, type
cp .libs/libid3tag.a .
(note the trailing dot)
Build libmad
Enter the directory libmad-0.15.1b and type
configure --host=arm
Note: Edit the Makefile, removing '-fforce-mem' from the CFLAGS directive.
then type
make
after which, type
cp .libs/libmad.a .
(note the trailing dot)
Build madplay
Enter the directory madplay-0.15.2b and type
configure --host=arm
then type
make
Finally, strip the madplay file as follows:
arm-linux-uclibcgnueabi-strip madplay
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:
/etc/init.d/lightning stop
Playing MP3s
To execute madplay,
On the Didj:
madplay yourfile.mp3
Streaming MP3s
To stream audio, wget a stream (the example is NPR news), while piping the stream through madplay:
wget -O - http://npr.ic.llnwd.net/stream/npr_live24 | ./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!