|
About
Steve's blog, The Words of the Sledge
steve@einval.com
Subscribe
Subscribe to the RSS feed.
Links
Home
Debian
PlanetDebian
Search PlanetDebian
Friends
Matthew Garrett
Jonathan McDowell
Jo McIntyre
Martin Michlmayr
Andrew Mobbs
Mike Pitt
Daniel Silverstone
Andy Simpkins
Neil Williams
|
|
|
Ogg support on my WMA11B
Noodles kindly passed
on the Linksys
WMA11B Wireless Media Adapter that he'd promised me. This is a
little ARM-based Linux box with wired and wireless network inputs and
TV and audio outputs. With the software that comes with the little
media box, you can play Windows media and MP3 audio and display a
variety of image formats.
There's just one problem with this software - it claims to work
only on Windows, needing a .Net runtime to serve both software and
media files to the box. We don't have any Windows machines in the
house any more, so that clearly wasn't going to wash!
Various Free Software hackers have acquired these boxes and played
with them, and there's now a complete set of Free tools available (to
play audio, at least):
- Andy Wild has written wmaloader,
a replacement program to download software to the WMA11B. I've
packaged this for Debian.
- James Pitts has written wmamp, an
iTunes client that runs on the WMA11B. Simply replace the
"squishguava" software image from the WMA11B CD with wmamp.img.
- Alexander Oberdörster has written a free iTunes-compatible server
called daapd
that runs on Linux, serving up MP3 files. This is packaged in Debian
too.
With this selection of excellent programs, I managed to get my
WMA11B up and running a couple of weeks back without once using the
supplied Windows software. I could play MP3 music through my new
hi-fi, spooling the files directly off the network. Yay! Well,
almost. The problem is that almost all the music I have is now in Ogg
Vorbis format. :-(
I didn't want to re-rip and re-encode all of my CDs into an
inferior, encumbered format, so I decided to extend the toolchain to
support Ogg Vorbis. This turned out to be really quite easy, and after
just a few hours of hacking at the weekend I have it working now.
There were a few issues and bugs to solve along the way:
- daapd didn't know anything about Ogg at all. That was easily
solved - add code to use libogg and libvorbis to extract header info
from Ogg files.
- daapd always sent music files as
Content-Type:
text/html , which seemed a little silly. I've fixed this so that
it will now use audio/mpeg and
application/ogg as appropriate.
- Setting up an arm cross compiler. In the past I've spent many
many hours doing this, so I was really impressed by
the Debian toolchain-source package. It Just Worked first time.
- wmamp would only play MP3 files; I've now extended it to recognise
the
Content-Type header and use either the original MP3
code or the new Ogg code as appropriate.
- My first attempt to use libvorbis in wmamp almost
worked, but playback was very jerky. The little Arm processor in the
WMA11B doesn't have hardware floating-point support, and the normal
libvorbis uses floating point for decoding. Noodles pointed me at
Tremor, the simplified fixed-point Vorbis decoder. A few minutes more
hacking and I was done.
My very first attempt to play Ogg files worked, just slowly. My
first attempt at playback with the Tremor library worked
perfectly. Monitoring the system using top, I can see it uses about
20-25% CPU when playing back Ogg files, leaving enough spare cycles to
do other stuff.
To do:
- At the moment I only have rudimentary Ogg playback working. I want
to make all the remote control functions work (e.g. pausing
playback).
- Ogg Flac support should be quite easy to add too.
- The MP3 decoder currently drives a visualiser - a simple spectrum
analyser. The Ogg code should be able to do the same at least. In
fact, I'd like to add more visualisation options, maybe using
xmms-style plugins if I can.
- I need to check that the changes I've made to daapd haven't broken
support for existing iTunes clients.
- Last, but not least: I need to push the changes
I've made upstream!
Longer term, I'm thinking of hacking apart wmamp and essentially
rewriting it. I've got several ideas on how I'd like it to look and
behave. It's been a while since I've worked on GUI code, but I'll
muddle through somehow.
I've had a great time so far hacking on the WMA11B. Plugging
together the fruits of multiple projects has proven to me again just
how powerful Free Software can be. I have a neat new toy to play with,
and as I have source to all the main components I can customise and
improve them as I see fit. How cool is that? :-)
01:26 ::
# ::
/wma ::
10 comments
Re: Ogg support on my WMA11B
Davyd
wrote on Wed, 02 Feb 2005 05:37 |
The problem with daapd sending Content-Type: text/html, is from memory that's what the protocol actually does. It's like it's actually intent on breaking the ability to use other HTTP clients and instead relying on Quicktime's built in MIME detection to deal with it instead.
What I would look at is getting the gstreamer architecture running on the thing. There are components to instantly wire up players, so you can put video on the TV and audio out the audio, with visualisations and movies, or whatever you're after. Not sure if it currently compiles on ARM however, or if your ARM would be powerful enough to handle it (I'm told there is little overhead in GStreamer however). Of course, you might have fun without floating point maths...
Since DAAP in you only need the URL to stream a song, you could use an existing DAAP browser, then probably pass it off to an existing GStreamer HTTP streaming plugin, perhaps with some custom headers.
Just some crazy thoughts.
Reply
|
Re: Re: Ogg support on my WMA11B
BigLew (Hacking CyberVirus)
wrote on Mon, 21 Mar 2005 22:24 |
How much can we fit into a cramFS like I dunno a minilinux with X. Also is there any way to decompile the binaries into C / C++ and ASM this would be very cool as linksys have yet to offer GPL'd code for this product. Also Some page I read said this baby has a 400Mhz ARM core in it is this true because ARM this would mean the processor was more powerful than a PS2 thats crazy. I think it may be possible to do some very cool mods for this. I'm thinking Macromedia Flash, MPEG & MPEG 2 the possibilities are limitless if sum1 could post a howto solder a new flash chip into it say 1GB + or any future expansion mods for the HW memory etc I have about £150 to spend on this new toy lots of gadgets and gizmos and Hardware to interface as well as 3 13" SVGA LCD screens from thinkpad 560E. any mods like usb any mods at all please contact me I love Mods
Reply
|
Re: Re: Re: Ogg support on my WMA11B
Jim
wrote on Wed, 06 Apr 2005 11:21 |
Linksys have finally released the GPL source to the wma11b. Although your comment comparing the PS2 Mips processor to the 400Mhz ARM are reasonable, the video processor in the wma11b is very poor indeed.
Reply
|
Re: Re: Re: Ogg support on my WMA11B
J. Buck
wrote on Mon, 05 Dec 2005 07:01 |
Perhaps a pcmcia to cf card, and a cf 128 or more for memory?
maybe even pcmcia to usb, then usb flash, wi-fi, whatever? Then again, if you fill it with sand, it will make a nice
doorstop.
Reply
|
Re: Re: Ogg support on my WMA11B
Steve
wrote on Wed, 02 Feb 2005 20:57 |
Ick! You don't surprise me on the Content-Type front.
Re gstreamer, I'm not convinced that would be a good plan - the box only has a very small amount of memory, 6.5 MB free after the kernel and ramdisk have taken their chunks. I will take a look, though - thanks for the pointer.
Reply
|
daapd patch - It does break iTunes compatibility
Ed Schouten
wrote on Sun, 24 Apr 2005 21:28 |
Hi Steve,
I tampered around with your patch a little and it does break iTunes compatibility. I patched daapd on my Gentoo box and it also shares ogg files now (though the time duration is set to 0:00).
When I try to play ogg files with the Ogg module available at http://qtcomponents.sourceforge.net/, I only get a lot of garble
Reply
|
Re: Ogg support on my WMA11B
shane
wrote on Tue, 14 Jun 2005 23:32 |
Reply
|
Re: Ogg support on my WMA11B
Wookey
wrote on Thu, 07 Jul 2005 14:56 |
Good stuff steve. Just one point. Toolchain-source is now deprecated because it is not maintained and trying to keep it syned with all arches is/was a nightmare. Now the normal packages have been fixed to just cross-build properly themselves (which is what upstream intended anyway). Info available at http://www.emdebian.org/tools/crossdev.html This is now the 'right' (TM) way to build debian cross-toolchains. Pre-built ones are available from emdebian.org.
Reply
|
Cleaned up wmamp sources at MyTinker
Geert
wrote on Mon, 13 Feb 2006 02:39 |
I have rigorously cleaned up the wmamp source and
fixes lots of bugs and leaks and streamlined the
whole thing. http://groups.yahoo.com/group/mytinker/
Reply
|
Cleaned up wmamp sources at MyTinker
Geert
wrote on Mon, 13 Feb 2006 02:39 |
I have rigorously cleaned up the wmamp source and
fixes lots of bugs and leaks and streamlined the
whole thing. http://groups.yahoo.com/group/mytinker/
Reply
|
|