The default media player on the Nokia N800, creatively titled Media Player, sucks in many ways. There is no Ogg Vorbis support, no way to create a playlist from the GUI, seeking support is hit and miss, lacklustre graphic design, minimal metadata support, etc. Its shortcomings are compounded by the fact that is closed source, so it’s not just a matter of fixing the warts. This led me to port an existing media player, Exaile, to the N800.
Exaile is a cross-platform player written in Python. It uses the Gtk GUI framework and GStreamer for the audio backend. It attempts to be a clone of the magnificent Amarok, but in Python (fun to hack and easily portable) and Gtk (handy if that’s what you prefer or is all you have, as on the N800). It has nice collection and playlist management in the the style of Amarok, and some degree of last.fm support.
Porting involved taking out some newer Gtk features (e.g. SVG icons), adding support for the SQLite that comes with Python 2.5 (the version available for Maemo), adding support for modified gstreamer audio codec pipelines, and modifying the GUI to suit the constraints of a handheld platform.
I grabbed the basis for the gstreamer audio pipeline support from the Coherence project; a UPnP platform written in Python, with recently added N800 support. This had support for the built-in MP3 dsp codec as well as the third-party Ogg Vorbis software codec. The
parse_launch function is used to create a gstreamer pipeline like so:
player = gst.parse_launch('gnomevfssrc name=source ! id3lib ! dspmp3sink name=sink')
I added support for a couple of other codecs; m4a (MPEG4 audio, so I can play iTunes Plus songs without transcoding degradation) and AAC (advanced audio coding, similar to m4a, used by Nokia). These work in my isolated test cases, but have some problems at the moment when integrated with my Exaile port. It took quite a bit of poking around and trial and error to get m4a playback happening; there’s not a lot of Maemo documentation for this at the moment. For the interested, here are the pipelines:
gnomevfssrc name=source ! demux3gp ! dspaacsink name=sink sync=false'
gnomevfssrc name=source ! dspaacsink name=sink
I’m still not quite sure of the meaning of the ‘sync=false’ setting, but without that playback is grossly stilted. When used within Exaile playback is still problematic, so there is work to be done there.
The user interface is a bit rough at the moment. It needs to be hildon-ised, to fit in with the look and feel fo the N800 software. I’d also like to integrate some of the pretty aspects of the Listen audio player (another Python/Gtk/Gstreamer audio player) into the interface, and adapt it to suit the style of the N800.
At this point I now have a media player that is better (for me) than the ones that I have used up to this point (Osso Media Player, Kilikali, UKMP, and some other player I removed on account of it trashing some of my setup). There is still a lot of work to be done. Here is my current todo list:
- Fix the ‘about’ dialog
- Get .m4a files to play properly
- Fix displaying of notification bubbles
- Fix getting available plugins
- Make left column hidable in main view
- Improve layout of song info in main view
- Fix opening of directories in Files browser
- Fix searching for .aac files
- Test audio scrobbling
- Add offline queueing for audio scrobbling
- Get last.fm streaming working
- Improve startup time
- Hildon-ise the GUI
- Make .deb packages for the exaile port and the mutagen library
This should keep me busy for a while! It is a bit of a nuisance to use at the moment, since it must be started from the command line, and the Mutagen library must be installed by hand. Things will be much nicer once I make .deb pacakges for this. Here is a tarball alpha release for those desperate have a play: exaile_maemo/release/exaile_0.2.9_maemo_5.tar.gz