Raspberries and Rygel

First I have to apologize for the delay. I initially announced this in my GNOME.Asia talk almost two months ago.

TL;DR:

Raspbian and hardware-accelerated video decoding in Rygel without X. Follow brief instructions on http://rygel-project.org/raspbian/

What’s this problem?

There are already several solutions in the wild that combine Rygel and the Rasbperry Pi, be it Guacamayo or stock Raspbian. While Guacamayo provides easy server and audio renderer images, none of the existing solutions provide a video renderer.
Why’s that? Well, the RPi is (intentionally) slightly underpowered to do video decoding on the CPU. Howerver, it supports video decoding in hardware.
The issue here is that Raspbian is based on wheezy which only comes with GStreamer 0.10 while the support for hardware-based video decoding on the RPi in gstreamer-omx was only added recently to GStreamer 1.0.x. And since this is wheezy, the Rygel package that comes with it is too old to use GStreamer 1.0.

So let’s just grab the packages from sid armhf, should be working, no?

No it doesn’t. Rasbpian is basically a recompilation of Debian for ARMv5 with hard float ABI, while Debian itself is using ARMv7. So we can’t just copy packages.

So?

Well the good news is that we don’t need to do all the heavy recompiling of GStreamer. Someone already did that for us. This work is available at http://vontaene.de/raspbian-updates/ (from the raspberrypi.org forum).

And what exactly are you doing now?

We provide a Debian repository with Rygel’s packages backported to Raspbian. That’s a bit boring, you say? Indeed. This is only the beginning. There will also be a set of instructions to convert a Rasbian installation into a hardware-accelerated DLNA renderer. The first step to this is a meta-package called raspbian-dlna-renderer which depends on all the other important packages necessary for a complete environment.

What’s working right now?

First, add the following repositories to your /etc/apt/sources.list

deb http://rygel-project.org/raspbian wheezy/
deb-src http://rygel-project.org/raspbian wheezy/
deb http://vontaene.de/raspbian-updates/ . main

The packages on rygel-project.org are signed with my private GPG key, key id 7696ECBF. Then run apt-get update && apt-get install raspbian-dlna-renderer to get all updated and necessary packages.
I’ve modified /boot/cmdline.txt to get a screen that is as empty as possible by adding silent and logo.nologo to the kernel parameters.
You can then launch Rygel as user and play files on the RPi using Helium, gupnp-av-cp from GUPnP Tools or any other DLNA control point.

What’s next?

A next version of the meta-package will probably add auto-starting Rygel as a system service – Maybe we’ll even provide a ready-to-go image…

8 thoughts on “Raspberries and Rygel

  1. Hello Jens,
    This is great news! I was wondering if packages were also going to be built for Arch; I am currently using their build of gst 1.0.8, and when I try to render videos in Rygel it throws the following errors:
    (rygel:785): Rygel-WARNING **: rygel-user-config.vala:241: Failed to load user configuration from file ‘/root/.config/rygel.conf’: No such file or directory
    External-Message: rygel-external-plugin-factory.vala:33: Module ‘External’ disabled by user. Ignoringâ¦
    GstLaunch-Message: rygel-gst-launch-plugin.vala:28: Plugin ‘GstLaunch’ disabled by user, ignoring..
    Mediathek-Message: rygel-mediathek-plugin.vala:33: Plugin ‘ZDFMediathek’ disabled by user, ignoring..
    Rygel-Message: New plugin ‘MediaExport’ available
    MPRIS-Message: rygel-mpris-plugin-factory.vala:33: Module ‘MPRIS’ disabled by user. Ignoringâ¦
    (rygel:785): Rygel-Tracker-CRITICAL **: file rygel-tracker-plugin-factory.c: line 215: uncaught error: Error spawning command line `dbus-launch –autolaunch=2ead87dbac2d4f44a28ed7598aec6c82 –binary-syntax –close-stderr’: Child process exited with code 1 (g-spawn-exit-error-quark, 1)
    Rygel-Message: New plugin ‘Playbin’ available
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: GLX: XOpenDisplay failed
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: The autovideosink element is not working. (gstplaysink.c(1794): gen_video_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: Internal data stream error. (gstomxvideodec.c(1667): gst_omx_video_dec_loop (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
    stream stopped, reason not-linked)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: GLX: XOpenDisplay failed
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: The autovideosink element is not working. (gstplaysink.c(1794): gen_video_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: GLX: XOpenDisplay failed
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: The autovideosink element is not working. (gstplaysink.c(1794): gen_video_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: Cancelled (gstsouphttpsrc.c(879): gst_soup_http_src_finished_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin2/GstSoupHTTPSrc:source:
    libsoup status code 1)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: Cancelled (gstsouphttpsrc.c(879): gst_soup_http_src_finished_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin3/GstSoupHTTPSrc:source:
    libsoup status code 1)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: GLX: XOpenDisplay failed
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: The autovideosink element is not working. (gstplaysink.c(1794): gen_video_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: DRI2: xcb_connect failed
    libEGL warning: GLX: XOpenDisplay failed
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: The autovideosink element is not working. (gstplaysink.c(1794): gen_video_chain (): /GstPlayBin:playbin0/GstPlaySink:playsink)
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:442: Going to STOPPED state
    ** (rygel:785): WARNING **: rygel-playbin-player.vala:438: Error from GStreamer element playbin0: Cancelled (gstsouphttpsrc.c(879): gst_soup_http_src_finished_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin7/GstSoupHTTPSrc:source:
    libsoup status code 1)
    If there is a config option I am simply missing, your help would be much appreciated!
    Thanks!
    -Sean

    1. The gsteglessink on Arch is built with X11 support: libEGL warning: DRI2: xcb_connect failed So you either need to run it inside X or recompile it to work without X11. It’s in gst-plugins-bad.

  2. Hi,
    I’m trying to install the dlna renderer on my raspbian but I get an error when doing “sudo apt-get update” like this:
    “GPG error: http://rygel-project.org wheezy/ Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 10F6E970175D29E1″
    Now, I’m quite a beginner with linux but I found that I need to add that key to apt-key.
    So I’ve done something like this:
    gpg –recv-keys 7696ECBF
    gpg -a –export 7696ECBF | sudo apt-key –
    but after a new apt-get update, I’m still getting the same error.
    Could you please help me with this issue most likely I’m doing something wrong or I’m missing some steps.
    Thanks,
    Catalin

  3. Works brilliantly, thank you. I had some difficulty with a vanilla raspberry install getting the sound to work, ALSA and Pulseaudio needed to be installed.
    I have teamed it up with BubbleUPNPServer to enable open-home functionality, works brilliantly with videos (GetIplayer) http://blog.scphillips.com/2013/07/playing-music-on-a-raspberry-pi-using-upnp-and-dlna-revisited/
    I’m using this init script, if it is useful:
    https://dl.dropboxusercontent.com/u/107094724/rygel
    thanks very much, really good stuff.

  4. Thank you very much for your work, I like sending video URLs per UPnP control point to the rygel renderer.
    It would be great if you could upgrade your package with a service.

Comments are closed.