GStreamer RTSP server

One request we get often here at Collabora Multimedia is from people using GStreamer in the embedded and mobile sector and are looking for ways to stream over RTSP with GStreamer, often in combination with various kinds of transcoding and proxying functions. Due to this we have launched a new project, the GStreamer RTSP server. This server is written by GStreamer maintainer Wim Taymans and is tightly based on the RTP infrastructure in GStreamer that he has been working on for quite some time now.

It is a server written in C which can stream any GStreamer supported file over RTSP using any of the wide range of RTP formats supported by GStreamer. It also allows you to take any RTSP or HTTP stream and proxy it onwards over RTSP. The screenshot below is of totem playing a RTSP stream of the Max Payne trailer from Apple’s website. The stream offered by Apple is a normal Quicktime http stream, but our RTSP server repackages it and retransmits it over RTSP on my local network on the fly.

The code is currently only available through a git repository which you can grab using this command:
git clone git://git.collabora.co.uk/git/gst-rtsp-server.git gst-rtsp-server

The reason there is no formal release yet is due to early stage the software is in, while it works it is not very user friendly yet, with media paths having to be edited and compiled in with the server for instance. But for those looking for a RTSP server solution using GStreamer, which is suitable for putting onto embedded and mobile devices, then it might be enough to get you started and of course we at Collabora are available to offer assistance for those who want it. One hope we have is that this code will help people doing DLNA servers support the mobile profile of that specification for instance.

We also plan on moving the code into GStreamer’s code repository once that is migrated to git from CVS.

Supporting Pitivi

For a long while we had discussions here at Collabora Multimedia about how to push Pitivi forward at a more rapid pace. While Edward has been working on it as time allows, we came to the conclusion that if the Linux desktop was going to have a nice and easy to use video editor any time soon, we needed to do something to increase the pace of development significantly. We have several efforts under way to achieve this and I will announce the first one today:

We just hired Brandon Lewis for the sole purpose of doing Pitivi development. Brandon has been working on Pitivi for a long time now, having gotten involved during last years Google Summer of Code. He brings a lot of python development skills to the table and will let Edward focus his currently limited Pitivi hacking time (we hope to change this too soon :) on Pitivi related improvements in GStreamer and Gnonlin.

Brandon job will be making sure all the features available gets exposed in the user interface and that the user interface is intuitive and easy to use.

So Brandon, welcome to the team and lets make Pitivi rock!

Totem BBC plugin

As I mentioned in my previous blog post here at Collabora Multimedia we have been working with Canonical and the BBC to create a plugin for Totem which plays BBC content. This work is progressing well and with the recent patches we made for Totem to sort out python threading issues are looking really good. I really recommend that people running the latest Ubuntu test releases grab this for some testing. I attached a screenshot of Totem playing a Dirac stream from the BBC showing Big Buck bunny.

Big Buck Bunny

Big Buck Bunny

Update:: I noticed a lot of people commenting on the user interface. We are aware that the current user interface is far from perfect and a lot of the requested features are planed. So far we have focused on getting the base technology working smoothly which I think you will agree is the most important first step. A nice looking user interface is of little value if the application locks up :)

The arguments for using GStreamer

There ended up being quite a lot of comments posted to my blog post yesterday where I pointed out a logical fallacy in a blog post by Aaron Segio. I wasn’t online in the evening so I didn’t reply to the comments posted, but let put down my arguments here instead.

Benoit Jacobs posted a reply making the point about Phonon being smaller than a multimedia framework and that on Windows and Mac installing another multimedia framework would be redundant. This argument rests on some assumptions I think are false. First of all it assumes that GStreamer is huge while Phonon is small. The core idea behind GStreamer since day one was to keep the core small and media agnostic while all functionality was put into plugins. This means that what you install on Windows or Mac, if all you want is access to the codecs provided on those platforms is actually very small. And while I haven’t looked at Phonon’s disk usage I would be suprised if Phonon plus dependencies really had much of an advantage in that area.

