GNOME Bugzilla – Bug 491627
Totem does not de-interlace
Last modified: 2011-06-16 16:37:40 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:
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...
Which backend?
Gstreamer. Default Ubuntu gutsy.
BTW, when you fix this, please use interpolation instead of "blend fields". Interpolation looks better on fast motion...
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.
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.
(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.
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).
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.
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.
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 ;)
BTW, deinterlacing works fine with the Xine backend (last time I used it which was a while ago).
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. :-(
(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.
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.
(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.
> 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 ...).
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.
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.
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.
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.
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).
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.
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)
No backend specific bits in the main binaries please.
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)
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.
Now that totem uses playbin2, this looks very much like a duplicate of #547603
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.
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.
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.)
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.
Created attachment 159928 [details] [review] Implement deinterlacing support Using playbin2's deinterlacing capabilities.
Created attachment 159931 [details] [review] Implement deinterlacing support Using playbin2's deinterlacing capabilities.
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)?
Created attachment 159933 [details] [review] Implement deinterlacing support Using playbin2's deinterlacing capabilities.
Both fixed in the latest patch.
Attachment 159933 [details] pushed as 606a625 - Implement deinterlacing support
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?
The deinterlace element is in gst-plugins-good.
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.