The cropping range is strange when cropping and resizing are performed at the same time on gstreamer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The cropping range is strange when cropping and resizing are performed at the same time on gstreamer

196 Views
kawaguchi2
Contributor I

I'm using Linux kernel version 6.1.22 built with yocto on an imx8mp processor.
When I cropped and resized using gstreamer's v4l2src element, the desired image was not output.

<Cropping & resizing parameters>
Cropping cuts out 240 pixels on the left and 240 pixels on the right.
Resize reduces 1440 x 1080 to 640 x 480.

<gstreamer pipeline>

gst-launch-1.0 v4l2src device=/dev/video2 crop-left=240 crop-right=240 num-buffers=30 ! "video/x-raw,width=640,height=480" ! jpegenc ! multifilesink location=/tmp/%02d.jpeg

kawaguchi2_0-1711523522456.pngkawaguchi2_1-1711523559802.png


The cropping range is normal when only cropping is performed.
<gstreamer pipeline>

gst-launch-1.0 v4l2src device=/dev/video2 crop-left=240 crop-right=240 num-buffers=30 ! "video/x-raw" ! jpegenc ! multifilesink location=/tmp/%02d.jpeg

kawaguchi2_3-1711523789231.png

 

Why does the cropping range become strange when resizing is performed at the same time?

0 Kudos
Reply
0 Replies