The second assumption is that using three different media frameworks is in some way work saving. Having talked with people who tried going the multi framework route before deciding to just use GStreamer on all three major platforms I can tell you that this simply isn’t true. First of all is the problem that you have three major sources for bugs instead of one. So what people trying this experienced was that instead of hitting one bug in GStreamer and having to fix that, they instead hit one bug in GStreamer, one bug in Quicktime and one bug in DirectShow. And since they didn’t have the source code to Quicktime and DirectShow they often had to introduce ugly work arounds in the application layer. The other cost people experience is that everytime a new feature is needed they would have to implement it once for each of their backends. And Phonon do not insulate people against these kind of problems. They will still hit bugs in the underlaying frameworks and whenever they try to do something Phonon do not support, they either have to try to extend Phonon, hoping that the media frameworks are similar enough in terms of that specific functionality to make this viable, or access the underlaying frameworks directly. And if they want to add a new codec for instance they would still have to implement that codec for three media frameworks instead of one.

bluescarni commented that I had a comprehension problem since Aaron was clearly talking about Qt apps. I am not sure what to reply to that considering you in your own comment posted the quote from Aaron starting with the words ‘Phonon is also more than just an option for Qt apps’. True enough, English is a second language for me, but I do feel I am somewhat in firm ground here…

There was quite a few comments about how Phonon was a better choice for Qt developers. First of all my original blog post was in direct response to a claim by Aaron that Phonon was a good choice also for non-Qt developers doing cross platform applications. So I do not feel a strong need to engage in that debate. But my paragraph above on the second assumption made by Benoit sums up why I do think there might not even be true for even for Qt developers in a lot of cases.

Aaron commented that Phonon is not in the same space as GStreamer. Sure, Phonon does not do most of what GStreamer does, but GStreamer does provide a key feature of Phonon, providing an easy to use API across Windows, Mac and Linux/Unix. Sure you ‘don’t get a hard dependency on any one multimedia system’ with Phonon, but you do get a dependency on Phonon and its dependencies instead. So the argument that ‘and like it or not most aren’t using GStreamer on those platforms’ doesn’t compute, because most applications on those platforms are not using Phonon either. The argument is not about what applications use today, cause if that is the argument then people should just use DirectShow or Quicktime. But instead the argument is about what is the best way to write a cross platform multimedia application today. And here I think GStreamer is a better option in most cases, especially the cases when your application is not using Qt.

Aaron also repeated the oft heard argument that Phonon is for KDE about not repeating the mistakes of Arts. And I guess this is one of the big differences in perception. Because for Aaron for KDE to have used GStreamer would have been repeating Arts, but for me Phonon is repeating the Arts story. Back in the day if one dared to take issue about any of the wonderous claims made about Arts one got tons of comments about just being partisan and ‘hating Arts or hating KDE’. Kinda like how it is today when one tries to point out that Phonon is not the universal wonder solution that Aaron likes to paint it as.

So to make it clear, I am not arguing that using Phonon is the biggest mistake you can ever make in any possible situation. I am taking issue with the promotion of Phonon as a better solution than just using GStreamer for a lot of specific use cases including cross-platform development. The strength of Phonon lies in providing a familiar API to existing Qt developers, giving them access to some limited multimedia functionality, but in terms of promoting itself as a generic cross platform multimedia development API it falls down, Phonon is attempting to do what wxWidgets tries to do for GUI components, and I never thought it worked very well for wxWidgets either.

GUADEC photos online

I have been looking for a new hosting option for a while and last week I finally choose one. Based on recommendations from others I ended up going with Slicehost. Slicehost advertise themselves as being a hosting company for developers, which I learned is definitely true. It is the first time ever I had a hosting setup where I even needed to install and configure my own email server. Learned a lot about Postfix over the last weekend :)

