In this article
Keep actual batch membership and a trace from each processed frame to its surface.
An application loops over the configured batch capacity even when the current video batch is partial. It interprets unused positions as real camera observations and can read unrelated or unavailable surface state.
The media mechanism
NvDsBatchMeta distinguishes maximum frames from frames actually present. Iteration must follow the current frame metadata and supported surface mapping, not manufacture observations from the configured upper bound.
Establish the pipeline boundary
Use num_frames_in_batch for actual membership and max_frames_in_batch for capacity under the pinned metadata contract. Neither should be substituted for the number of valid entries in an unrelated application array.
Traverse supported frame metadata and resolve each frame’s surface position explicitly. A partial batch is not inherently invalid; reading unused capacity as if it were current content is the defect.
Build a fixture whose active source count is smaller than configured capacity and whose images have unique markers. Verify that the application neither repeats a previous surface nor invents an absent source. Repeat after a source leaves the mux. Keep source identity separate from frame count so a numerically correct count cannot conceal swapped cameras. Compare the exact accepted set rather than relying on a loop completing without an indexing error.
A constructed failure case
Configure more capacity than the fixture currently supplies. Acceptance requires processing only present frames, preserving every actual source marker and producing no synthetic detections for unused capacity slots.
A practical validation procedure
Produce full and partial marked batches under the pinned SDK. Compare num_frames_in_batch, max_frames_in_batch and frame_meta_list with accepted model inputs. Verify every indexed surface through the corresponding frame metadata before accessing it.
Keep an unchanged control and a deliberate failure case. Change the relevant setting or interruption independently, then compare observed frame identities and state transitions. Measure through recovery as well as the first error; a restarted worker can retain obsolete results or references.
Evidence for acceptance
Keep actual batch membership and a trace from each processed frame to its surface.
Recovery and limits
A valid count does not establish that frames share dimensions, source identity or capture time.
Define whether recovery drains, discards or isolates pending frames before resuming ordinary service. Preserve compact diagnostic identities and the fixture configuration. Avoid treating a new connection or a live process as proof that previous in-flight work has finished safely.
References and interpretation
Primary references: DeepStream batch metadata; DeepStream per-frame metadata.
This is a proposed operational validation, not an executed Retrivium benchmark. Documentation defines interfaces and supported behavior; the actual pipeline needs its own evidence. Repeat the check after relevant plugin, decoder, source or preprocessing changes.
Related reading
Continue with Mitsuba batch cameras: preserve per-view layout and effective shared settings; Batched video metadata: distinguish surface position from camera source identity. Their adjacent context does not replace the specific frame-flow acceptance check described here.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.