NVSTREAMMUX batched-push-timeout value/calculation

From the Deepstream Developer Guide:

  • nvstreammux properties
    – Timeout in microseconds to wait after the first buffer is available to push the batch even if a complete batch is not formed.
    batched-push-timeout= 40000
    40 msec
  • Troubleshooting Solution 3
    – In the configuration file’s [streammux] group, set batched-push-timeout to (1/max_fps)

My understanding is that the batch-push-timeout value should be calculated as indicated by the following examples:

  • 12fps source: 1 / 12 * 1000 * 1000 = 83333 (microseconds)
  • 25fps source: 1 / 25 * 1000 * 1000 = 40000 (microseconds)
  • 30fps source: 1 / 30 * 1000 * 1000 = 33333 (microseconds)

The Deepstream samples uses the following values:

  • C/C++ samples uses 40000 (in source files or in configs)
    /* Muxer batch formation timeout, for e.g. 40 millisec. Should ideally be set
     * based on the fastest source's framerate. */
    #define MUXER_BATCH_TIMEOUT_USEC 40000
  • Python samples uses 4000000

I would like confirmation/clarification on:

  • Is my calculation examples above are correct?
  • Why the Python samples uses a value of 4000000, which is 4 seconds (see unit conversion)
  • Is 40000 a realistic real world value for a 25fps RTSP source?


• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version v5.0 GA
• JetPack Version (valid for Jetson only) Jetpack 4.4
• TensorRT Version v7.1.3.0

The value in sample is just sample, it does not mean it is the best value and the only choice.

Your understanding is correct and this will be more suitable for some real time sources such as CSI camera which can guarantee the video frame rate. If the RTSP source can guarantee 25fps rate in real world(https://tools.ietf.org/html/rfc3550), then 40ms is suitable.

@Fiona.Chen, thank you for the confirmation.

I understand that these are samples, but would at least expect the same value being used in both the C/C++ and Python examples to prevent confusion.

May I suggest you update the Python examples to also match the default value of 40000 as in the C/C++ examples.

1 Like

Thank you for the reminder ! We will take into consideration.