UPnP Hall of shame

UncategorizedDLNA, English, N9, UPnPJens

This XML snippet is from a LG TV:

ackDuration val="àý]Üž"/><CurrentMediaDuration val="àý

Duration is supposed to be a string representation of an integer. Well done, guys m(

A common mistake in UPnP

UncategorizedDLNA, English, Gnome, rygel, UPnPJens

We get a lot of reports of UPnP AV clients not working properly with Rygel. It either isn’t seen by the client at all or does not show any content.

The reason is usually the same. People are not following the specs. Rygel seems to be one of the few UPnP-AV/DLNA server out there that implements a higher version of the UPnP-AV specification than :1. A lot of clients are explicitly testing for this version, ignoring higher versions although the UPnP standard states that higher version services need to be backward-compatible. (cf. UDA 1.1, section 1.2.2, last paragraph on page 10). Of course we can work around that – and we do, but the list of exceptions is getting longer and longer and to be honest I’m starting to get really annoyed of those fixes.

I expect that there will be more and more devices with higher versions now that DLNA has added features that require higher versions of the specification than :1. So pretty please get your clients fixed. And if you don’t want to, then don’t make it extra complicated to work around your bug. But really, fix it.

And please have a working support email address so I can complain directly. About every client author I tried to contact has bounced – and the rest ignored me.

N9 PR1.3

UncategorizedDLNA, English, Linux, N9, rygel, UPnPJens

You might have noticed, there’s a new device update out; the changes relates to Rygel are rather small:

  • It fixes 100% CPU usage when encountered by DLNA clients that issue a massive amount of seek requests (GNOME Bug#662125)
  • Fixes the issue with XBox 360 that showed songs up to 5 times (GNOME Bug#664184)
  • A small memory leak when streaming transcoded audio

Rygel split-up

UncategorizedDLNA, English, Gnome, Linux, rygel, UPnPJens

Following up on Murray’s “Rygel for a DLNA Player” proposal, I’ve made some of the suggested changes listed there which are now in master. These two new libraries have been added

  • librygel-core: This has been a long-standing TODO item. It was necessary to allow in-process use of the DLNA and UPnP knowledge coded in Rygel, allowing the creation of librygel-renderer (see below). On top of this there are other benefits
    • It will allow a Rygel version running on Windows without ugly libtool hacks for the plug-ins.
    • It simplifies the reuse of other parts of Rygel’s code, such as the transcoding HTTP server, in programs like Korva.
  • the new librygel-renderer: In essence this is the playbin plugin with a bit of API on top that simplifies the code necessary to create a renderer. It offers either a playbin element you can use in your code or wraps around an existing playbin.

In future we can extend this family of libraries by “librygel-browse” for remote content access and “librygel-control” for remote control.

To demonstrate librygel-renderer’s capabilities of converting an arbitrary media player based on GStreamer’s GstPlaybin2 into a proper UPnP/DLNA renderer, I have added librygel-renderer support to Totem. You can see the result in the following demo:

The first part of the video (using Sintel) shows how changes in local file playback are being reflected on the UPnP side. In the second part, I set a remote video (Big Buck Bunny) and control totem solely via UPnP, where play, pause, stop, controlling volume, seeking and getting the current playback position is working quite well.

This simple conversion is not a complete DLNA Player. It would need UPnP/DLNA server browsing capabilities for this, as stated in the proposal (In general. Totem can access these servers via its Grilo plug-in).

Of course, with Totem being a complex, mature piece of software, some things don’t work yet:

  • Volume changes in Totem aren’t reflected via UPnP
  • It is not possible to initiate a remote play-back until Totem has an item in its playlist
  • The announced media format support is nowhere near what Totem actually supports

Still, getting an UPnP/DLNA-compatible (and actually close to certifiable) renderer in three lines of code is impressive, don’t you think?

There’s one draw-back that I realized while implementing this. My initial idea to sit on top of a GStreamer playbin2 might be flawed for already existing and mature software such as Totem. There might be much more code-paths dealing with control that happen outside of a playbin. We have an alternative for that as well and that would be implementing one of Rygel’s interfaces by the consuming party. The UPnP and DLNA compatibility that is already in the current code would need to be transferred to this, which is, of course, more work than just attaching to a playbin.

Why should I prefer this above the already available MPRIS Rygel plug-in? There might be several reasons.

  • You don’t want a whole separate Rygel process running just for adding UPnP renderer capabilities to your media player.
  • You aim for some kind of UPnP or DLNA certification – The additional layer of indirection can make that really hard while the presented approach is nearly ready.

So are we going to abandon Rygel’s MPRIS renderer plugin now? No. Because we can’t expect every media player in the world a) use GStreamer and b) want to link against Rygel. MPRIS gives us a quick, ready-made access to a vast amount of players out there and the compatibility it offers is (most of the time) just enough for casual home use.

spacer

PushUp 0.3.0

UncategorizedDLNA, English, N9, UPnPJens

spacer

Installing this version will REBOOT your device!

Also, if you have installed the previous version from OVI store, you need to uninstall it first before installing this version.

I have release a new version of PushUp. Most notable changes, aside those from syncing with upstream korva, are:

  • Compatibility with devices that need file extensions on the HTTP URLs
  • The possibility to share files which are unknown to Tracker
  • Drop the libffi dependency which caused install issues for some people
  • Next try on using a nice icon in the share dialog
  • Default icons for remote devices
  • An option to cancel transfers using Transfer UI
Please note that due to the slight issues with the N9’s sharing ui, the device has to reboot after installing PushUp. This will happen automatically.
As usual, it’s available here, at apps.formeego.com or in OVI store.

spacer       spacer

Plants

UncategorizedEnglish, Plants, WohnungJens

Following up from ~ three years ago, here’s how it looks like todayspacer

Helium 0.5.0 available

UncategorizedDLNA, English, N9, OSS, Qt, rygel, UPnPJens

spacer Helium 0.5.0 is available. It contains a lot of improvements and some new features such as

  • Volume control on the player
  • Possibility to play a media file on a different renderer than the currently selected
  • Option to start the on-device media sharing
  • Some more settings

Get it on this site or via apps.formeego.com. I’ve also updated the documentation to reflect the changes.

Rygel on Ubuntu 12.04 service announcement

UncategorizedDLNA, English, Gnome, Linux, rygel, UPnPJens

If you just upgraded to Ubuntu 12.04 and your PS3 or Sony TV stopped showing videos, the work-around is to uninstall gstreamer0.10-plugins-bad-multiverse. See bug 672439 for the details.

The bright side is that for the first time ever, we have a recent Ubuntu shipping the latest version of Rygel.

N9 media pushing

UncategorizedDLNA, English, Gnome, Linux, N9, Programmieren, Qt, UPnPJens

 

spacer

Ever since the announcement of the N9’s DLNA support people were looking for a feature called DLNA +PU+ which allows you to send media files to e.g. DLNA-capable TVs without enabling content sharing on your device, giving you a really fine-grained control about what and where to share to.

spacer PushUp is a small utility that hooks into the N9’s sharing framework and allows to you push an image or a video to your TV just like you would with Bluetooth or NFC. Get it on this site (or later through the Nokia Store).

It is an offspring of my Korva project, a D-Bus specification and its implementation for media pushing. While still work-in-progress, it’s already fully functional.

Edit: I had to update the package because the icon was missing and cancelling the device selector was broken.
Edit2: Updated again since it was broken on PR < 1.2.

Modifying your GNOME keymap programmatically

UncategorizedEnglish, Gnome, Programmieren, PythonJens

For some reason I’ve a notebook with a Swedish keyboard but when docked I use my ergonomic keyboard with a German layout. To automatically switch the layout when the external keyboard is connected, I cooked up this script and added a .desktop file to $HOME/.config/autostart:

#!/usr/bin/env python
 
from gi.repository import Gtk, GLib, Gkbd
import usb
import sys
 
# Holtek Semiconductor, Inc. PS/2 keyboard + mouse controller
vendor=0x04d9
product=0x1400
 
c = Gkbd.Configuration.get();
 
try:
    # find index for german
    de = c.get_short_group_names().index('de')
    for bus in usb.busses():
        for dev in bus.devices:
            if dev.idVendor == vendor and dev.idProduct == product:
                c.lock_group (de)
                sys.exit(0)
except Exception, e:
    print e
    pass

This is using pyusb 0.4, it gets a bit easier with 1.0.