After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 491627 - Totem does not de-interlace
Totem does not de-interlace
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: GStreamer backend
2.21.x
Other All
: Normal normal
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
Depends on: 547603 605231
Blocks: 515961
 
 
Reported: 2007-10-30 07:23 UTC by Eugenia Loli-Queru
Modified: 2011-06-16 16:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Hide deinterlace menu item when configured with GStreamer backend (953 bytes, patch)
2008-07-12 14:10 UTC, Sam Morris
none Details | Review
Small Interlaced Test Files (150.11 KB, application/x-compressed-tar)
2008-08-16 08:01 UTC, Nullack
  Details
enable deinterlacing for gstreamer (3.13 KB, patch)
2009-12-24 19:48 UTC, Robin Stocker
none Details | Review
Implement deinterlacing support (4.26 KB, patch)
2010-04-29 17:55 UTC, Bastien Nocera
none Details | Review
Implement deinterlacing support (4.43 KB, patch)
2010-04-29 17:59 UTC, Bastien Nocera
none Details | Review
Implement deinterlacing support (4.51 KB, patch)
2010-04-29 18:35 UTC, Bastien Nocera
committed Details | Review

Description Eugenia Loli-Queru 2007-10-30 07:23:26 UTC
Please describe the problem:
I downloaded this video http://vimeo.com/download/video:12297604 before it was uploaded here http://vimeo.com/361677 and i load it on totem. This mpeg PAL video is interlaced, but using Totem's "deinterlace" option NOTHING happens. The jaggies are still there! VLC is able to deinterlace that footage.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?
yes

Other information:
Comment 1 Eugenia Loli-Queru 2007-10-30 07:51:09 UTC
Apparently if I restart a number of times the app with the deinterlace option ON, there are sometimes that it does deinterlace, but if I move the window, or resize the window or go fullscreen, it interlaces back again...
Comment 2 Bastien Nocera 2007-10-30 09:46:54 UTC
Which backend?
Comment 3 Eugenia Loli-Queru 2007-10-30 09:50:26 UTC
Gstreamer. Default Ubuntu gutsy.
Comment 4 Eugenia Loli-Queru 2007-10-30 10:17:25 UTC
BTW, when you fix  this, please use interpolation instead of "blend fields". Interpolation looks better on fast motion...
Comment 5 Eugenia Loli-Queru 2008-05-11 06:17:41 UTC
This bug is STILL there. I am using Hardy now, with the latest gstreamer Totem, and the deinterlacing still does not work. Does it REALLY work for you? I find it hard to believe!!!

I tried both a DV AVI (straight out of a DV camera), and an M2T file (straight out of an HDV camera), and none de-interlaces when you tell it to. VLC can do it.
Comment 6 Eugenia Loli-Queru 2008-06-12 00:01:16 UTC
Is it really so much to ask to fix a bug that's so prominent as it's part of the main menu? This bug is 100% reproducible. Your de-interlacer is broken!

