Category Archives: GStreamer

GUADEC, Wayland, Transmageddon and more

So GUADEC is kicking off on Thursday here in Brno. The upcoming event is creating quite a bit of excitement here in the office as many members of the Red Hat team here in Brno has been helping out with the organization of the conference this year, being in the hometown of our biggest engineering office in the world. A series of last minute meetings, calls and arriving banners and packages help create a good buzz ahead of the opening of the conference. We have managed to get a bigger contingent of the Red Hat Desktop team this year than usual, including some members of our team, our Spice team and our LibreOffice team, so it will be a great opportunity for our global team to meet face to face in addition to meeting the other members of the community.

One of the items I am looking the most forward to during this GUADEC to is to be able to talk our friends at Intel and figure out how we can effectively work together on Wayland. We have put together a team to accelerate Wayland development inside Red Hat, with the goal of getting it ready for deployment in Fedora. There are of course a lot of things that needs to happen in preparation for this, like getting the GNOME Shell ready to work as a Wayland compositor. We will be looking at a long range of items, but among the more important ones is dealing with input devices in Wayland, like handling multiple mice, touch or Wacom tablets and making sure XWayland works so well that our users will not need to realize they are using Wayland instead of X once we transition over.

Anyway, I hope to share more details on our Wayland plans in the coming weeks and Months, so stay tuned.

I have also been trying to find some spare moments during the last few weeks so that I could celebrate GUADEC here in Brno with a new release of Transmageddon. There are basically three new features I am trying to polish up currently. Handling of files with multiple audiostreams is the most important, with DVD ripping support coming in as a close second and finally being able to tag the language of the audio streams as the third one. As you might imagine the first is also a pre-requisite for the second. I am getting there, although there are still some heavy lifting to do in terms of dealing with multiple audio streams inside Transmageddon in the case where the output doesn’t support multiple audio streams, like in the case of the FLV container format or if you are just stripping off the video to make a mp3 file.

Apart from that I think git master is starting to feel like working code again, I just need to test the hell out of it to catch all regressions my code re-organisation has caused. The new features feel small in some ways, but they took an awful lot of re-factoring as they obliterated some assumptions my code made. I am also quite happy to have managed to hide these new features pretty well for people who don’t need them, so if you are just loading a normal file without multiple audio tracks the UI should look and behave almost exactly as it did before. The same is true if you don’t have a DVD player on your system, you will not get any DVD items in the UI. I still need to make the code check for the availability of the libraries it needs for DVD support since they will not be shipping by default with most distros, and thus I will check for them and only make the DVD handling features available in the UI if they are installed.

So looking forward to seeing you here in Brno in the coming days!!

Brno GUADEC Call for Papers!

I would like to give everyone a friendly reminder that Saturday the 27th of April is the official deadline for the GUADEC 2013 Call for Papers. So make sure to get your proposal submitted.

We hope to have a wide range of talks this year, including talks on related subjects such as Wayland and Multimedia, so don’t automatically assume that you will not get a talk approved because its not ‘pure GNOME’.

GUADEC this year will be in Brno in the Czech Republic, so I hope to see as many of you as possible here.

No GStreamer in this years Google Summer of Code

Some sad news, GStreamer did not get accepted to the 2013 Google Summer of Code. We don’t know the exact reasons, but all we can do at this point is redouble our efforts to get accepted again next year.

In the meantime not all hope is lost. You can still do a Google Summer of Code involving GStreamer with some of the other organisations that did get approved. For instance if you have an idea for a great multimedia desktop application using GStreamer you can try submitting that to for instance GNOME or KDE depending on your UI toolkit of choice as one example. In the past GNOME has also been open to hosting some pure GStreamer projects so you can always try submitting such too. In general I recommend people to take a look at the list of accepted organisations and see if there are projects which technologies would be relevant to the GSoC project you want to do and the apply with them. Also remember you can submit the same project to multiple organisations if it fits multiple projects.

Also the PiTiVi video editor did get approved so I strongly encourage you to take a look at their wonderful ideas page and submit a proposal to do a PiTiVi project.

GStreamer Hackfest in Milan

As those of you following the GStreamer development mailing list or the GStreamer Google Plus profile know, we have been having a GStreamer hackfest in Milan over the last few days. We have 17 people here, all hammering away at our laptops or discussing various technical challenges sitting at a nice place called the Milan Hub.

