GNOME Bugzilla – Bug 160130
[xvimagesink] RGB/BGR issue
Last modified: 2005-10-02 14:48:30 UTC
This is basically the same as #160116: the output has wrong colors (the sky is red, the people are blue.. which isn't how it looked "irl" :)). I've found this while trying to debug #160116. gst-launch-0.8 -v filesrc location=mvi_0033.avi ! avidemux name=demuxer ! { queue ! jpegdec ! xvimagesink } { demuxer. ! queue ! audioconvert ! audioscale ! esdsink } (mvi_0033.avi = http://foodfight.org/fotos/2004/10-02%20Demonstratie%20tegen%20kabinetsbeleid/mvi_0033.avi, 4.3M)
Works fine here. You probably have a buggy X driver. To test this, run 'gst-launch videotestsrc ! video/x-raw-yuv, format=\(fourcc\)YUY2 ! xvimagesink'. You should see a rather familiar set of bars, which should be white, yellow, cyan, green, magenta, red, blue.
I don't have a buggy X driver (the gst-launch command works perfectly, as do xine, mplayer and all other Xv-using applications)
The bug could be in any number of Xv colorspaces that aren't used by other software. Try "I420" instead of "YUY2".
Martijn?
When I run this pipeline with I420 instead of YUY2, it displays white, cyan, dirty orange-brownish, green, purple, bright blue, dark red. (pipeline: gst-launch-0.8 videotestsrc ! video/x-raw-yuv, format=\(fourcc\)I420 ! xvimagesink) Replacing xvimagesink by sdlvideosink makes the colors correct again, and brighter than when I use YUY2 (which is darker in both the xvimagesink and sdlvideosink cases).
*** Bug 160116 has been marked as a duplicate of this bug. ***
Martijn, one more thing, what video driver is this? And what's the output of xvinfo?
video driver is "siliconmotion" xvinfo tells me: X-Video Extension version 2.2 screen #0 Adaptor #0: "Silicon Motion Lynx Series Video Engine" number of ports: 1 port base: 61 operations supported: PutVideo PutImage supported visuals: depth 16, visualID 0x23 depth 16, visualID 0x24 depth 16, visualID 0x25 depth 16, visualID 0x26 number of attributes: 2 "XV_BRIGHTNESS" (range 0 to 255) client settable attribute client gettable attribute (current value is 0) "XV_COLORKEY" (range 0 to 16777215) client settable attribute client gettable attribute (current value is 2110) number of encodings: 18 encoding ID #0: "pal-composite-0" size: 704 x 576 rate: 0.020000 encoding ID #1: "ntsc-composite-0" size: 704 x 480 rate: 0.016683 encoding ID #2: "secam-composite-0" size: 7040 x 576 rate: 0.020000 encoding ID #3: "pal-composite-1" size: 704 x 576 rate: 0.020000 encoding ID #4: "ntsc-composite-1" size: 704 x 480 rate: 0.016683 encoding ID #5: "secam-composite-1" size: 7040 x 576 rate: 0.020000 encoding ID #6: "pal-composite-2" size: 704 x 576 rate: 0.020000 encoding ID #7: "ntsc-composite-2" size: 704 x 480 rate: 0.016683 encoding ID #8: "secam-composite-2" size: 7040 x 576 rate: 0.020000 encoding ID #9: "pal-composite-3" size: 704 x 576 rate: 0.020000 encoding ID #10: "ntsc-composite-3" size: 704 x 480 rate: 0.016683 encoding ID #11: "secam-composite-3" size: 7040 x 576 rate: 0.020000 encoding ID #12: "pal-svideo-0" size: 704 x 576 rate: 0.020000 encoding ID #13: "ntsc-svideo-0" size: 704 x 480 rate: 0.016683 encoding ID #14: "secam-svideo-0" size: 7040 x 576 rate: 0.020000 encoding ID #15: "pal-svideo-1" size: 704 x 576 rate: 0.020000 encoding ID #16: "ntsc-svideo-1" size: 704 x 480 rate: 0.016683 encoding ID #17: "secam-svideo-1" size: 7040 x 576 rate: 0.020000
I don't see any supported formats. Can you provide me the log created by the pipeline in your opening post, with "--gst-debug-no-color --gst-debug=xvimagesink:5 &> logfile"?
Created attachment 37256 [details] Logfile (as requested)
Martijn, can you put a breakpoint (or something) in the gst_caps_append() on line 813 of xvimagesink.c, and print the content of formats[i] every time you reach that (should be 8 times or so, four times for YUV and a bunch of times for RGB). I'm suspecting that component_order is non-standard and your card really only supports YV12.
Martijn, I need this output to finish debugging this issue. Let me know if you need help getting this info.
Closing.. Please reopen if you can provide the needed info! thanks