DMP1 MP3 Streamer

From Omnifi Wiki

Jump to: navigation, search
Quick Links
Linux-Inside.jpg
Related topics
  • Find Something
    • To Put Here

edit

Contents

What?!! A Mobile MP3 Broadcast Station?

Forum member ricmalaz indicated that he wanted a way for the DMP1 to serve up MP3's to his Dell Axim on an ad-hoc network. After I ridiculed him (practically), I felt bad, relented and tried to find something that might help satisfy his needs. There seemed to be two:

  1. Run mini_httpd to serve up directory listings of the songs on his DMP1, and let his Axim browse an http URL to download or stream that he selects. Windows media player on the Axim can play the song as it's being downloaded.
  2. Provide for a C/C++ MP3 streamer. This allows one to specify songs to play in sequence... kind of like having a mobile Internet Radio station.

This is the story of option number 2:

Where's the proof?

POC Screenshot!

On my network, my DMP1 is 192.168.1.15. Here is a screenshot that illustrates this MP3 streamer in action and my WinAmp going... Openfi was going during this time -- I don't know how it affected that poor thing; I was not sitting in the car at the time!

Where Can I Get An MP3 Streamer That Runs On The DMP1?

After looking at least a dozen or so MP3 streamers, I settled for one called POC. Here's the project page. If you haven't already, you'll need an ARM CrossCompiler to build this project. You can build it natively to run on your Linux or Cygwin, but why?

During your build, you'll discover you'll get a cryptic message saying that

  -static  -lfl
/root/projects/buildroot/build_arm_nofpu/staging_dir/lib/gcc/
arm-linux-uclibc/3.4.2/../../../../arm-linux-uclibc/bin/ld: cannot find -lfl 

And the make will fail. -lfl? What the heck is -lfl?

lincomatic helped me out here. This is a flex library (libfl.a), which is missing from both Crosstools and Buildroot. Get the required version here from flex-2.5.4a.tar.gz from gnu.org

Let's Build!

First start with flex:

~# wget ftp://ftp.gnu.org/non-gnu/flex/flex-2.5.4a.tar.gz
23:57:23 (264.88 KB/s) - `flex-2.5.4a.tar.gz' saved [380995]
~# tar xf flex-2.5.4a.tar.gz
~# cd flex-2.5.4/
~/flex-2.5.4# export PATH=/opt/arm-uclibc:${PATH}
~/flex-2.5.4# export CFLAGS="-Os -static -Wall"
~/flex-2.5.4# export LDFLAGS="-static"
~/flex-2.5.4# ./configure --host=arm
              --build=i386-linux --without-cxx --with-build-cc=/usr/bin/gcc
              --exec-prefix=/root/projects/buildroot/build_arm_nofpu/staging_dir/
              --prefix=/root/projects/buildroot/build_arm_nofpu/staging_dir/
(blah, blah, blah ...)
~/flex-2.5.4# make
(compile, compile, compile ...)
~/flex-2.5.4# make install
(blah, blah, blah ...)
~/flex-2.5.4# _

Then it's installed. Of course you'll change the locations of the ARM GCC compiler (in red above) to what would match your system. The same goes for the --exec-prefix and --prefix flags in the ./configure step.

Now you can continue and build the POC. Assuming that your PATH, CFLAGS, LDFLAGS are set as they are from above:

~/flex-2.5.4# cd ~
~# wget http://www.bl0rg.net/software/poc/poc-0.4.1.tar.gz
00:13:17 (124.06 KB/s) - `poc-0.4.1.tar.gz' saved [114875/114875]
~# tar xf poc-0.4.1.tar.gz
~# cd poc-0.4.1/
~/poc-0.4.1# make
(blah, compile, compile, blah ...)
~/poc-0.4.1# strip poc-http pogg-http mp3cut mp3length mp3cue
~/poc-0.4.1# strip poc-fec poc-fec-ploss pob-fec pob-3119
~/poc-0.4.1# strip pob-2250 poc-3119-ploss poc-2250 poc-3119
~/poc-0.4.1# _

This should have been painless... Actually, all you need to strip is poc-http!

Getting It To Work

Here's the fun (and very easy) part. Create a folder on your HD called /poc (or anything you'd like). Put the single file poc-http that was created in the build step above, into this directory. You can copy all of the other executable files over too, if you'd like.

Now, look at my screenshot above and rlogin to your DMP1.

~# rlogin -l root 192.168.1.15

BusyBox v0.60.3 (2003.02.20-23.40+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# cd /storage/disc1/poc/
# ls -l

-rwxr-xr-x  1 sync    sync   72500 2005-11-09 22:54 poc-http*
# ./poc-http -s 192.168.1.15 -p 8000 -c 0  /storage/disc1/Music_Collection/YourMusicFolder/*.mp3
Streaming /storage/disc1/Music_Collection/YourMusicFolder/(Electric Light Orchestra) Zoom - 01) Alright.mp3...
00:01/03:13  736/3091262  ( 0%) 128kbit/s  418b _

The parameters to pass are:

* [-s] Source IP to stream music on
* [-p] Port number to stream music on (defaults 8000)
* [-c] Max number of clients that can connect. Zero = unlimited
* Pathname.mp3 Pathname to mp3 or list of mp3's to stream

Currently, poc doesn't seem to support directory recursion so you just can't specify /storage/disc0/Music_Collection/*.mp3 and have it go down every directory on your drive.

Anyhow, now fire up WinAmp (or some other suitable player) and click on FILE -> PLAY URL and give it http://192.168.1.15:8000. (You'd substitute your own IP and Port Number you've specified when starting poc on your DMP1).

When WinAmp connects, it'll buffer for a sec and begin playing from wherever the music was.

What It Does

POC is not a serve music on demand type of server. It just begins to broadcast music to your network, like a radio station. Whomever connects and listens to the music will hear whatever is being streamed at the time.

pogg-http will stream ogg files. I have not played with the other executables yet, but they appear to be streamers of different formats.

poc-http is not an ICY streamer either. There is no Meta-Data information being sent.


Other Streamers

A streamer that makes sense to build for the DMP1 would need to be C/C++. Many of the ones you can find (such as gnump, mp3stream, etc.) are Perl or PHP scripts and would not necessarily work well with the DMP1.

Here are some that have compiled for the DMP1

  • LiteStream This one requires a broadcast server and source server (hmm). It was confusing for me because I had to get two programs up and running to stream one song. I left this alone.
  • TBD

Related Links

External Links


Lumkichi 22:34, 9 Nov 2005 (CST)

resume writer

Personal tools