Totem Fails To Deinterlace

Bug #257818 reported by nullack
76
This bug affects 10 people
Affects Status Importance Assigned to Milestone
GStreamer
Fix Released
Medium
gstreamer0.10 (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs
Declined for Intrepid by Sebastien Bacher

Bug Description

Binary package hint: totem-gstreamer

Using Intrepid synched to repos as of today 14/08/08, I have discovered that Movie Player with the default gstreamer back ends and the good, bag, ugly, ffmpeg and fluendo mpeg2 demuxer plugins actually fails to deinterlace interlaced video footage when the user selects the footage to be deinterlaced in the Totem menu.

I have uploaded an archive of two small (150KB) sample files to demonstrate this. One is in top field first interlacing and the other one is in bottom field first interlacing:

http://www.savefile.com/files/1728193

There is a relevant discussion going on here at the Ubuntu forums about this:

http://ubuntuforums.org/showthread.php?t=882453&page=3

This is a major issue that wrecks video playback for any user trying to view truly interlaced video.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report. could you try to play the video using gst-launch-0.10 playbin uri=file:///directory/example? Does it have the same issue? Could you also attach an example directly to launchpad?

Changed in totem:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
nullack (nullack) wrote :

Hi Sebastien :)

Please find attached the test samples.

I can confirm that using your CLI command does fail to deal with the interlaced footage - interlace artifacts are everywhere in playback.

Changed in totem:
status: Incomplete → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

reassigning to gstreamer since gst-launch has the same issue

Revision history for this message
nullack (nullack) wrote :

Can I please make some comments here:

1. I consider the priority should be high, I could be argued into settling for medium with convincing points. In certain use cases this is a very serious problem. For example, trying to watch interlaced digital TV broadcasts or captures of such footage results in an unwatchable image. As too, trying to play footage show on interlaced cameras. Transcoding for progressive frames is not only a very time consuming idea but also one which may not be feasible in all cases given finite amounts of workstation storage and other reasons.

2. I think the "bug" exists in both gstreamer and totem. Why should totem have a drop down menu setting that does nothing? Isnt that poor UI design to provide apparent functionality to the user which is not actually implemented in the default back end used by Ubuntu?

I'm new to Gstreamer but I'm going to take a look at the Gstreamer bug database to see if it needs to be reported upstream as well.

Changed in gstreamer:
status: Unknown → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the priority is low because that's not something the ubuntu team has the ressources to work on, a new feature, and something upstream is not likely to get available this cycle, changing the priority will not do a real difference to any of those

Changed in gstreamer0.10:
assignee: nobody → desktop-bugs
status: New → Triaged
Revision history for this message
nullack (nullack) wrote :

Seabstien why can't we use ffdeinterlace as provided in the ffmpeg gstreamer plugin until upstream come up with another solution?

Revision history for this message
nullack (nullack) wrote :

Moving to confirmed as clearly it is a bug and has been accepted upstream. I have spoken with upstream about using ffdeinterlace as an interim measure and they had a range of concerns about doing so. It should still be possible to setup a custom gstreamer pipe for cases where users must have it - Im currently doing some tests on this.

Changed in gstreamer0.10:
status: Triaged → Confirmed
Revision history for this message
nullack (nullack) wrote :

Sorry, human error there I meant to move the status to In Progress.

Changed in gstreamer0.10:
status: Confirmed → In Progress
Revision history for this message
nullack (nullack) wrote :

I'd like to share my progress with this. Since upstream seem to be somewhat uncooperative on implementing deinterlacing in Totem Ive been doing tests with gstreamer. I'm pleased to report that deinterlacing functionality is working well. Here's a command line for bottom field first interlaced content:

gst-launch filesrc location=/mnt/vault/Film/Tests/aspbff.avi ! decodebin2 ! ffmpegcolorspace ! deinterlace2 tff=2 ! xvimagesink

And for top field first content:

gst-launch filesrc location=/mnt/vault/Film/Tests/asptff.avi ! decodebin2 ! ffmpegcolorspace ! deinterlace2 ! xvimagesink

Note that currently gstreamer cannot auto detect if the content is TFF or BFF and TFF is assumed. All BFF content has to be hard coded to display correctly.

Revision history for this message
David Santamaría Rogado (howl) wrote :

I have totem deinterlacing by changing the default gstreamer video sink from "autovideosink" to "deinterlace ! autovideosink". You can do it using "Alt+F2" and executing "gconf-editor" and the go to "/system/gstreamer/0.10/default" and change "videosrc" value to "deinterlace ! autovideosink"

Nowadays deinterlace2 doesn't exits, only deinterlace. I don't know if gstreamer now can detect different types of deinterlacing.

I think this should be fixed in another way not by chaging the default videosink, but, this is a perfect workarround until someone fix this.

Revision history for this message
David Santamaría Rogado (howl) wrote :

The "tff" property

  "tff" GstDeinterlaceFieldLayout : Read / Write

Deinterlace top field first.

Default value: Auto detection

OK GStreamer seems to have autodetecting of tff since 0.10.17, also there are some methods to choose from:

The "method" property

  "method" GstDeinterlaceMethods : Read / Write

Selects the different deinterlacing algorithms that can be used. These provide different quality and CPU usage.

