Nvvideoconvert not cropping( src-crop ) in the right place ( left and top are set to 0 each time )

Hello,
the plugin nvvideoconvert is not cropping in the right place using the correct src-crop property. The first two parameters of src-crop ( left:top:width:height ) left and top are set to 0 each time

is there a workaround? by carrying out a translation for example?

For reproduce this :
use this docker image : nvcr.io/nvidia/deepstream:6.0-devel on RTX 3070 or another with this driver version ( 470.161.03 )

in using gltransformation translation-x=left translation-y=top ?

Could you attach your code to show your whole pipeline and the mothod to verify the result?
Also, Deepstream 6.0 is too old. Our latest version is Deepstream 6.2. Could you update and try it?

When i build this Dockerfile with last tag ( 6.2 ), nvvideoconvert is not available …

FROM nvcr.io/nvidia/deepstream:6.2-devel
ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket

gst-inspect-1.0 nvvideoconvert

(gst-plugin-scanner:48): GStreamer-WARNING **: 07:05:07.391: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2dec.so’: libmpeg2.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:48): GStreamer-WARNING **: 07:05:07.419: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpg123.so’: libmpg123.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:48): GStreamer-WARNING **: 07:05:07.443: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenmpt.so’: libmpg123.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:48): GStreamer-WARNING **: 07:05:07.461: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstchromaprint.so’: libavcodec.so.58: cannot open shared object file: No such file or directory

(gst-plugin-scanner:48): GStreamer-WARNING **: 07:05:07.462: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpeg2enc.so’: libmpeg2encpp-2.1.so.0: cannot open shared object file: No such file or directory
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804

(gst-plugin-scanner:52): GStreamer-WARNING **: 07:05:07.543: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so’: libtritonserver.so: cannot open shared object file: No such file or directory
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804

(gst-plugin-scanner:54): GStreamer-WARNING **: 07:05:07.633: Failed to load plugin ‘/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
nvbufsurftransform:cuInit failed : 804
No such element or plugin ‘nvvideoconvert’

gst-inspect-1.0 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so
nvbufsurftransform:cuInit failed : 804

My os system :

cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 11 (bullseye)”
NAME=“Debian GNU/Linux”
VERSION_ID=“11”
VERSION=“11 (bullseye)”
VERSION_CODENAME=bullseye
ID=debian
HOME_URL=“https://www.debian.org/
SUPPORT_URL=“Debian -- User Support
BUG_REPORT_URL=“https://bugs.debian.org/

If i update my dockerfile for others releases, i can’t launch other

nvcr.io/nvidia/deepstream:6.1-devel

nvidia-container-cli: requirement error: unsatisfied condition: cuda>=11.6, please update your driver to a newer version, or use an earlier cuda container: unknown

nvcr.io/nvidia/deepstream:6.1.1-devel

nvidia-container-cli: requirement error: unsatisfied condition: cuda>=11.7, please update your driver to a newer version, or use an earlier cuda container: unknown

If I update my dockerfile for other versions, I can’t start the new docker

https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#dgpu-setup-for-ubuntu

How install last nvidia-driver on debian 11 ?

You can try to get the adaptive driver with your hardware by refering to the link below:
https://www.nvidia.com/download/driverResults.aspx/196865/en-us/

Thanks a lot for you advice but unfortunately i have same result with 6.0 and 6.2 tags.

it’s a bug :( you can reproduce easily with this Dockerfile belows

FROM nvcr.io/nvidia/deepstream:6.2-devel
ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video
ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket

gst-inspect-1.0 nvvideoconvert
Factory Details:
Rank primary (256)
Long-name NvVidConv Plugin
Klass Filter/Converter/Video/Scaler
Description Converts video from one colorspace to another & Resizes
Author NVIDIA Corporation. Post on Deepstream SDK forum for any queries @ DeepStream SDK - NVIDIA Developer Forums

Plugin Details:
Name nvvideoconvert
Description video Colorspace conversion & scaler
Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so
Version 1.2.3
License Proprietary
Source module nvvideoconvert
Binary package GStreamer nvvideoconvert Plugin
Origin URL http://nvidia.com/

GObject

cat /etc/os-release
NAME=“Ubuntu”
VERSION=“20.04.5 LTS (Focal Fossa)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 20.04.5 LTS”
VERSION_ID=“20.04”
HOME_URL=“https://www.ubuntu.com/
SUPPORT_URL=“https://help.ubuntu.com/
BUG_REPORT_URL=“Bugs : Ubuntu
PRIVACY_POLICY_URL=“Data privacy | Ubuntu
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I have run the pipeline below to generate a new mp4 file:

gst-launch-1.0 -e filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! queue2 ! nvvideoconvert src-crop="400:200:600:400"  ! nvv4l2h264enc ! h264parse ! qtmux  ! filesink location='crop.mp4'

It works normally with cropping in the right place.

Indeed it works in a static case. My pipeline (having an input udp source, nvdec and nvh264enc ) ) looks like below :

gst-launch-1.0 -e filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! qtdemux ! h264parse ! tee name=tee_nal tee_nal. ! nvv4l2decoder ! queue2 ! nvvideoconvert name=convert1 src-crop=“242:352:454:522” ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=‘crop_output_1.mp4’ tee_nal. ! nvv4l2decoder ! queue2 ! nvvideoconvert name=convert2 src-crop=“1062:264:452:609” ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=‘crop_output_2.mp4’

My pipeline starts without crop with src_crop “0:0:1920:1080” Then I have a thread reconfiguring the src-crop properties dynamically of the convert1 and convert2 elements. Output I observe a problem on the top and left output. The crop is performed but in the two sub-pipelines Left at 0 and Top at 0. Does your plugin code

accept a dynamic src-crop and why is there a problem only on the top and the left? Not having access to the source code I cannot debug. thanking you for your help.

Could you try to send the src-crop para in the probe function? Like:https://forums.developer.nvidia.com/t/dynamically-adjusting-crop-to-input-resolution/246828/4

I don’t see any improvement, on the other hand it complicates the management of the threads to carry out a simple update of the property of an element. I observe the same result on the position of the crop window. ( The top and left variables take the zero value ) I will continue to investigate during the day

You can try to use one branch first to test it without tee plugin. After it works well , you can add another branch.

i have try to use one branch first to test it without tee plugin but my pipeline is freezing after gst_pad_add_probe function . The src-crop is updated but the pipeline is frozen … it doesn’t work at all. I lost my time …

I will explore the solution of using gltransformation by performing a translation-x and y to position this video-crop. Having already used it I should have fixed my problem quickly.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

You can also attach your code about nvvideoconvert with one branch too. We can check if there are any problems.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.