There's a lot of us who don't download progressive XViD pirated videos, but produce our own videos with our interlaced camcorders. Totem should cater for us too.
Comment 7 Bastien Nocera 2008-06-12 08:40:18 UTC
(In reply to comment #6)
> Is it really so much to ask to fix a bug that's so prominent as it's part of
> the main menu? This bug is 100% reproducible. Your de-interlacer is broken!

It's too much to ask in that tone, yes. Consider this back at the bottom of whatever TODO list it might have been on.
Comment 8 Eugenia Loli-Queru 2008-06-12 09:02:09 UTC
Well then, nothing has changed.

No one replies for months, so I had to get that tone over here just to get your attention. My point is that if you are not going to fix this bug any time soon, then remove the "de-interlace" menu option, because it's one thing to have a random bug somewhere for which I should indeed be more polite for, and another to have a glaring menu option that does absolutely nothing for months (maybe years too).
Comment 9 Tim-Philipp Müller 2008-06-12 09:20:26 UTC
The GStreamer backend currently doesn't plug a deinterlacer for various reasons. GStreamer needs some more work (API/design plus implementation) to properly handle interlaced material. There's been some activity on that front lately though, so hopefully we'll be able to handle this stuff decently in the not too distant future. (Theoretically we could just plug the deinterlace plugin from gst-plugins-bad, but I'm not really convinced it's good enough at this point)


> so I had to get that tone over here just to get your attention.

Please don't. Thanks.
Comment 10 Eugenia Loli-Queru 2008-06-12 09:24:41 UTC
Thank you for the explanation. Much appreciated.

I am doing some video work btw (shooting music videos for local rock bands and the like), that's why I put so much weight on such things as interlacing (as my HD camera still shoots interlaced). Probably a normal user wouldn't though.
Comment 11 Sam Morris 2008-06-16 19:56:58 UTC
Ideally totem would detect when interlaced video is present and activate the deinterlacer automatically. And if the interlacing was done by telecine, inverse-telecine would occur so that the original footage can be recovered without any quality loss. Ideally ;)
Comment 12 Sam Morris 2008-06-16 19:57:24 UTC
BTW, deinterlacing works fine with the Xine backend (last time I used it which was a while ago).
Comment 13 rawsausage 2008-07-04 15:00:52 UTC
Just install gmplayer. It can deinterlace. Not just trolling here, but I just happened to buy a pile of DVDs (nature documentaries, whee!) and they all seem to be interlaced. Totem was simply useless. 

