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.

In the land of silly arguments

Seems Lennart started a bit of a debate with his Linux Sound layers blog post. Not all the reponses has been as enlightened though. For instance Aaron Segio managed to make me laugh with his argument for why Phonon was a good alternative for non-Qt applications:

“Phonon is also more than just an option for Qt apps: you’d be making a huge mistake not to use it. You see, Phonon gets you equal and native support on Windows and Mac as well without the user having to install, say, GStreamer..”

Really? Wow, I would never have thought that if you use something instead of the other you wouldn’t need the other…an absolutely brilliant deduction. While we are at it lets point out that if you install Firefox you do not need to install Opera, cause you already got a web browser!!

GStreamer is already used by cross platform applications such as Songbird and SyncTV. And Songbird is using the native codecs provided by DirectShow and Quicktime where available.

So in a celebration of self serving arguments: So if you just use GStreamer you get equal and native support on Windows and Mac as well without the user having to install, say, Phonon…

Dirac at the IBC

So I am just back from the IBC conference in Amsterdam. Enjoyed it a lot and got to see a lot of interesting new technology. Especially the SuperHighDefinition demonstration was pretty nice, although I think we have to settle with 1080p in the home for the forseeable future.

One interesting thing I noted was that a lot of booths was using the Big Buck Bunny video to demonstrate their technology. The BBC did this at the Dirac booth for instance, but also a lot of other vendors used this clip. Which do not surprise me as apart from Big Buck Bunny being of good quality it is next to impossible to get permission by right holders to get access to any of their source material to create a version of a trailer for instance using a specific encoder or codec. Don’t want to name and shame anyone, but I have for instance tried multiple ties in getting one of the major Hollywood animation houses to let us create a Dirac version of one of their trailers. While I gotten positive feedback from my (technical) contacts for doing this, getting approval from management and marketing has so far eluded us.

But there is some irony in that at a conference where companies in the broadcasting industry show their goods, they end up using something produced by a group of people outside their industry as getting permission to use the content they create themselves is to hard :)  (That said I should point out that the BBC also showed of a clip of their Torchwood sci-fi in Dirac HD, so the BBC did also manage to get permission to use some of their own content.

Another example of how crazy the rights jungle can be was that NuMedia who was demonstrating their DiracPro hardware products at the show even had to just write ‘Dirac was used by BBC to transfer video from Bejing 2008’ in their material, explaining how the BBC had used Dirac for their intermedia data transfer for the Bejing Olympics. Using the word ‘Olympics’ in their material was something they where told was not allowed.

Dirac Big Buck Bunny movie playing in Totem:
Big Buck Bunny Dirac Totem

Long weekend in Amsterdam

I am heading down to Amsterdam tomorrow morning to attend IBC. Got a few meetings lined up, but I am also looking forward to hanging out with David Schleef and Jan Schmidt. I am looking forward to the conference as it will also be a big event for promoting Dirac Video.

It will be my first ever visit to Amsterdam, so I am looking forward to exploring the city. I heard they got great coffee places in Amsterdam :)

Is the United States government solvent?

When George Bush responded to the US downturn by sending everyone a check with some money my first thought was that it might not be the right approach to solve the current issues in the US economy. My reasoning is that I think that the main problem the US face at the movement is that the federal government is heavily underfunded and that the world markets are starting to doubt the strength of the US economy due to the extreme level of debt the US has acquired. So splashing out money to stimulate consumers might alleviate things a little in the short term, it made the underlying problem of US state finances being horrendous bigger. While this problem was not completely ignored by analysts at the time, it was mostly mentioned as a byline. In fact I think that if I hadn’t been searching for mentions of it I might have missed those mentions all together.

Got reminded of my worries today when I came accross an article in a Norwegian paper discussing the Fannie Mae and Freedie Mac bailouts. The US federal government having to bail out  Fannie Mae and Freddie Mac comes at the price of taking on even more debt at the federal level. And while I don’t doubt the need for the takeovers, I can’t help but wonder if by putting out one fire they have laid the foundation for a bigger one. The US defaulting on its debt would have rather overwhelming negative consequences for the world economy. And if that article is correct I am not alone in my worries, it seems a lot of the Asian countries which has up to know invested their trade surpluses into US bonds are getting cold feet and have started pulling out.

Stephen Fry on FSF anniversary

Just noticed today that the FSF managed to get Stephen Fry to make a video in celebration of the 25th Anniversary of the FSF. Been a fan of Stephen for a long time, ever since I first saw him in Blackadder many years ago, so it is cool to see him doing this sort of promo for free software. Been aware that Stephen Fry has advocated free software in his blog for some time, but it is still nice to see such direct interaction with the community. The video is available in Ogg format using Theora video and Vorbis audio, which also makes me happy. I even ended up emailing them saying I be happy to convert their source material into a HD Dirac+Vorbis version if they are interested. Every time I see stuff being published in free formats it makes me feel very good about the work we are doing here at Collabora and the goals we have set for ourselves.

Dirac Everywhere

On the topic of Dirac there are a lot of fun stuff happening. One thing I failed to mention before, is that there is a Dirac Quicktime component available now. Still alpha quality, but part of the effort done to reach out to a wide a community as possible with Dirac. There has also been work happening on wider Dirac support in GStreamer and integrating that support better into GStreamer. For instance Thiago merged a patch from David Schleef to add Dirac support to the new quicktime muxer Thiago created as part of the summer of code. It already works well, but we need to do a little Pitivi hacking to enable it there. Edward hopes to get at that before the weekend. Finally Sebastian Dröge merged the transport stream muxer library and plugin into gst-plugins-bad, which also can mux Dirac video (the library used to be hosted on the old Dirac website). Sebastian will also be working on making sure that muxer can create some Playstation 3 friendly files going forward.

Also thanks to Fluendo and Zaheer we know have a working transport stream demuxer in gst-plugins-bad which of course also handles Dirac.

Centralising GStreamer plugins

On the back of this I think we will try to do a bigger effort to merge some of the external plugin repositories into GStreamer proper. For instance at Collabora we got the gst-plugins-farsight module which should have its plugins moved over. Our latest team member Mark Nauwelaerts got his GEntrans plugins which should also move over. Having a central set of repositories and plugins makes them easier to find for everyone and will also increase the ease of maintenance. And of course reduce the risk of people doing something which someone else has already done.