That said their setup is pretty nice. You can choose which linux distro you prefer from a quite big list and they will automatically set up your slice with that distro for you. They also have nice webtools for configuring things like DNS. And finally they got a lot of easy to follow tutorials on how to get common server tasks configured and running. Most of them Ubuntu centric, but I found it easy enough to find the Fedora equivalents when needed.

Once the basics was taken care of it was time for me to get my photo gallery back online after a longer period of being offline. Mostly due to me not having kept the gallery code up-to-date (and thus secure) it had been disabled at my old hosting provider. So upgrading to latest version was step one. The upgrade instructions turned out to not work at all, but doing a fresh install seemed to do the upgrade job just as well, it still managed to pick up all my old photos. I am still using Gallery 1.x though, but I noticed that Fedora packages Gallery 2. So I should probably switch to that at some point as having Fedora packagers make sure I am up to date without glaring security holes is more likely to work in the long run.

Anyway, to summarize a long story, my photos from GUADEC are now online :)

I also orderd myself an Epson 350 photo scanner today after discovering that <a href=”http://avasys.jp/hp/menu000000500/hpg000000442.htm”>Epson</a> actually provides official drivers for Linux. Hopefully I will soon also get all my pre-digital photos online.

Twins

I was watching The Daily Show yesterday and Seth Rogen was on as the guest. For those who doesn’t know him, he is a comedian who has starred in movies such as Superbad, Knocked up, Pineapple Express and the upcoming Kevin Smith movie ‘Zack and Miri Make a Porno’. Anyway when listening to him it struck me that I had heard that exact voice and accent somewhere else recently. Then it struck me, vocally Seth Rogen and our own Luis Villa are identical twins. So if you are doing a podcast and Luis is not available for an interview take comfort in knowing you can hire Seth Rogen to do the interview instead and nobody will know the difference.

GStreamer’s new deinterlace plugin

One of the tasks we gave Sebastian Dröge when he joined us here at Collabora Multimedia was to make sure we had a decent deinterlacer plugin in GStreamer. There had been a plugin in bugzilla for quite some time which contained some code culled mostly from the tvtime application by Billy Biggs. I had spent quite some effort back in the day tracking down the needed people to relicense that code to the LGPL, but it still needed quite some work to be functional. Sebastian has been cleaning up the code and also ported all assembly code in there to C so that it works on all platforms (the assembly code is still in place for relevant platforms). The code for this ‘deinterlace2’ plugin is in gst-plugins-bad currently where Sebastian is fixing up the last niggling issues. But for the adventurous the code can be grabbed from CVS. Below are two screenshots showing a interlaced video with and without the use of the deinterlace2 plugin.

So here is a screenshot using a playback pipeline with the deinterlacer plugin inserted:
gst-launch filesrc location=clip.vob ! decodebin2 ! ffmpegcolorspace ! deinterlace2 ! xvimagesink

Deinterlaced

And here is the same clip using a pipeline without the deinterlacer:
gst-launch filesrc location=clip.vob ! decodebin2 ! ffmpegcolorspace ! xvimagesink
Interlaced

The clip isn’t of the best quality to begin with, but it was the only one I found with interlacing on my disk. But if you click in and look at the two pictures you do very clearly notice the interlacing creating a jagged look of the second image.

This new improved deinterlacer should be very useful for some DVD’s and DVB transmissions, so once we get this fully integrated both DVD watching and DVB watching in Totem should be a very nice experience.

GStreamer DVD support

After getting a lot of updates on the GStreamer DVD menu support bugzilla entry, I figured it was time to make sure Jan Schmidt got some well deserved credit for the work he is doing getting the GStreamer DVD support fixed. Up to know people have had two choices for GStreamer based DVD playback, either Seamless which is a stand-alone DVD player, or using Totem. However the DVD playback you got in Totem using GStreamer up to know has been fairly basic, without DVD menu support for instance. With Jan’s ongoing work on his new resindvd plugin we are on the way to having full featured GStreamer-based DVD playback in Totem.

