Nvvideoconvert before nvstreammux failing negotiation

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
T4
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
NA
• TensorRT Version
7.0.0.11
• NVIDIA GPU Driver Version (valid for GPU only)
440.64.00
• Issue Type( questions, new requirements, bugs)
I had the following pipeline:-

        h264parser = self.create_node("h264parse", "h264-parser")
        decoder = self.create_node("nvv4l2decoder", "nvv4l2-decoder")
        streammux = self.create_node("nvstreammux", "nvstreammux0")
        streammux.set_property('width', 1280)
        streammux.set_property('height', 720)
        nvvidconv0 = self.create_node("nvvideoconvert", "nvvidconv0")
        nvvidconv0.set_property('src-crop', '473:172:179:208')

The linking order was: h264parser → decoder → nvstreammux → nvvideoconvert
This was working fine when I had one stream. Now I need to handle multiple streams and each stream has its own crop configuration. So I moved the nvvidconv to before the nvstreammux in preparation for that.

        h264parser = self.create_node("h264parse", "h264-parser")
        decoder = self.create_node("nvv4l2decoder", "nvv4l2-decoder")
        nvvidconv0 = self.create_node("nvvideoconvert", "nvvidconv0")
        nvvidconv0.set_property('src-crop', '473:172:179:208')
        streammux = self.create_node("nvstreammux", "nvstreammux0")
        streammux.set_property('width', 1280)
        streammux.set_property('height', 720)

The linking order is: h264parser → decoder → nvvideoconvert → nvstreammux

My original mp4 video is in this format:-

Input #0, h264, from ‘1.h264’:
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 50 tbc

I am now getting this error.

Error: gst-stream-error-quark: Internal data stream error. (1): gstbaseparse.c(3611): gst_
base_parse_loop (): /GstPipeline:pipeline0/GstH264Parse:h264-parser:
streaming stopped, reason not-negotiated (-4)

  • What could be the reason for this error?
  • Is it because I have not set the width/height for the nvvideoconvert input now (because it moved before nvstreammux)? If so, how do I achieve the per-stream crop?
  • Is there an automatic upscale done in the nvv4l2decoder? (say to 1980x1080 by default) and that is causing the failure?

Please let me know if there is any other information needed to solve this issue.

Fixed the issue by doing the following:-

  • set width and height of nvstreammux to 224, 224
  • Added the following line:

streammux.set_property(“nvbuf-memory-type”, int(pyds.NVBUF_MEM_CUDA_DEVICE))

1 Like

Glad to know issue resolved, thanks for the update.