This bug is practically BLOCKER for everyone who bumps into videos that are interlaced. :-(
Comment 14 Bastien Nocera 2008-07-04 15:12:00 UTC
(In reply to comment #13)
> Just install gmplayer. It can deinterlace. Not just trolling here, but I just
> happened to buy a pile of DVDs (nature documentaries, whee!) and they all seem
> to be interlaced. Totem was simply useless. 

Even if you're not _just_ trolling, this sounds like a troll already. Please consider this a first warning. This isn't a forum.
Comment 15 Eugenia Loli-Queru 2008-07-04 19:21:31 UTC
Bastien, any chance that you could add de-interlacing without gstreamer having to implement it first? Is it even technically possible? I just don't think that gstreamer will do such a thing any time soon you see... De-interlacing is important for users who have camcorders or watch home DVDs, and choose to not pirate progressive XViD videos. Most of my video stash for example are my own HD interlaced M2T clips, and free downloads from Vimeo.com from hobbyist videographers who used consumer camcorders (which are almost always interlaced). Some of these legal free downloads are progressive, but some of them are straight out of the camera, interlaced.
Comment 16 Bastien Nocera 2008-07-04 20:41:20 UTC
(In reply to comment #15)
> Bastien, any chance that you could add de-interlacing without gstreamer having
> to implement it first? Is it even technically possible?

No, it's not possible. If you require deinterlacing support, try the xine-lib backend. It supports deinterlacing just fine.
Comment 17 Tim-Philipp Müller 2008-07-05 15:55:23 UTC
> I just don't think that gstreamer will do such a thing any time soon
> you see...

This is actively being worked on, both at the design level and at the plugin level. There is a lot of interest in getting this done for multiple reasons (dvd, dvb, cameras such as yours ...).
Comment 18 Sam Morris 2008-07-12 14:10:49 UTC
Created attachment 114437 [details] [review]
Hide deinterlace menu item when configured with GStreamer backend

We may as well hide the deinterlace menu item when using GStreamer.
Comment 19 Nullack 2008-08-16 06:55:57 UTC
Sam - detecting when deinterlacing is needed is a very difficult problem to do in realtime. Some types of footage are incorrectly flagged with progressive when they are in fact interlaced and vice versa. There is some algorithms used (see megui on doom9.net for an example) but that are not real time and are not truly reliable when it comes to its conclusion as to if the footage is interlaced or not. Really, human eyes are the real solution.

Devs - I want to confirm please that bypassing Totem and using this command on my interlaced test suite:

gst-launch-0.10 playbin uri=file:///directory/example

Shows that gstreamer does not autoload a de-interlacing filter. Im going to look for a related gstreamer bug and create one if it does not exist.
Comment 20 Nullack 2008-08-16 08:01:36 UTC
Created attachment 116723 [details]
Small Interlaced Test Files

Attached is some small interlaced test files in both top field first format and bottom field first format.

I note that Bastien on 13/08/08 raised an enhancement in gstreamer for playbin2 to add gstreamer deinterlacing support:

http://bugzilla.gnome.org/show_bug.cgi?id=547603

If playbin2 can't be implemented for this gnome cycle I think it would be less confusing for user's if Sam's patch is deployed.
Comment 21 Nullack 2008-08-17 10:39:11 UTC
From looking at the roadmap it would seem that playbin2 for Totem is out of time for this release. As a workaround in the meantime, what if Totem used the ffdeinterlace provided in revision 10.1 of the gstreamer ffplugins?

The user impact of not having deinterlacing in Totem out of the box in distro's like Ubuntu that use gstreamer is quite serious. Much of the digital television broadcasts are interlaced. As too, many cameras output into an interlaced format. The other leading video apps on Linux support deinterlacing.
Comment 22 Tim-Philipp Müller 2008-08-17 12:50:15 UTC
There is no connection between playbin2 and deinterlacing support. I am not much in favour of using ffdeinterlace for this, and the new deinterlace2 from gst-plugins-bad isn't 100% ready yet as far as I know (and the next -bad release is end of october so too late for this release cycle).
Comment 23 Nullack 2008-08-18 08:15:14 UTC
May I ask please what objections you have to using ffdeinterlace as an interim measure until something else comes along later? The lack of deinterlace support in Totem gstreamer is a serious hinderence and one which is not suffered by competing applications such as Mplayer and VLC. Additionally its poor UI design in Totem gstreamer to have a deinterlace option present to the user that knowingly does nothing.
Comment 24 Tim-Philipp Müller 2008-08-18 09:43:59 UTC
I am not keen on relying on elements from gst-ffmpeg in totem in general, but I also don't have a lot of faith in ffdeinterlace's general stability. There are other implications as well which need looking into first.

I'd consider hiding the menu option for now acceptable (if not desirable), but that's Bastien's call, not mine. (Btw, please skip the competing-apps-hindrance-to-gstreamer whining, not only are we well aware of that, but it also doesn't really help and just adds noise to the bug report. Thanks)
Comment 25 Bastien Nocera 2008-08-18 09:58:33 UTC
No backend specific bits in the main binaries please.
Comment 26 Bastien Nocera 2008-08-18 10:08:30 UTC
2008-08-18  Bastien Nocera  <hadess@hadess.net>

	* src/backend/bacon-video-widget-gst-0.10.c
	(bacon_video_widget_can_deinterlace):
	* src/backend/bacon-video-widget-xine.c
	(bacon_video_widget_can_deinterlace):
	* src/backend/bacon-video-widget.h:
	Add _can_deinterlace function to the backends

	* src/totem.c (totem_callback_connect): Only show
	the deinterlacing menu item if the backend supports it
	(Helps: #491627)
Comment 27 Julian Sikorski 2008-12-22 18:13:16 UTC
How about deinterlace and deinterlace2 plugins from gstreamer-plugins-bad? Do these work? Totem 2.24.3 does not have the deinterlace option available when configured to use gstreamer.
Comment 28 Edward Hervey 2009-05-07 05:46:52 UTC
Now that totem uses playbin2, this looks very much like a duplicate of #547603
Comment 29 Remco 2009-10-12 23:30:22 UTC
As a workaround, you use the old deinterlacer like this:

1. Install gstreamer0.10-plugins-bad

2. Make a launcher with the name "Deinterlacing ON", pointing to the following command:
    gconftool-2 -t string -s /system/gstreamer/0.10/default/videosink "deinterlace ! autovideosink"

3. Make a launcher with the name "Deinterlacing OFF", pointing to the following command:
    gconftool-2 -t string -s /system/gstreamer/0.10/default/videosink "autovideosink"

You can make these launchers on your desktop, or on your panel.

Now any time you want to play an interlaced file, you just hit the Deinterlacing ON button, and then you open the file. When you want to play a progressive file, you can turn it off again by hitting the Deinterlacing OFF button.

The downside to this solution is that the old deinterlacer is ugly, and that you have to restart Totem in for the buttons to take effect.
Comment 30 Edward Hervey 2009-10-13 09:01:51 UTC
Using the old deinterlacer is a bad idea imho.

Instead of the above two settings, just set your videosink to "deinterlace2 mode=auto ! autovideosink". If the input isn't interlaced it won't do anything, but if it is it will deinterlace it.
Comment 31 Robin Stocker 2009-12-24 19:48:17 UTC
Created attachment 150359 [details] [review]
enable deinterlacing for gstreamer

This patch enables the "deinterlace" menu item and sets the necessary property on playbin.

Needs the patches from bug #605231 and bug #547603 to actually work. (Where "work" is "lock up the video" at the moment, heh.)
Comment 32 Bastien Nocera 2009-12-24 20:01:09 UTC
The menu item probably needs updating to something like "deinterlace when needed". It should also be enabled by default (in the schemas), and the GStreamer requirements updated.
Comment 33 Bastien Nocera 2010-04-29 17:55:37 UTC
Created attachment 159928 [details] [review]
Implement deinterlacing support

Using playbin2's deinterlacing capabilities.
Comment 34 Bastien Nocera 2010-04-29 17:59:49 UTC
Created attachment 159931 [details] [review]
Implement deinterlacing support

Using playbin2's deinterlacing capabilities.
Comment 35 Tim-Philipp Müller 2010-04-29 18:27:35 UTC
Comment on attachment 159931 [details] [review]
Implement deinterlacing support

> void
> bacon_video_widget_set_deinterlacing (BaconVideoWidget * bvw,
>                                       gboolean deinterlace)
> {
>+  gint flags;
> ...
>+  g_object_get (bvw->priv->play, "flags", &flags, NULL);
>+  flags |= GST_PLAY_FLAG_DEINTERLACE;
>+  g_object_set (bvw->priv->play, "flags", flags, NULL);
> }

This doesn't really do what it says on the tin does it? (it doesn't unset the flag if deinterlace is FALSE afaict)
 

> gboolean
> bacon_video_widget_get_deinterlacing (BaconVideoWidget * bvw)
> {
> ...
>+  return flags & GST_PLAY_FLAG_DEINTERLACE;
> }

Matter of taste I guess, but wouldn't it be nicer if it returned TRUE/FALSE or was normalised with !!(a & b)?
Comment 36 Bastien Nocera 2010-04-29 18:35:58 UTC
Created attachment 159933 [details] [review]
Implement deinterlacing support

Using playbin2's deinterlacing capabilities.
Comment 37 Bastien Nocera 2010-04-29 18:36:40 UTC
Both fixed in the latest patch.
Comment 38 Bastien Nocera 2010-04-30 12:39:09 UTC
Attachment 159933 [details] pushed as 606a625 - Implement deinterlacing support
Comment 39 Murray Cumming 2011-06-16 15:28:10 UTC
This doesn't actually work unless some particular gstreamer element(s) is installed. It's something in gst-plugins-bad or maybe in gst-plugins-ugly, I think. Shouldn't totem complain if it can't work, and maybe try to install whatever is needed, like it does for regular codec plugins?
Comment 40 Tim-Philipp Müller 2011-06-16 15:36:16 UTC
The deinterlace element is in gst-plugins-good.
Comment 41 Bastien Nocera 2011-06-16 16:37:40 UTC
If it doesn't work for a particular stream, please file a separate bug. This has been fixed (and verified working at the time) for more than a year.