The resindvd plugin currently resides in plugins-bad, and Totem will automatically use it if you have it installed (and do not have the dvdnav plugin installed). Below is a screenshot of Totem displaying a fully functional DVD menu using the new resindvd plugin.

Minority report DVD menu

Only hick up I had was that was something weird happening in the Pulseaudio sink, so in the end I had to kill Pulseaudio to get audio to work when playing DVDs.

So if you like me are very excited about this stuff Jan is doing be sure to test it out and file bug reports if any of your DVD’s fail to work properly. You can also ping thaytan on IRC and tell him you will get him a beer at the next free software conference he attends :)

Fun with Pitivi

I guess I am not the only one to try out Pitivi from time to time to check its progress. Edward has been working on Pitivi, GStreamer and Gnonlin for quite a few years now, but of course urgent tasks at work has tended to take presedence of course, leading to a pace of development which hasn’t always been blazing. But a lot of things seems to be coming together these days. When  I checked out SVN head of Pitivi today I had a much better experience than before as almost everything I tried work fine for me. I was able to import both an AVI and a MP4 file into Pitivi and easily trim of some uneeded stuff of the clips. I was also able to output them in nice looking Ogg files using Dirac video. All this worked without any hickups on Pitivi’s side. I tried both using Vorbis and FLAC for audio output. Vorbis worked perfectly, but FLAC had some issues with audio/video syncronisation. This is probably caused by a GStreamer bug as embedding FLAC in an Ogg file together with video hasn’t really been widely tested up to now. Sebastian Droge is on the case so hopefully it will be sorted soon :)

But in addition to having reached a point where it has a stable foundation things have also started to pick up pace for Pitivi on the developmer side of things. With two Google Summer of Code students and multiple other community developers starting to dive into the code there is a good chance for Pitivi starting to take much bigger leaps in functionality between releases going forward.  My hope at this point is that we can offer a version of Pitivi by Christmas which contains most of the functionality the hobbyist want. So you can edit your Christmas recordings using Pitivi.

Anyway, if you are interested in Pitivi development the best place to keep abreast of things are of course #pitivi on irc.freenode.org.

Screenshot of our editing friend:

Screenshot of pitivi editing a video

Back from Turkey

So a little later than ‘everybody else’ I am now back from Turkey. Wim and I had both decided we needed some vacation and since we where going to Turkey for GUADEC it would be a great opportunity for us to travel around and see the area. Our original plan included climbing Mount Arrarat and visiting Georgia and Armenia, but trouble getting climbing permit combined with some german tourists getting kidnapped on Mount Arrarat by Kurd sepratists got us to adjust our plans. We ended up instead travelling down to cities such as Urfa (Edessa) and Harran, spending some days in Cappadocia and finally visiting Pamukkale and Ephesos. Had a blast of a time although Wim seemed a little less enthusiastic about females of the Korean and Taiwanese variety than me. Could of course just be that ‘Hello Kitty’ panties fail to get his sap boiling :)

For anyone travelling to Turkey I think spending 2-3 days in Göreme is an absolute must. It is a charming backpacker town with a lot of the hotels carved out of volcanic rock. A little gimmicky in the sense that the locals no longer live in the rocks for the most part, but the area is something which just have to be experienced.

Although we enjoyed the food I think it is safe to say that neither myself or Wim will be eating salad with cucumber and tomato, sprinkled with a little lemon anytime soon. 10+ days in a row is enough for a while :)

One thing I started wondering about while travelling around was the enormous expectations by local people for what an EU membership would mean for the people of Turkey, ranging from the EU solving all minority rights issues for Kurds, Armenians and Alavis, west European living standards and salaries for everyone, to solidifying Turkeys secular traditions. While the EU will for certain help push Turkey in the right direction on these issues, I can’t help but wonder if a future EU membership for Turkey might end up being a big lettdown compared to the expectation level I experienced.