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.

8 thoughts on “GStreamer’s new deinterlace plugin

  1. Why does the deinterlaced video need to get passed through the colorspace plugin before and after the deinterlaced plugin?

  2. @Peter: actually you only need the one in front. I will edit my pipeline to remove the not-needed one. I guess I tend to put in some extra ffmpegcolorspace’s here and there just to be safe :)

  3. Thanks for the update. I often save copies of any pipelines you reference as it saves me having to work them out myself. A very handy resource. Thanks :-)

  4. would be nice to have new tv viewer, base don gstreamer… tvtime is good, but doesn’t support lirc (tvtime-commands doesn’t work for me) and causes problems with window focus… and uses oss :/ .

  5. Yay, finally we can have deinterlacing in Totem using the GStreamer backend!

    Why is it named deinterlace2? Has there been another deinterlace plugin before?

  6. Great news!

    Does this work with mixed progressive, telecined, and interlaced content (as xine’s tvtime post plugin does)?

  7. @Robin: there is an older deinterlace plugin, but it is really really bad :)

    @Tack: Not yet, but due to your question Sebastian added it to his todo list!

  8. I tried to find some information about the tvtime deinterlacer, but couldn’t find much. A comparison with other deinterlacers would be nice, for example how it compares to Yadif (the best deinterlacer of MPlayer).

    By the way, if anyone is looking for the bugzilla entry for deinterlace2, here it is: http://bugzilla.gnome.org/show_bug.cgi?id=163578

Comments are closed.