Name: James Henstridge
Member since: N/A
Last Login: 2008-11-03 01:23:07
Homepage: http://www.jamesh.id.au/
Notes:
A GNOME hacker. Author of gnorpm, gnome-python, libglade, pygtk and others. Former maintainer of dia. Contributor to various gnome packages.
[New diary entry] [Planet Gnome] [Planet Ubuntu] [Technorati Profile]
More Rygel testing
In my last post, I said I had trouble getting Rygel’s tracker backend to function and assumed that it was expecting an older version of the API. It turns out I was incorrect and the problem was due in part to Ubuntu specific changes to the Tracker package and the unusual way Rygel was trying to talk to Tracker.
The Tracker packages in Ubuntu remove the D-Bus service activation file for the “org.freedesktop.Tracker” bus name so that if the user has not chosen to run the service (or has killed it), it won’t be automatically activated. Unfortunately, instead of just calling a Tracker D-Bus method, Rygel was trying to manually activate Tracker via a StartServiceByName() call. This would fail even if Tracker was running, hence my assumption that it was a tracker API version problem.
This problem will be fixed in the next Rygel release: it will call a method on Tracker directly to see if it is available. With that problem out of the way, I was able to try out the backend. It was providing a lot more metadata to the PS3 so more files were playable, which was good. Browsing folders was also much quicker than the folder back end. There were a few problems though:
When the folder back end fixes the metadata and speed issues, I’d be inclined to use it over the tracker back end.
Video Transcoding
Getting video transcoding working turned out to require a newer GStreamer (0.10.23), the “unstripped” ffmpeg libraries and the “bad” GStreamer plugins package from multiverse. With those installed, things worked pretty well. With these dependencies encoded in the packaging, it’d be pretty painless to get it set up. Certainly much easier than setting things up in MediaTomb’s configuration file.
Ubuntu packages for Rygel
I promised Zeeshan that I’d have a look at his Rygel UPnP Media Server a few months back, and finally got around to doing so. For anyone else who wants to give it a shot, I’ve put together some Ubuntu packages for Jaunty and Karmic in a PPA here:
Most of the packages there are just rebuilds or version updates of existing packages, but the Rygel ones were done from scratch. It is the first Debian package I’ve put together from scratch and it wasn’t as difficult as I thought it might be. The tips from the “Teach me packaging” workshop at the Canonical All Hands meeting last month were quite helpful.
After installing the package, you can configure it by running the “rygel-preferences” program. The first notebook page lets you configure the transcoding support, and the second page lets you configure the various media source plugins.
I wasn’t able to get the Tracker plugin working on my system, which I think is due to Rygel expecting the older Tracker D-Bus API. I was able to get the folder plugin working pretty easily though.
Once things were configured, I ran Rygel itself and an extra icon showed up on my PlayStation 3. Getting folder listings was quite slow, but apparently this is limited to the folder back end and is currently being worked on. It’s a shame I wasn’t able to test the more mature Tracker back end.
With LPCM transcoding enabled, I was able to successfully play a Vorbis file on the PS3. With transcoding disabled, I wasn’t able to play any music — even files in formats the PS3 could handle natively. This was apparently due to the folder backend not providing the necessary metadata. I didn’t have any luck with MPEG2 transcoding for video.
It looks like Rygel has promise, but is not yet at a stage where it could replace something like MediaTomb. The external D-Bus media source support looks particularly interesting. I look forward to trying out version 0.4 when it is released.
django-openid-auth
Last week, we released the source code to django-openid-auth. This is a small library that can add OpenID based authentication to Django applications. It has been used for a number of internal Canonical projects, including the sprint scheduler Scott wrote for the last Ubuntu Developer Summit, so it is possible you’ve already used the code.
Rather than trying to cover all possible use cases of OpenID, it focuses on providing OpenID Relying Party support to applications using Django’s django.contrib.auth authentication system. As such, it is usually enough to edit just two files in an existing application to enable OpenID login.
The library has a number of useful features:
While the code can be used for generic OpenID login, we’ve mostly been using it for single sign on. The hope is that it will help members of the Ubuntu and Launchpad communities reuse our authentication system in a secure fashion.
The source code can be downloaded using the following Bazaar command:
bzr branch lp:django-openid-auth
Documentation on how to integrate the library is available in the README.txt file. The library includes some code written by Simon Willison for django-openid, and uses the same licensing terms (2 clause BSD) as that project.
Sansa Fuze
On my way back from Canada a few weeks ago, I picked up a SanDisk Sansa Fuze media player. Overall, I like it. It supports Vorbis and FLAC audio out of the box, has a decent amount of on board storage (8GB) and can be expanded with a MicroSDHC card. It does use a proprietary dock connector for data transfer and charging, but that’s about all I don’t like about it. The choice of accessories for this connector is underwhelming, so a standard mini-USB connector would have been preferable since I wouldn’t need as many cables.
The first thing I tried was to copy some music to the device using Rhythmbox. This appeared to work, but took longer than expected. When I tried to play the music, it was listed as having an unknown artist and album name. Looking at the player’s filesystem, the reason for this was obvious: Rhythmbox had transcoded the music to MP3 and lost the tags. Copying the ogg files directly worked a lot better: it was quicker and preserved the metadata.
Of course, getting Rhythmbox to do the right thing would be preferable to telling people not to use it. Rhythmbox depends on information about the device provided by HAL, so I had a look at the relevant FDI files. There was one section for Sansa Clip and Fuze players which didn’t list Vorbis support, and another section for “Sansa Clip version II”. The second section was a much better match for the capabilities of my device. As all Clip and Fuze devices support the extra formats when running the latest firmware, I merged the two sections (hal bug 20616, ubuntu bug 345249). With the updated FDI file in place, copying music with Rhythmbox worked as expected.
The one downside to this change is that if you have a device with old firmware, Rhythmbox will no longer transcode music to a format the device can play. There doesn’t seem to be any obvious way to tell if a device has a new enough firmware via USB IDs or similar, so I’m not sure how to handle it automatically. That said, it is pretty easy to upgrade the firmware following the instructions from their forum, so it is probably best to just do that.
PulseAudio
It seems to be a fashionable to blog about experiences with PulseAudio, I thought I’d join in.
I’ve actually had some good experiences with PulseAudio, seeing some tangible benefits over the ALSA setup I was using before. I’ve got a cheapish surround sound speaker set connected to my desktop. While it gives pretty good sound when all the speakers are used together, it sounds like crap if only the front left/right speakers are used.
ALSA supports multi-channel audio with the motherboard’s sound card alright, but apps producing stereo sound would only play out of the front two speakers. There are some howtos on the internet for setting up a separate ALSA device that routes stereo audio to all the speakers in the right way, but that requires that I know in advance what sort of audio an application is going to generate: something like Totem could produce mono, stereo or surround output depending on the file I want to play. This is more effort than I was usually willing to do, so I ended up flicking a switch on the amplifier to duplicate the front left/right channels to the rear.
With PulseAudio, I just had to edit the /etc/pulse/daemon.conf file and set default-sample-channels to 6, and it took care of converting mono and stereo output from apps to play on all the speakers while still letting apps producing surround output play as expected. This means I automatically get the best result without any special effort on my part.
I’m not too worried that I had to tell PulseAudio how many speakers I had, since it is possible to plug in a number of speaker configurations and I don’t think the card is capable of sensing what has been attached (the manual documents manually selecting the speaker configuration in the Windows driver). It might be nice if there was a way to configure this through the GUI though.
I’m looking forward to trying the “flat volume” feature in future versions of PulseAudio, as it should get the best quality out of the sound hardware (if I understand things right, 50% volume with current PulseAudio releases means you only get 15 bits of quantisation on a 16-bit sound card). I just hope that it manages to cope with the mixers my sound card exports: one two-channel mixer for the front speakers, one two-channel mixer for the rear two speakers and two single channel mixers for the center and LFE channels.
jamesh certified others as follows:
Others have certified jamesh as follows:
[ Certification disabled because you're not logged in. ]
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!