Sunday 26 August 2012

Media in the Home

Now I have moved from student halls to a house, I have begun playing more with media, for instance, I really like the idea of being able to easily play my music in the kitchen. The problem is, all my music is upstairs on my desktop computer, the solution? Mediatomb, Gnome and UPnP.

So what's UPnP, well, I don't really know, but what I have worked out so far, is it works across a network, UPnP devices can find each other automatically, and work out what each other can do.

For this experiment, I was interested in 3 classes of device in UPnP, controlers, media servers, and media renderers. Devices can be more than one class, for instance, lots of devices are media renderers and limited controllers, where the controller can only control the local device.

So, I began by installing mediatomb on my desktop machine. Mediatomb is a media server, it takes content, music pictures or video (and some other stuff), and makes it available over UPnP. Once installed you can configure it with the web interface at http://localhost:49152/ .

Next we need something to render the music that mediatomb makes available, so for this, I used Rygel. You might notice from the wiki page, that Rygel can also be a media server, I haven't tried this functionality as I prefer the daemon nature of mediatomb. So to use Rygel as a media renderer, the playbin plugin must be installed, in Debian this is as easy as installing the rygel-playbin package. Once done, run the rygel command, and if you see this message "Rygel-Message: New plugin 'Playbin' available", it hopefully means its working. I have Rygel currently running on an EeePC in my kitchen, although I am hoping to perhaps replace this with a raspberry pi in the future.

So lets recap, at the moment, my desktop machine is running mediatomb, sharing its content with the network, and my netbook is running Rygel, that can render content with the speakers connected to it. What we need next is a controller, to allow us to actually do something with this. For this we can use one of the gupnp tools, in Debian you need to install the gupnp-tools package. Then start the AV Controler, (gupnp-av-cp from the shell). This allows you to get content from the server, and play it on the renderer.

What I really like about this setup, is that its really extensible. If I can find/write a UPnP controller for my Android phone, I will be able to control the music for my house from my phone. I also found something called rhythmpnp, its a media renderer plugin for Rhythmbox, I haven't managed to run it yet, but I am interested in seeing if it could also be extended to act as a controller?

12 comments:

  1. It is interesting that lately everyone seems to percept Rygel as a renderer although that was more of a byproduct in the beginning.

    Rhythmpnp needs porting to rhythmbox's new plugin API.

    ReplyDelete
  2. Thanks for the heads up, I will try messaging the rhythmbox mailing list.

    ReplyDelete
  3. "Rygel can also be a media server, I haven't tried this functionality as I prefer the daemon nature of mediatomb"

    Whats this 'deamon nature' ? Rygel doesn't require X if thats what you think, I know people who run it on headless machines. There is no we interface though but that could be easily implemented, especially if you know some PHP. Basically you have to create a simple web form that allows you to change the settings in the rygel.conf file and then sends a SIGHUP to running rygel instance.

    ReplyDelete
    Replies
    1. Ok, I was not sure what it required, but mediatomb seemed quite easy to setup on Debian, I also found it first so I ended up using that instead.

      Delete
    2. Uch, yuck, PHP. we should handle this via the presentation page feature and something less violent.

      The SIGHUP "issue" is going to disappear eventually, it's in my tentative plans for 0.18

      Delete
  4. You can use Skifta on your Android phone for everything UPnP AV.

    ReplyDelete
    Replies
    1. It might work, I don't know, I don't like non free software, especially non free software with a long terms of service agreement.

      Delete
  5. As for media browsing and playback, in the latest Rhythmbox releases (2.95 and newer) you should be able to enable the Grilo media browsing from the plug-ins dialog. It supports UPnP, among other media sources.

    ReplyDelete
  6. I'm using Twonky on my QNAP NAS and BubbleUPnP on my Android. I also has BubbleUPnP server on the NAS as a gateway for streaming Twonky music to the Androids when I'm outside of my house.

    What I'm missing is a media renderer connected to my home audio system that I can control from my Android. My first attempt with Rygel as a renderer didn't work (no playback). Might try again. The problem is that I have not been able to find Rygel documentation specific to using it solely as a media renderer.

    There is plenty of upnp media servers around. I have not been able to see any reason for replacing any of the other existing media servers with rygel. However, there are not many mature media renderer. That explains rygel popularity as a renderer, IMHO. Users are gravitating to what they need.

    ReplyDelete
  7. Hi,

    I have a quick question about your blog, do you think you could e-mail me?

    Brian

    ReplyDelete
  8. I have begun playing more with media, for instance, I really like the idea of being able to easily play my music in the kitchen.

    ReplyDelete
  9. I'll right away grab your rss as I can not find your email subscription link or e-newsletter service. Do you've any? Please let me know in order that I could subscribe. Thanks.
    short ralph lauren

    ReplyDelete