Cropping using nvvidconv

Hi!

Im trying to crop a video using the nvvidconv element. The first pipeline I tried was this one:

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)15/1" ! nvvidconv top=200 ! queue ! nvv4l2h265enc ! h265parse ! mpegtsmux ! filesink location=test.ts

This returned an error:

/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:4786: => VIC Configuration failed image scale factor exceeds 16, use GPU for Transformation

So I decided to try and run nvvidconvon the GPU instead of the VIC:

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)15/1" ! nvvidconv top=200 compute-hw=GPU ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)880, framerate=(fraction)15/1" ! queue ! nvv4l2h265enc ! h265parse ! mpegtsmux ! filesink location=test.ts

This pipeline runs without error, but the video is unwatchable.
FYI, the contents of /etc/nv_tegra_release

# R36 (release), REVISION: 4.3, GCID: 38968081, BOARD: generic, EABI: aarch64, DATE: Wed Jan  8 01:49:37 UTC 2025
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

With cropping:

This is the a still of the video when I disable cropping:

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)15/1" ! nvvidconv ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, framerate=(fraction)15/1" ! queue ! nvv4l2h265enc ! h265parse ! mpegtsmux ! filesink location=test.ts

Suppose you need to define the right, bottom and left for the crop window.

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), width=(int)3280, height=(int)2464, framerate=(fraction)15/1" ! nvvidconv top=200 bottom=680 left=0 right=640 ! queue ! xvimagesink sync=false