A lot of progress has been made during these days with some highlights including work on fixing the use of Gnonlin with GStreamer 1.0, which is a prerequisite for getting PiTiVi and Jokosher running with GStreamer 1.0. Jeff Fortin, Thibault Saunier, Nicolas Dufresne, Edward Hervey, Peteris Krishanis and Emanuele Aina has all been helping out with this in addition to fixing various other issues in PiTiVi and Jokosher.

Sebastian Dröge has put a lot of work during the hackfest into providing the basic building blocks for doing hardware codecs nicely in GStreamer, and Víctor Jáquez has been working on making VAAPI work well using these building blocks, with the plan among other things to make sure you have hardware accelerated decoding working with WebKit. In that regards Philippe Normand has spent the hackfest investigating and improving various bits of the GStreamer backend in Webkit, like improving the on-disk buffering method used. Also in terms of hardware codec support Edward Hervey also found a bit of time to work a little on the VDPAU plugins.

Speaking of web browsers Alessandro Decina has been working on porting Firefox to GStreamer 1.0, he has also been our local host making sure we have found places to eat lunch and dinner that where able to host our big group. So a big thank you to Alessandro for this.

Wim Taymans has been working on properly dealing with chroma keying in GStreamer, improving picture quality significantly in some cases, in addition to being constantly barraged with questions and discussions about various enhancements, bugs and other challenges.

Edward Hervey has in addition to help out with GNonlin also been working on improvements in our DVB support and improving encodebin so that you can now request a named profile when requesting pads, the last item being a crucial piece in terms of allowing me to proceed with Transmageddons multistream support.

Stefan Sauer spent time on fixing various bugs in the GStreamer 1.0 port of Buzztard and a first stab at designing a tracing framework for GStreamer.

Arun Raghavan was working on various bugs related to Pulse Audio and GStreamer and also implemented a SBC RTP depayloader element for GStreamer.

Tim-Philipp Müller has been working on implementing a stream selection flag in order for GStreamer player to be able to follow any in-file hints about which streams to default to or to not default to for that matter.

As for myself I been mostly working on Transmageddon trying to get the multistream and DVD support working. Thanks to some crucial bugfixes from Edward Hervey and Wim Taymans I was able to make good progress and I have ripped my first DVD with Transmageddon now. There is still a lot of work that needs doing, both in terms of presentation, features and general robustness, but I am very pleased by the progress made.

Title selection screen, needs a bit more polish, but getting there.

Transmageddon screenshot ripping a DVD
As you see above you can now choose to transcode to different codecs for each sound stream, or drop the streams you don’t care about. The main usecase for different codecs is to you a different codecs for surround sound as opposed to stereo or mono streams.

A big thank you to Collabora and Fluendo for sponsoring us with dinner during the hackfest.

Also a big thank you to Collabora, Fluendo, Google, Igalia, Red Hat and Spotify for letting their employees attend the hackfest.

Taking on a new job at Red Hat

So I assume most of you have read Jonathan Blanfords blog post about leaving Red Hat and me taking over for him as head of the Red Hat desktop team. First of all I would like to thank Jonathan for both his contributions to GNOME and Red Hat, but also for being a good friend for over a decade now. Luckily Linux is also a major piece of his new job, so I am certain we have not seen the last of Jonathan in the community.

For the outside observer I wouldn’t expect any immediate visible changes to happen as part of this transition. My job is to follow up on the many great initiatives that Jonathan started here together with the rest of the team. One major piece I will be tackling is making sure we in the Red Hat desktop team work even closer with the Fedora community to bring forth some great improvements to Fedora and created an even more integrated and seamless experience for those wanting to use the Fedora desktop. This ranges from working with the Fedora team on a new software installer to working on getting Wayland ready for deployment in Fedora. Apart from that we will of course continue to work with the GNOME community on pushing GNOME 3 forward. I strongly recommend following Matthias Clasens blog to get the latest and greatest news on our efforts around GNOME 3.

I hope to post to my blog more frequently going forward to highlight exciting developments the many great projects the Red Hat Desktop team contribute to, like GNOME, LibreOffice, Firefox, Spice, Evolution, X Window/Wayland and more.

More hiring! Join the Red Hat desktop team and make a difference!

