2007-07-22

Exaile N800 port updated to 0.2.10

I’ve rebased the N800 port of Exaile to the latest upstream release. In the process, I tidied up my existing patches and it is marginally more stable now. Here are some of the more noticeable changes:

  • the track position is now a progress bar and looks much nicer (upstream)
  • the plugin loader works now (upstream)
  • the volume slider works better (upstream)
  • turned off a lot of my debug output from the previous release
  • fixed a bug where a playing track would occasionally stop out of the blue

.debs are here:

Next, I’ll probably work on making the interface a bit prettier, starting with hildon-izing the menus. I’d also like to add Replay Gain support to Exaile at some stage. And of course there are still a few bugs to iron out. There is a TODO file tucked away somewhere in the package with more details on things that need to be done.

BTW, make sure you change the foreground color in the preferences for the OSD notifications. There is some problem setting the background color at the moment which results in the notifications appearing blank. I’ll fix this (at least the default setting) soon.

Filed under: exaile,maemo,N800 — twegener @ 22:56

2007-07-15

Preview .deb packages for Exaile for maemo

After much messing around I have build some .deb packages for my Exaile for Maemo port and the mutagen library (one of its dependencies):

python2.5-mutagen_1.11_armel.deb

exaile_0.2.9-1_armel.deb

There’s lots of work still to be done, but if your desperate for a nicer sound player on the N800 then this should do the job. If there are any features that you would like to be fixed/added sooner rather than later then leave a comment and I’ll push it higher on my todo list.

Filed under: maemo,N800,Python — twegener @ 23:11

Manually creating a .deb package for maemo

After much gnashing of teeth I have managed to manually make a .deb package that installs on the N800. I wanted to make the .deb by hand since I use Fedora on the desktop, for which the dpkg tools are not available. (I haven’t installed Scratchbox, because there are no rpms available for it at the moment, and I’d like to install it cleanly.)

A .deb package is quite simple, at least in theory. It consists of a control.tar.gz archive with package control files, data.tar.gz archive of all files that will be installed and debian-binary file that indicates the deb version to use. These files are then placed within an ar archive.

I cobbled together the archive contents using a hacky make file and sed. The final ar archive was the main sticking point. The ar format used in .deb packages is different to that generated by GNU ar. By looking at an existing deb package (the one for maemo-wordpy as it happens) with the emacs hexl-mode and consulting the wikipedia entry on the ar format and a few other people who shared my pain, I was able to come up with a sed script to fix the internal headers:

sed -e 's|^\([^/]\+\)/ \(.*\)|\1 \2|g' temp.ar > output.deb

This still didn’t cut the mustard. It turns out that the order of the files within the ar archive is important:

ar -rc temp.ar build/debian-binary build/control.tar.gz build/data.tar.gz

The complete makefile is a bit of an embarrassment at the moment, so I won’t post it here. At some stage I’ll write a more general script for generating .deb packages.

A few more things learnt along the way:

  • dpkg-deb on the N800 cannot be used to make .debs since it appears to be incompatible with the busybox version of tar
  • non-header lines in the control file most be indented (e.g. description lines and base64-encoded icon)
  • the maemo installer icon is 26×26; ImageMagick is helpful here: convert -rescale 26x26 icon.png output.png
  • to base64 encode the icon do base64 icon.png | gawk '{print " "$$0;}' > icon.txt
  • create the md5sums file like so: find . -type f -exec md5sum {} \; | sed -e 's| \./||' > md5sums
  • some extra fields are needed in the .desktop file to get the icon to show up: X-Icon-path=/usr/share/icons X-Window-Icon=appname and the .png extension should be dropped from the Icon line.

Functional Exaile for maemo debs coming soon hopefully…

Update: I’ve made a reusable makefile fragment for generating .deb packages without using dpkg tools: deb_hand.mak, and an example custom makefile that uses this fragment: deb_hand_example.mak

Filed under: maemo,N800 — twegener @ 1:58

2007-07-03

Exaile N800 port progress

I shamefully forgot to include a screenshot in the last post, so here you go:

Exaile on N800 screenshot

As you can see, the GUI needs a bit of polishing (‘hildonisation’).

I fixed end-of-track detection for the nokia-mode pipeline. This means that the player will actually start playing the next track in the playlist when a song finishes! The problem was that I neglected to add the playbin bus setup for the nokia pipeline. Also, I had to ensure that the on_message handler was reconnected whenever a new track is played in nokia-mode, since the pipeline gets rebuilt if the file format is different.

The first fix had the pleasant side-effect of making m4a files play correctly from Exaile (previously they were really stuttery).

I fixed the about dialog. The version of libglade on the N800 appears to be a bit behind the times and doesn’t support GtkAboutDialog. I just create it in the program directly using gtk.AboutDialog and it works fine. I’m not a big fan of the libglade approach of reading in the widgets at runtime from an XML file. I prefer the way that it is done in Qt Designer/PyQt where the language-independent XML widget description is converted into Python code in a separate step. This code can be imported and extended by the main application code. It feels like such a waste to add an extra parsing step, for no gain.

I’ve encountered a bit of instability now and then during testing, especially when doing lots of seeking. Sometimes this results in a total lack of responsiveness and I have to kill the process manually. I’m willing to live this for now.

There are plenty of todo items, but I think I’ll work on making a .deb package to enable people to try this out more easily. Also, I plan to start a hildonisation branch, and keep another branch for functionality fixes. I’m using Mercurial for revision control, and this will be a good opportunity to play with branching and merging. Hopefully I will get round to setting up an online repository at some stage.

Related posts:

Filed under: maemo,N800,Python — twegener @ 23:19

2007-07-01

Porting Exaile audio player to the Nokia N800

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:

m4a: gnomevfssrc name=source ! demux3gp ! dspaacsink name=sink sync=false'
aac: 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

Filed under: maemo,N800,Python — twegener @ 23:34
Powered by WordPress

-->