Netzflocken

...was so an- und abfällt

Entries in the Category “home-entertainment”

Serving DivX/XviD content with UPnP to the Playstation 3

written by dev, on Dec 18, 2007 2:12:00 PM.

Since today the new firmware 2.10 is out and the Playstation 3 has DivX-Support. :-B

And Coherence with changeset 699 serves these filetypes via UPnP to the Playstation 3 too.

The only thing needed for the UPnP MediaServer is to replace the common mimetype for avi containers from video/x-msvideo with video/avi or video/divx. The DLNA profile seems actually not to be necessary for the video files at all.

Not all DivX flavours are supported, follow the comments here for more details.

PS3 support for DivX playback as this years Christmas present?

written by dev, on Dec 14, 2007 9:51:00 PM.

According to this post at Gizmodo the long awaited support to play DivX files on the Playstation 3 seems to be on its way.

So let's see what DLNA adventures will be in store for us and keep your fingers crossed.

Coherence UPnP MediaServer backend for Last.fm approaching

written by dev, on Dec 9, 2007 10:34:00 PM.

Today on #coherence:
[22:12]	* Crazy_Morty	is just listening to his first track from LastFM!
[22:14]		Skipping works like a charm!
[22:18]		Two days of work. Learning Python included....
[22:18]		Nice Backend. :)

Xbox 360 update brings AVI playback

written by dev, on Dec 3, 2007 8:26:00 PM.

The new firmware update, scheduled for the 4th of December, will bring AVI (MPEG-4 Part 2, Simple Profile and Advanced Simple Profile) playback to the Xbox 360.

Sony, I'm sure you have heard of Sun Tzu? Shouting out what you do next and allowing your opponent to pull the rabbit out of the hat - even worse if the rabbit is such a highly anticipated feature - is hardly found in one of the thirteen chapters of the 'Art of War'. ;-)

Anyway, and that's the main reason for this post, Coherence should - more or less out of the box - stream these kind of video files to both video game consoles.

Coherence 0.1.0 release

written by dev, on Feb 16, 2007 12:40:00 AM.

I did it!

Today I tagged the 0.1.0 release of Coherence and made it public with an entry in the Python Cheeseshop, and it got downloaded already several dozen times.

During the next days the new Elisa release will get announced too, using now, aside from the UPnP MediaServer, Coherence for the UPnP client too.

Somehow I’m now waiting in suspense for new bug reports – not too many I hope , feature requests and new ideas on what to change, to improve or to enhance.

Things that are on the list for the next releases:

  • improve the web UI so we get closer to a web-based UPnP ControlPoint
    Coherence-cp-20070216
    For now we just show all found devices, but thanks to Athena at least in real time when they announce or log off themself.
  • testing of other devices, a first step into the Intel UPnP Device Spy direction
  • “port” Coherence to the Maemo platform, so we’ll can use the UPnP MediaServer and the UPnP MediaRenderer on the Nokia N800
  • switching to Flickrpc - Ross Burtons Twisted based Flickr library
  • start with a DAAP->UPnP bridge and export in a first step DAAP provided content via UPnP

 

Coherence in conjunction with Media Streamer on a Nokia N800

written by dev, on Feb 5, 2007 9:58:00 PM.

N800Thanks to Nokias generosity I now have the possibility to test Coherence with and against the UPnP stack shipped with the N800 and used e.g. by Media Streamer or Canola and the UPnP plugin for the gnome-vfs layer.

So far I used the file manger application and Media Streamer, and there have been pleasant and promising results.

The Coherence powered devices are spotted by the N800 and the content retrieval from the MediaServers - even the Flickr one - works fine.

N800 media streamer screenshot

Albeit from the file manger application which seems to circle sometimes.

The GStreamer MediaRenderer backend is recognized too and can be controlled, with the restriction that the Media Streamer UI does not follow the state changes. I’m still unsure whether this is on behalf of Coherence or on the Media Streamer side, but whatever it is, it can’t be anything more than a mere nothing.

Meaning we are probably only one little bug apart from being able to control Elisa with the N800.

Regarding Media Streamer acting itself as a controllable MediaRenderer, there it is fallen a bit short of my expectations, as it doesn’t provide anything at all – neither controlling nor eventing.

That’s definitily another good reason to get Coherence up and running on the Maemo platform.

PS: If your are like me looking for something to take a screenshot on the N800, I have been lucky with load-applet-run, and I was told @ irc://freenode.net/#maemo that the Maemo screen grabber together with the osso-screenshot-tool should work too.

XBox 360 UPnP client and Coherence in communication therapy

written by dev, on Jan 31, 2007 6:25:00 PM.

