My camera has a resolution of 1280x720, and my LCD has a resolution of 1280x720, but I only want to display the whole camera image in some areas of the LCD. Can you give me some gst-launch-1.0 commands for my reference.
The way I do hardware accelerated zooming is to use imxvideoconvert_g2d like this:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! videocrop top=0 left=120 right=120 bottom=0 ! imxvideoconvert_g2d rotation=3 ! video/x-raw, width=480, height=800 ! waylandsink
Note that "videocrop" settings is a metadata that gets passed to imxvideoconvert_g2d as parameter.
This works also dynamically if you use the C gst api.
PS: One should avoid "videoconvert" as it is software based and not GPU accelerated.
try the command like this
"# gst-launch-1.0 imxcompositor_g2d name=comp sink_0::xpos=xx sink_0::ypos=xx ! waylandsink videotestsrc ! video/x-raw, width=640, height=480 ! comp.sink_0"
xx is the position you want to set
this cmd is worked, but my video plays with a mosaic and the width is exactly the size of the xpos offset I set,
I use IMX8MP ,cmd as following "gst-launch-1.0 compositor name=comp sink_0::xpos=320 sink_0::ypos=0 ! glimagesink filesrc location=/run/media/mmcblk1p1/DCIM/VID_20210713_214846.avi ! decodebin ! videoconvert ! comp.sink_0"