I'm facing some strange behavioral from imxcompositor_g2d gstreamer plugin, when trying to mix two videos. The following pipeline is used to produce the video below.
gst-launch-1.0 imxcompositor_g2d name=c \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1024 sink_0::height=768 sink_0::zorder=55 sink_0::fill_color=0xff00ff00 sink_0::alpha=0.5 \
sink_1::xpos=0 sink_1::ypos=0 sink_1::width=1024 sink_1::height=768 sink_1::fill_color=0x44441133 ! imxvideoconvert_g2d ! videobox top=-156 bottom=-156 right=-448 left=-448 ! "video/x-raw,width=1920,height=1080" ! kmssink driver-name="imx-drm" connector-id=40 can-scale=false force-modesetting=true \
videotestsrc pattern=ball motion=0 ! tee name=t1 t1. ! "video/x-raw,format=YUY2,width=1024,height=768" ! queue ! c.sink_0 \
v4l2src device=/dev/video1 ! tee name=t2 t2. ! "video/x-raw,format=YUY2,width=1024,height=768" ! queue ! c.sink_1
As you can see there is distortion of the ball, like lines are out of sync. This problem is mostly visible in the bottom section of the mixed video. This distortion is visible on all possible outputs I have tested - display, network stream, file.
So I've done the following tests:
1) Only image sensor video processed by the ISP - works fine, no distortions.
2) Only videotestsrc - works fine, no distortions.
3) Split the image sensor video with tee, then feeding the imxcompostior_g2d inputs, so it is like mixing the video with itself - distortions are exactly as shown in the video.
4) Two patterns from videotestsrc - ball and flicker (i.e. moving patterns) - distortions are as in the video.
5) I tried with kmssink, fbdevsink, waylandsink - distortions are visible, it is not related to the type of the video output.
I have tried also without the videobox - the same distortions appear.
All these tests makes me think that the problem is in the imxcompostior_g2d.
My setup is based on FSLC 5.15-2.0.x-imx, kernel 5.15.60, yocto kirkstone.
Plugin Details:
Name imxcompositor
Description IMX Video Composition Plugins
Filename /usr/lib/gstreamer-1.0/libgstimxcompositor.so
Version 4.7.0
License LGPL
Source module imx-gst1.0-plugin
Binary package Freescle Gstreamer Multimedia Plugins
Origin URL http://www.freescale.com
Here is the video example.
Suggestions how to proceed to avoid these distortions?
Hello @imsOPX,
I hope you are doing well.
->Please refer to the below-given link for reference.
https://community.nxp.com/t5/i-MX-Processors/iMX8MPlus-How-to-mix-two-video-sources-into-one-with-Gs...
->Please refer to this link to get more information about GStreamer-imx Plugins
https://community.nxp.com/t5/i-MX-Processors/i-MX6-GStreamer-imx-Plugins-Tutorial-Example-Pipelines/...
I hope this helps!
Thanks & Regards,
Sanket Parekh