We are looking for some more people to join the Red Hat Desktop team. We have some flexibility on the tasks we need these new hires to do, so we are casting the net wider this time. We are open to candidates from anywhere in the world where Red Hat has an office. For the right candidate working from home is an option, but you would still need to live in a country where we have an office. That said candidates interested in joining the 500 people strong and growing team at the Brno office in the Czech Republic will be preferred, especially in cases where we have multiple candidates with similar skill levels.

We are looking for people who would be available to join Red Hat sometime this year, so if you are a student and graduating this summer you can still get in touch. We don’t have a hard list of requirements, but of course experience with any of the below items or similar will increase the likelihood of us being interested, and candidates with existing open source contributions will always be preferred over candidates who has never contributed to an open source project before.

  • C/C++/Python/Vala
  • OpenGL/Clutter
  • JavaScript/HTML5/WebRTC
  • X Windows
  • Touch screen technologies
  • GStreamer
  • D-Bus
  • LDAP/Active Directory

So if you want to join the worlds leading Linux company and help make the desktop rock, please send an email to Tyler Siprova who handles the hiring process for us in the Desktop team. She can be reached at tsiprova(at)redhat(dot)com. Be sure to refer to this blog entry in your email so she knows the context of your application. Be also be aware that I will be at the FOSDEM conference in Belgium in February, so if you are interested I would be happy to sit down with anyone interested to talk about the opportunities we have here at Red Hat, so if this is of interest be sure to request for such a meeting to be set up in your email to Tyler.

Making Firefox love your GNOME Desktop

One thing we are doing here at Red Hat Brno is maintain Firefox for Fedora and RHEL. The job is mostly focused on making sure we have Firefox available on all RHEL versions with all the latest security fixes, but it also gives our great team of Martin Stransky and Jan Horak some time to work on adding new features to Firefox to make sure it feels like a more integrated part of your desktop. They are currently working on 3 such features that you will hopefully be able to enjoy soon. The first is a patch to inhibit the screensaver when you are watching HTML5 or Flash content fullscreen. So if you are annoyed by having to move your mouse every 3 minutes to avoid the screen dimming when watching The Daily Show this is the fix for you. The second item they are working on is enabling the GStreamer backend in Firefox on Fedora. Which means that if you install for instance H264 support for Totem you will also have H264 support for HTML5 in Firefox. And finally there is also ongoing work on adding support for GIO in Firefox to make sure that any setup that works with GIO in terms of remote file access also works with Firefox, this latest task is taking some time though as it is currently blocking on some code refactoring in Firefox.

Further progress on multistream Transmageddon

As mentioned in my previous blog entry I am working on multistream handling in Transmageddon. Not been a lot of changes, but I have been able to put in a little time here and there. The changes needed to accommodate this have also cleaned up the codebase quite a bit in my opinion, moving from a forest of variables to a list of python dictionaries. This change makes keeping track of whats happening in the codepath a lot easier as I can now just print the dictionary from the list to see what all relevant values are at a given point. Anyway a little screenshot below to show where I am at:

In-progress support for multiple audio streams.

Still quite a bit of work to do to clean up the codebase and decide how certain things are to be handled (or not handled), but it is getting there. Screenshot above actually demonstrates one thing I haven’t decided on yet, which is how to deal with combining a device preset with a multistream file.

The biggest blocker currently for finishing this work is that the GStreamer encodebin element does not have an API yet for dealing with selecting encoding settings for multiple streams as detailed in this bug report. If anyone got the inclination to cook up a patch for encodebin which adds support for this that would be much appreciated.

Anyway, once I have this completed I think my next step will be to try to add some kind of DVD ripping support to Transmageddon and some basic metadata checking/editing and move the video flipping support into a special menu and add support for enabling/disabling deinterlacing in that same special menu. I trying to figure out as I go along how I can keep the user interface simple and straightforward and add requested features. The question that I continuously ask myself is what features do belong in Transmageddon and what features are of a level where people should go to something like PiTiVi instead.

Improved handling of files with multiple tracks in GStreamer

Thanks to Sebastian Dröge there is a new thing in GStreamer called streamid. It basically gives all streams inside a given file a unique id, making files with multiple streams a lot easier to deal with. This streamid is also supported by the GStreamer discoverer object. So once you identified the contents of a file with discoverer you can be sure to grab the exact stream you want coming out of (uri)decodebin by checking the pad for the streamid. The most common usecase for this is of course files with multiple audio streams in different languages.

