<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 17 janv. 2021 08 h 47, Fabio Estevam <<a href="mailto:festevam@gmail.com">festevam@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nicolas,<br>
<br>
On Sat, Jan 16, 2021 at 11:46 PM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca" target="_blank" rel="noreferrer">nicolas@ndufresne.ca</a>> wrote:<br>
<br>
> Perhaps you would explain in detail what isn't color correct ? To debug this,<br>
<br>
Here is the movie showing the incorrect colors:<br>
<br>
<a href="https://www.dropbox.com/s/a4ifivpoi663dkd/mx53.mp4?dl=0" rel="noreferrer noreferrer" target="_blank">https://www.dropbox.com/s/a4ifivpoi663dkd/mx53.mp4?dl=0</a></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Ah, didn't realise this was a link to you filming a screen. This looks like a UV inversion. </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
The original video is this one:<br>
<a href="http://cdn.clipcanvas.com/sample/clipcanvas_14348_offline.mp4" rel="noreferrer noreferrer" target="_blank">http://cdn.clipcanvas.com/sample/clipcanvas_14348_offline.mp4</a><br>
<br>
Please note that the color mismatch is not related to this specific<br>
video sample.<br>
It happens with all videos I have tried.<br>
<br>
> you probably want to inspect the caps and the colorimetry negotiated between<br>
> each element (use -v in gst-launch-1.0). It's quite possible that the decoder is<br>
> ignoring upstream colors and get badly hinted by the driver, or that kmssink is<br>
> pnot passing colorimetry to the driver.<br>
<br>
Here is the -v output:<br>
<br>
# gst-launch-1.0 -v filesrc location=/media/clip.mp4 ! qtdemux !<br>
h264parse ! v4l2h264dec ! kmssink<br>
Setting pipeline to PAUSED ...<br>
[   15.113196] msm msm: [drm:adreno_request_fw] loaded<br>
qcom/yamato_pm4.fw from new location<br>
[   15.124377] msm msm: [drm:adreno_request_fw] loaded<br>
qcom/yamato_pfp.fw from new location<br>
Pipeline is PREROLLING ...<br>
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1024<br>
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 576<br>
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =<br>
video/x-h264, stream-format=(string)avc, alignment=(string)au,<br>
level=(string)3.1, profile=(string)main,<br>
codec_data=(buffer)014d401fffe10<br>
023674d401f967200800936028100000e100002bf203460016e40016e45ef7c1e1108a24001000468de3c80,<br>
width=(int)1024, height=(int)576, pixel-aspect-ratio=(fraction)1/1<br>
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =<br>
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,<br>
level=(string)3.1, profile=(string)main, width=(int)1024, height=(<br>
int)576, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1,<br>
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8,<br>
bit-depth-chroma=(uint)8, parsed=(boolean)true<br>
/GstPipeline:pipeline0/v4l2h264dec:v4l2h264dec0.GstPad:sink: caps =<br>
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,<br>
level=(string)3.1, profile=(string)main, width=(int)1024,<br>
height=(int)576, pixel-aspect-ratio=(fraction)1/1,<br>
framerate=(fraction)25/1, chroma-format=(string)4:2:0,<br>
bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true<br>
/GstPipeline:pipeline0/v4l2h264dec:v4l2h264dec0.GstPad:src: caps =<br>
video/x-raw, format=(string)I420, width=(int)1024, height=(int)576,<br>
interlace-mode=(string)progressive, multiview-mode=(string)mono,<br>
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,<br>
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)jp<br>
eg, colorimetry=(string)bt601, framerate=(fraction)25/1<br>
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps =<br>
video/x-raw, format=(string)I420, width=(int)1024, height=(int)576,<br>
interlace-mode=(string)progressive, multiview-mode=(string)mono,<br>
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,<br>
pixel-aspect-ratio=(fraction)1/1,<br>
chroma-site=(string)jpeg,colorimetry=(string)bt601,<br>
framerate=(fraction)25/1<br>
Pipeline is PREROLLED ...0 %)<br>
Setting pipeline to PLAYING ...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">At first sight there is nothing wrong from GStreamer happening. It picks i420, pass it to KMS and it comes out wrong, first suspect would be the display driver. Understand that yuv formats are often unused and untested as most display server / compositer uses rgb type of formats converting with GPU.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
New clock: GstSystemClock</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Any adjustment I need to do in the Gstreamer pipeline to negotiate the<br>
correct colors to the display?<br>
<br>
Thanks<br>
</blockquote></div></div></div>