Nvvideoconvert resize

• Hardware Platform: Jetson Xavier NX
• DeepStream Version: 6.0.1
*• JetPack Version: 5.0.1 DP
• TensorRT Version: 8.4.0

Hi folks,
I have in my pipeline a nvvideoconvert element, I want to resize my stream using this element from 640x640 to 704x576 where 704 is the width and 576 is the height I read the document https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvvideoconvert.html and look on dst-crop and src-crop property but I little confused.

Here is my code:

   nvvidconv_postosd = Gst.ElementFactory.make("nvvideoconvert", "convertor_postosd")
    nvvidconv_postosd.set_property("compute-hw", 2) # Using VIC
    # Convert to OCU format 704X576
    src_crop = "0:0:640:640"  # Crop the entire input image (640x640)
    dest_crop = "0:16:704:576"  # Place the transformed image at (0, 16) in the output image (704x576)
    nvvidconv_postosd.set_property("gpu-id", 0)  # Set GPU ID if required
    nvvidconv_postosd.set_property("src-crop", src_crop)
    nvvidconv_postosd.set_property("dest-crop", dest_crop)

Unfortuntaly it’s look like the stream is 640x640 I will happy to modifcation and where I wrong.

You can use streammux (width/height) to resize the stream.
I’m not sure if the src-crop&dest-crop is proper for resizing use case, as the metadata still keeps position information in the original image, it may be invalid after resizing.

Thank you for your reply I know that I can use Streammux but because I already use nvvconverter to change the format stream before the encoder I want to use the same nvvconverter to resize the stream and not add another element to my pipeline.
There is an option to use nvvconverter to resize stream?

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

This is a sample to convert a video resolution from 1080p to 720x576 by nvvideoconvert.
gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! nvvideoconvert ! 'video/x-raw(memory:NVMM),width=720,height=576' ! fakesink

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