From the output of Discoverer the stream id is really easy to get:
On the stream object you get out of Discoverer you just run a:


On the pad you get from decodebin or uridecodebin the patch is a bit more convoluted, but not
to hard once you know how (there might be some kind of convenience API added for this at some point).

Before you connect the pad you get from the bin you attach a pad to it like this:

src_pad.add_probe(Gst.PadProbeType.EVENT_DOWNSTREAM, self.padprobe, None)

Then you in the function you define you can extract the stream_id with the parse_stream_start call as seen below:

def padprobe(self, pad, probeinfo, userdata):
       event = probeinfo.get_event()
       if eventtype==Gst.EventType.STREAM_START:
           streamid = event.parse_stream_start() 
       return Gst.PadProbeReturn.OK

I been using this code in my local copy of Transmageddon to start implementing support for files with multiple audio streams (also supporting multiple video streams would be easy, but I am not sure how useful it would be). Got a screenshot of my current development snapshot below, but I am still trying to figure out what would be a nice way to present it. The current setup will look quite crap if the incoming file got more than a few audio streams. Suggestions welcome :)

Transmageddon multistream  devshot
Transmageddon multistream development snapshot

GStreamer, Python and videomixing

One feature that would be of interest to us in the Empathy Video Conference client is the ability to record conversations. Due to that I have been putting together a simple prototype Python test application in free moments to verify that everything works as expected, before any effort is put into doing any work inside Empathy.

The sample code below requires two webcams to be connected to your system to work. It basically takes the two camera video streams, puts one of them through a encode/rtp/decode process (to roughly emulate what happens in a video call) and puts a text overlay onto the video to let the conference participant know the call is being recorded. The two video streams are then mixed together and displayed. In the actual application the combined stream would be saved to disk instead of course and also audio captured and mixed.

If we ever get around to working on this feature is an open question, but at least we can now assume that it is likely to work. Of course getting one stream in over the network over RTP is very different from what this sample does, so that might uncover some bugs.

The sample also works with Python3, so even though it is only a prototype it already fulfils the GNOME Goal :)

import sys
from gi.repository import Gst
from gi.repository import GObject

import os

class VideoBox():
   def __init__(self):
       mainloop = GObject.MainLoop()
       # Create transcoding pipeline
       self.pipeline = Gst.Pipeline()

       self.v4lsrc1 = Gst.ElementFactory.make('v4l2src', None)
       self.v4lsrc1.set_property("device", "/dev/video0")

       self.v4lsrc2 = Gst.ElementFactory.make('v4l2src', None)
       self.v4lsrc2.set_property("device", "/dev/video1")

       camera1caps = Gst.Caps.from_string("video/x-raw, width=320,height=240")
       self.camerafilter1 = Gst.ElementFactory.make("capsfilter", "filter1") 
       self.camerafilter1.set_property("caps", camera1caps)

       self.videoenc = Gst.ElementFactory.make("theoraenc", None)

       self.videodec = Gst.ElementFactory.make("theoradec", None)

       self.videortppay = Gst.ElementFactory.make("rtptheorapay", None)

       self.videortpdepay = Gst.ElementFactory.make("rtptheoradepay", None)

       self.textoverlay = Gst.ElementFactory.make("textoverlay", None)
       self.textoverlay.set_property("text","Talk is being recorded")

       camera2caps = Gst.Caps.from_string("video/x-raw, width=320,height=240")
       self.camerafilter2 = Gst.ElementFactory.make("capsfilter", "filter2") 
       self.camerafilter2.set_property("caps", camera2caps)

       self.videomixer = Gst.ElementFactory.make('videomixer', None)

       self.videobox1 = Gst.ElementFactory.make('videobox', None)

       self.videoformatconverter1 = Gst.ElementFactory.make('videoconvert', None)

       self.videoformatconverter2 = Gst.ElementFactory.make('videoconvert', None)

       self.videoformatconverter3 = Gst.ElementFactory.make('videoconvert', None)

       self.videoformatconverter4 = Gst.ElementFactory.make('videoconvert', None)

       self.xvimagesink = Gst.ElementFactory.make('xvimagesink',None)
if __name__ == "__main__":
    app = VideoBox()
    signal.signal(signal.SIGINT, signal.SIG_DFL)
    exit_status =