Running new nvstreammux offline / non-live with batching of a single source

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) dGPU (T4)
• DeepStream Version 6.2
• TensorRT Version n/a
• NVIDIA GPU Driver Version (valid for GPU only) 525.125.06
• Issue Type( questions, new requirements, bugs) question

Howto configure the new nvstreammux for processing offline (file source and not syncing to clocks in the sink), with a single file source, with batching (of that single file source)?

Pipeline is trivial ( uridecodebin → nvstreammux → queue → fakesink sync=“false” )

My last try is something like that:
streammux.set_property('batch-size', 4)
and a config file:

            "[property]\n"
            "adaptive-batching=0\n"
            "overall-max-fps-n=10000\n"
            "overall-max-fps-d=1\n"
            "overall-min-fps-n=1\n"
            "overall-min-fps-d=1\n"
            "max-fps-control=0\n"

I have probes after decoder and after the mux, and they show something like that:

2023-08-09 14:34:47.028 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 0.0
2023-08-09 14:34:47.043 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 66.0
2023-08-09 14:34:47.043 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 132.0
2023-08-09 14:34:47.048 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 198.0
2023-08-09 14:34:48.029 | DEBUG    | __main__:streammux_src_buffer_probe:52 - streammux src probe: gst buf pts: 65.93
2023-08-09 14:34:48.029 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 0.0 batch_id 0
2023-08-09 14:34:48.030 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 264.0
2023-08-09 14:34:49.029 | DEBUG    | __main__:streammux_src_buffer_probe:52 - streammux src probe: gst buf pts: 131.86
2023-08-09 14:34:49.029 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 66.0 batch_id 0
2023-08-09 14:34:49.030 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 330.0
2023-08-09 14:34:50.029 | DEBUG    | __main__:streammux_src_buffer_probe:52 - streammux src probe: gst buf pts: 197.79

Note the streammux outputting not-batched data AND every one second (probably owning to the overall-min-fps config). I’d expect it to output batched data (4 frames per buffer) quickly (as fast as hardware decoder decodes).

Attaching the pipeline dot as well:

=====================

The “old” nvstreammux with following config:

    streammux.set_property('batch-size', 4)
    streammux.set_property('width', 1920)
    streammux.set_property('height', 1080)
    streammux.set_property('batched-push-timeout', 4000000)
    streammux.set_property('live-source', False)

behaves as expected:

2023-08-09 14:39:20.089 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 0.0
2023-08-09 14:39:20.103 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 66.0
2023-08-09 14:39:20.103 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 132.0
2023-08-09 14:39:20.108 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 198.0
2023-08-09 14:39:20.108 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 264.0
2023-08-09 14:39:20.108 | DEBUG    | __main__:streammux_src_buffer_probe:52 - streammux src probe: gst buf pts: 0.0
2023-08-09 14:39:20.108 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 0.0 batch_id 0
2023-08-09 14:39:20.108 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 66.0 batch_id 1
2023-08-09 14:39:20.108 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 132.0 batch_id 2
2023-08-09 14:39:20.109 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 198.0 batch_id 3
2023-08-09 14:39:20.122 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 330.0
2023-08-09 14:39:20.122 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 396.0
2023-08-09 14:39:20.127 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 462.0
2023-08-09 14:39:20.127 | DEBUG    | __main__:decoder_src_buffer_probe:45 - decoder src probe: buf pts: 527.0
2023-08-09 14:39:20.127 | DEBUG    | __main__:streammux_src_buffer_probe:52 - streammux src probe: gst buf pts: 65.93
2023-08-09 14:39:20.127 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 264.0 batch_id 0
2023-08-09 14:39:20.127 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 330.0 batch_id 1
2023-08-09 14:39:20.127 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 396.0 batch_id 2
2023-08-09 14:39:20.127 | DEBUG    | __main__:streammux_src_buffer_probe:60 - streammux src probe: frame pts: 462.0 batch_id 3

New nvstreammux is designed to sync multiple sources. If you want to batch the frames in one stream, please use nvstreammux.

Thanks for your reply. I’ll use the old one.

My reasons for trying the new one:

  • the old nvstreammux requires width/height to be specified, and I just want the native resolution (no rescaling at this point). I’ve hoped to avoid this complication with the new nvstreammux.
  • I also hoped to get the new one early, since I’ve assumed the old one will be phased out in newer versions of DeepStream.

nvstreammux and new nvstreammux will co-exist. They are for different scenarios.

1 Like

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