GNOME Bugzilla – Bug 172563
[videocrop] corrupts video when setting property in state playing
Last modified: 2005-04-09 08:44:53 UTC
i'm trying to implement zooming for a video player with the videocrop and the videoscale element. when i change a property of the videocrop element in the state playing it corrupts the videostream. i have also problems with cropping 30px or 100px of a video - it get corrupted with green diagonal stripes.
Can you provide a small gst-launch or one-file .c testcase for us to reproduce-and-fix?
I can provide the gst-launch-commandline hawkes@ela:~/Desktop$ gst-launch-0.8 filesrc location="Boogie Pimps - Somebody To Love.mpg" ! mpegdemux ! mpeg2dec ! videocrop left=30 ! xvimagesink The Video is available from Edonkey (Hash: 5FE754AC3E9188EFD5383BAB1FAA20E2) and is the music video "Boogie Pimps - Somebody To Love.mpg" At the moment i'm unable to provide a screenshot because neither ffcolorspace nor ffmpegcolorspace link sucessfully with the ximagesink For the problem with the change of the property in state playing i can provide a patch for totem
You want something like gst-launch-0.8 filesrc location="Boogie Pimps - Somebody To Love.mpg" ! mpegdemux ! mpeg2dec ! videocrop left=30 ! ffmpegcolorspace ! videoscale ! ximagesink, because your video has non-square aspect ratio. That works here for an mpeg video, btw, but that doesn't change the property while playing, so it's expected.
Christoph, since you're developing with Gst/Totem, be sure to use latest CVS or at least latest releases. Totem is very demanding and I fix bugs in Totem/Gst on a daily basis. If you do use latest releases, then please provide some more info; is it with all MPEG videos, or just one? Can you tell us what element is being used for this (ffdec_mpeg2video? mpeg2dec? See --gst-debug=decodebin:5 output) is it specific to MPEGs with an odd size, maybe? I'm having troubles reproducing, and the code does look fine at first sight (in CVS).
I'm using totem/cvs and gst/0.8.9. The problem isn't related to mpeg videos. I get similar results when i try gst-launch with xvid avis (size 640x480) gst-launch-0.8 filesrc location="501-Scott.Tenorman.muss.sterben.avi" ! avidemux ! ffdec_mpeg4 ! videocrop left=30 ! xvimagesink results in green diagonal stripes. However, the proposal vom Jan seems to fix the problem, i can't reproduce the stripes if i insert a colorspace element in the link.
Note that it would be really cool to enhance videocrop to support more than just I420 if you want to use it in totem...
Created attachment 39804 [details] Testcase for Videos
The insertion of a colorspace element seems only to help with gst-launch and not if you change the properties in the state playing. I've attached a small testcase.c which cuts 10px from the top of the video every 1000 iterations. The results can be seen at the attached screenshot
Created attachment 39809 [details] Screenshot of the video after croping 10px on the top Attached the screenshot
Created attachment 39810 [details] Dynamic Testcase
Created attachment 39861 [details] [review] fix This makes the testcase work for me.
Applied to CVS, marking fixed. If there's more issues, please feel free to re-open.