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 172563 - [videocrop] corrupts video when setting property in state playing
[videocrop] corrupts video when setting property in state playing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-03 23:34 UTC by Christoph Burghardt
Modified: 2005-04-09 08:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase for Videos (1.53 KB, text/x-csrc)
2005-04-07 14:31 UTC, Christoph Burghardt
  Details
Screenshot of the video after croping 10px on the top (680.99 KB, image/png)
2005-04-07 15:54 UTC, Christoph Burghardt
  Details
Dynamic Testcase (3.20 KB, text/x-csrc)
2005-04-07 15:56 UTC, Christoph Burghardt
  Details
fix (831 bytes, patch)
2005-04-09 08:42 UTC, Ronald Bultje
none Details | Review

Description Christoph Burghardt 2005-04-03 23:34:44 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.
Comment 1 Ronald Bultje 2005-04-04 08:00:58 UTC
Can you provide a small gst-launch or one-file .c testcase for us to
reproduce-and-fix?
Comment 2 Christoph Burghardt 2005-04-04 17:47:04 UTC
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
Comment 3 Jan Schmidt 2005-04-06 10:46:10 UTC
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.
Comment 4 Ronald Bultje 2005-04-07 08:45:55 UTC
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).
Comment 5 Christoph Burghardt 2005-04-07 10:15:53 UTC
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. 
Comment 6 Ronald Bultje 2005-04-07 10:47:56 UTC
Note that it would be really cool to enhance videocrop to support more than just
I420 if you want to use it in totem...
Comment 7 Christoph Burghardt 2005-04-07 14:31:08 UTC
Created attachment 39804 [details]
Testcase for Videos
Comment 8 Christoph Burghardt 2005-04-07 15:52:35 UTC
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
Comment 9 Christoph Burghardt 2005-04-07 15:54:48 UTC
Created attachment 39809 [details]
Screenshot of the video after croping 10px on the top

Attached the screenshot
Comment 10 Christoph Burghardt 2005-04-07 15:56:08 UTC
Created attachment 39810 [details]
Dynamic Testcase
Comment 11 Ronald Bultje 2005-04-09 08:42:56 UTC
Created attachment 39861 [details] [review]
fix

This makes the testcase work for me.
Comment 12 Ronald Bultje 2005-04-09 08:44:53 UTC
Applied to CVS, marking fixed. If there's more issues, please feel free to re-open.