Some methods provide parameters which can be set by getting the "method" child via the GstChildProxy interface and setting the appropiate properties on it.

    *

      tomsmocomp Motion Adaptive: Motion Search
    *

      greedyh Motion Adaptive: Advanced Detection
    *

      greedyl Motion Adaptive: Simple Detection
    *

      vfir Blur vertical
    *

      linear Linear interpolation
    *

      linearblend Linear interpolation in time domain
    *

      scalerbob Double lines
    *

      weave Weave
    *

      weavetff Progressive: Top Field First
    *

      weavebff Progressive: Bottom Field First

Default value: Motion Adaptive: Advanced Detection

Revision history for this message
David Santamaría Rogado (howl) wrote :

The deinterlace method are ports of the DScale Tvtime ones, but all of the seems to be poor comparing for example with the vlc's blend, that gives more accurated deinterlacing. For example with the Shaggy - Angel song video I have from a .vob from a DVD the inital animations is not properly deinterlaced by any of the gstreamer available methods.

Revision history for this message
Igor Wojnicki (wojnicki) wrote :

David. There are several issues with deinterlace module:
1. video is unstable, you don't get comb artifacts, instead image shifts by one pixel ocasionally,
2. subtitles are messed up,
3. It takes a lot of CPU!!! (about 20% on my ancient sempron).

There is also ffdeinterlace module which comes from ffmpeg but there is still issue #2 present. Besides this module works somehow unstable. For some videos it produces blank output.

I'm really surprised that there is a marginal effort put into deinterlacing modules by the gstreamer team. There is still lots of interlaced videos out there (DVDs, non-professional or hd video footage etc., which renders totem/gstreamer useless.

Revision history for this message
David Santamaría Rogado (howl) wrote :

I have seen what you say, also deinterlace messes non interlaced videos, at leats in very noticiable with 1080p videos. Thanks for the info.

Changed in gstreamer:
status: Confirmed → Fix Released
Revision history for this message
iGadget (igadget) wrote :

Actually, there's some work going on upstream to fix this issue. It would be great if this could get backported to Lucid:

http://www.hadess.net/2010/04/deinterlacing-now-in-totem.html
https://bugzilla.gnome.org/show_bug.cgi?id=547603

Revision history for this message
madbiologist (me-again) wrote :
Revision history for this message
madbiologist (me-again) wrote :

It looks like this has been fixed in Ubuntu 10.10 "Maverick Meerkat". From the totem (2.31.6-0ubuntu1) changelog:

  * New upstream version:
    - Add deinterlacing support, automatically used for interlaced content

Given that Maverick also has GStreamer Base Plug-ins 0.10.30-1build1 this should be fixed now.

I'll try and test with the files in comment 2.

Can someone else also test please?

Revision history for this message
madbiologist (me-again) wrote :

Results of testing:

With default Totem settings both files in comment 2 look good when played back.

Selecting "Edit > Preferences > Display > Disable deinterlacing of interlaced videos" in Totem and then playing the same files shows prominent interlacing artefacts during playback.

Marking as fixed.

Changed in gstreamer0.10 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
David Santamaría Rogado (howl) wrote :

This is going to be also in lucid LTS or is one bug more for the list of important bugs but no so important for canonical to be in actual supported releases and only in the actual in development one.

Revision history for this message
Dominik Holler (dominik-holler) wrote :

I worry that there will never be any bug fixing in ubutu releases (apart from the gnome x.x.X upstream updates). It's a pity.

Revision history for this message
David Santamaría Rogado (howl) wrote :

I know, even a totally blockers bugs like in hardy impossibility to make working apps with ocaml 64 (if you compile an app with the ocaml included in ubuntu hardy, youru application will crash before running a little time), in canonical is not considered a important bug, and ocaml is not part of gnome, and also upstream the new version to the included in hardy is just the fix to that non important bug.

Revision history for this message
madbiologist (me-again) wrote :

If you want to use the latest GStreamer packages on Lucid I recommend the GStreamer developers PPA at https://launchpad.net/~gstreamer-developers/+archive/ppa

Getting hold of the new version of Totem for Lucid seems to be trickier, but if you are any good at compiling from source you can get it at https://launchpad.net/ubuntu/+source/totem/2.31.6-0ubuntu1

Although I'm not an Ubuntu package maintainer I think the new version of Totem probably falls outside of the criteria for a Stable Release Update (SRU). I don't know enough about coding or compilation to know if it would be possible to cherry-pick the patch from upstream and apply it to Totem in Lucid, but then you would be looking at a potential user interface change (needed in case someone need to turn _off_ deinterlacing to get their file to play correctly) which would probably be outside of the SRU criteria anyway.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> This is going to be also in lucid LTS or is one bug more for the list of important bugs but no so important for canonical to be in actual supported releases and only in the actual in development one.

Canonical has nothing to do there, any community contributor is welcome to work on a stable update, those changes are new code and non trivial for a stable update though

Revision history for this message
David Santamaría Rogado (howl) wrote :

Someones say one way to go, others another. The real way to go of canonical, at least the one they said in other bugs, is to backport fixes for critical bugs. This is not a critical bug in anyway but you can search for the ocaml hardy lstd bug and tell me if it's critical or not.

Changed in gstreamer:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.