How to set width and height in sink

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
In sink, I set output type is 4, the output height and widht is 1080X1920, the streammux is 1440X2560, whe the pipeline is running, I find rtsp stream is 1440X2560, not 1080X1920.
Please help me, thank you.

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)

• DeepStream Version

• JetPack Version (valid for Jetson only)

• TensorRT Version

• NVIDIA GPU Driver Version (valid for GPU only)

• Issue Type( questions, new requirements, bugs)

• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

• Hardware Platform (Jetson)

• DeepStream Version:6.0

• JetPack Version :4.6

• TensorRT Version:8.01

• NVIDIA GPU Driver Version (valid for GPU only)

• Issue Type( questions)

• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I set sink type is 4 and output width and height is 1920X1080, but when I use vlc to pull ‘rtsp://192.168.170.61:8555/ds-test’, I find this stream is not 1920X1080, it’s 2560X1140, this resolution is my streammux.
My sink config parameters are as following.

[sink8]
enable = 1
type = 4
qos = 0
source-id = 0
enc-type = 0
profile = 0
msg-conv-payload-type = 0
msg-conv-msg2p-new-api = 1
msg-conv-frame-interval = 1
nvbuf-memory-type = 0
rtsp-port=8555
width = 1920
height = 1080

please refer to NvDsSinkEncoderConfig in create_udpsink_bin, it is not supported to set width and height.
the workaround is setting streammux 's dimension to 1080X1920.

Thank you for reply.But I have a question about how to support it by modifying code?Can you give some suggestions.
Thank you.

This may work for your case, so I am going to suggest it.

Could you try adding nvmultistreamtiler to your pipeline before the nvdsosd element? (you should have an nvvideoconvert in between the tiler and onscreendisplay)

And set the following properties:

"rows", 1
"columns", 1
"width", 1920
"height", 1080

Hopefully this will resize your output stream to the desired size.

Thank you, but I want to set rtsp as output stream , not onscreendisplay.

  1. modify parse_sink (NvDsSinkSubBinConfig *config… to save w/h to NvDsSinkEncoderConfig.
  2. add w/h to cap_filter’s caps in create_udpsink_bin. like this:
    caps = gst_caps_from_string ("video/x-raw(memory:NVMM), format=I420, width=w,height=h ");
    g_object_set (G_OBJECT (bin->cap_filter), “caps”, caps, NULL);

I modify code like this:


but I found only width is ok, the height is also streammux, what’s wrong is this?
thank you.

You don’t need to remove / modify your existing RTSP sink. All you need to do is add the two elements to your pipeline (keep your RTSP sink). Then you should get your desired resized RTSP stream.

Update: Please ignore this. Fanzh idea is better.

There is a typo in “height”. You specified heigh. On hindsight, setting the caps on sink encoder is probably the quickest and easiest way to implement.

How to specify height? Could you give some advices?
Thank you.

one correction : typo, heigh-> height

OK, I have soled this issue, thank you very much.

OK, I have soled this issue, thank you very much.

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