The XBox 360 UPnP client is a little bit peculiar and finicky regarding its dealings – well, actually it only wants to talk to its really close friends, the Windows Media Player 11 and the Windows Media Connect server.

With a lot of patient care from Tristan Seligmann and a yet unknown contributor we managed to win its confidence and now that poor little thing has started to talk via UPnP to Coherence – and requests so far audio and image files from the MediaServer, even from the Flickr backend.

To be honest, it was more the devotedness of Coherence than the willingness of the XBox that made this happen, especially when it came to the UPnP idiom spoken in the suburbs of Seattle, but anyway it is a nice thing to see this cagey behaviour come to an end.

And what’s even greater to see is Coherence being of real use for somebody outside and furthermore getting something back!

glueing together GStreamers playbin and Coherences UPnP A/V MediaRenderer

written by dev, on Jan 11, 2007 2:28:00 PM.

In an attempt to work on the documentation and as a practice finding the words to explain how Coherence ticks I'll try to throw some light on how the GStreamer playbin backend and Coherence are glued together to form an UPnP A/V MediaRenderer device.

A device in UPnP speak is a logical something - a grouping of services. A MediaRenderer as an example needs to support

  • a RenderingControl service, which is responsible for adjustment of volume, loudness, brightness,…
  • a ConnectionManager service, used to enumerate and select the transfer protocol (http, rtsp/rtp,…) and
    data format (mp3, ogg,…) to be used for transferring the content
  • an AVTransport service, optional - depending on the transfer protocols the ConnectionManager supports. But if available used to specify the content to be played, start/stop/pause a playback, seek in the content stream,…

These services can be controlled and queried with so called Actions, e.g. SetVolume() and GetVolume(), and hold their current state in so called StateVariables, e.g. Volume. A call to SetVolume() sets the volume value on the actual rendering engine and reflects that change in the variable Volume. And a call to GetVolume() retrieves the value from that variable. Furthermore a service is supposed to propagate the values of these variables on change to interested parties, e.g. to an UPnP ControlPoint.

Now one of the basic principles of Coherence is to seal off the backend – the actual rendering engine, in this case the GStreamer playbin – from the UPnP related tasks (and later from the D*AP ones) as much as possible.

This means that a backend should only need to

  1. tell Coherence what kind of device(s) it wants to resemble, e.g. a MediaRenderer
  2. define specific conditions, e.g. that is supports only decoding of mp3 content
  3. provide methods Coherence can access when an action is called that has effects on the backend engine, e.g. a volume change
  4. inform Coherence about state changes, e.g. the end of the media content is reached and playback has stopped

Everything else is the job of Coherence:

  • propagate the device on the network (SSDP/MSEARCH)
  • generate the necessary device and service descriptions with reasonable defaults, corresponding to the backends capabilities
  • provide the control interfaces to the actions the services have
  • handle all event subscription and propagation tasks (GENA)

This means also, that all actions with no effects on the backend engine are handled completely within Coherence, like an action that retrieves only a variable value. Of course a backend can override this if it wants to, but basically there is no need to do it.

In our GStreamer playbin case this (simplified) looks like this:

class Player:

    """ see item 1. above """
    implements = ['MediaRenderer']

    """ see item 2. above """
    vendor_value_defaults = {'RenderingControl': {'A_ARG_TYPE_Channel':'Master'},
                             'ConnectionManager': {'SinkProtocolInfo', 'http-get:*:audio/mpeg:*'}}
    vendor_range_defaults = {'RenderingControl': {'Volume': {'maximum':100}}}

    def __init__(self, device):
        self.player = gst.element_factory_make("playbin", "myplayer")
        self.device= device

    def set_volume(self, volume):
        """ here the actual volume change takes place """
        """ gstreamer playbin has a volume range from 0.0-10.0 """
        self.player.set_property('volume', float(volume)/10)

         """ feed back the new state - our item 4. """
        rcs_id = self.device.connection_manager_server.lookup_rcs_id(self.current_connection_id)
        self.device.rendering_control_server.set_variable(rcs_id, 'Volume', volume)

    def upnp_SetVolume(self, *args, **kwargs):
    """ that's a method referred in item 3. """
        InstanceID = int(kwargs['InstanceID'])
        Channel = kwargs['Channel']
        DesiredVolume = int(kwargs['DesiredVolume'])
        self.set_volume(DesiredVolume)
        return {}

This is not perfect and not final yet and there will be some changes especially in the way how item 4. is handled. But the purpose of that backend is among other things to straighten out the bumpiness of these glue points.

And btw., in this backend the engine is embedded, but as stated in an earlier post, there is absolutly no reason why instead of calling self.player.set_property to set the volume this couldn’t be some ipc call (xml-rpc, dbus, Twisted PB,…) or an IR/ZigBee/ZWave signal emitted.