Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) 4090
• DeepStream Version 7.0
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 535.274.02
• 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)
Context:
I’m running the DeepStream parallel pipeline based on the following repository:
🔗 https://github.com/NVIDIA-AI-IOT/deepstream_parallel_inference_app
Setup:
-
Input: multiple
.mp4videos -
Model type: Triton Inference Server (Yolov8)
-
Pipeline: 2 branches, each with one PGIE model (same model, but different IDs in the config file, e.g.,
id: 103andid: 104)
Issue Description:
When interval = 0, all outputs are correct.
However, when I set interval > 0 (for example, interval = 5), I noticed frame synchronization issues in the metamux output.
In the metamux src_pad probe callback, only frames where frame_id % 6 == 0 should contain object detection bounding boxes. But in reality, I observe that some sources produce bounding boxes on frames where frame_id equals (multiple of 6) - 1.
This means that either metamux or another element in the pipeline outputs detection results one frame early, resulting in misaligned object detection timing between branches.
Below is an example of the erroneous JSON output (I export the outputs of all frame_idx values to make debugging easier):
{"video_url": 0, "frame_id": 0, "detections": [{"xyxy": [290, 441, 476, 866], "confidence": 0.93603515625, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [0, 390, 200, 1029], "confidence": 0.90234375, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [123, 465, 207, 768], "confidence": 0.7919921875, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [463, 486, 492, 558], "confidence": 0.62158203125, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [433, 477, 459, 548], "confidence": 0.57275390625, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [611, 495, 715, 569], "confidence": 0.8642578125, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [544, 472, 599, 518], "confidence": 0.7919921875, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [588, 478, 661, 531], "confidence": 0.6513671875, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}]}
{"video_url": 1, "frame_id": 0, "detections": [{"xyxy": [120, 82, 378, 592], "confidence": 0.92236328125, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [459, 116, 534, 531], "confidence": 0.5361328125, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [120, 82, 378, 592], "confidence": 0.92236328125, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [459, 116, 534, 531], "confidence": 0.5361328125, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}]}
{"video_url": 2, "frame_id": 0, "detections": [{"xyxy": [1265, 897, 1482, 1078], "confidence": 0.896484375, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [869, 630, 1076, 903], "confidence": 0.85205078125, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [871, 404, 977, 560], "confidence": 0.8310546875, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [450, 327, 563, 432], "confidence": 0.8017578125, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [625, 137, 676, 193], "confidence": 0.73876953125, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [432, 136, 494, 196], "confidence": 0.66552734375, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [655, 0, 685, 26], "confidence": 0.662109375, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [609, 48, 643, 83], "confidence": 0.53125, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}]}
{"video_url": 3, "frame_id": 0, "detections": [{"xyxy": [707, 297, 729, 350], "confidence": 0.76513671875, "class_id": 0, "class_name": "person", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [384, 315, 521, 426], "confidence": 0.91845703125, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [192, 311, 343, 408], "confidence": 0.9091796875, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [362, 333, 396, 361], "confidence": 0.79541015625, "class_id": 2, "class_name": "car", "frame_id": 0, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}]}
{"video_url": 0, "frame_id": 1, "detections": []}
{"video_url": 2, "frame_id": 1, "detections": []}
{"video_url": 3, "frame_id": 1, "detections": []}
{"video_url": 0, "frame_id": 2, "detections": []}
{"video_url": 1, "frame_id": 1, "detections": []}
{"video_url": 2, "frame_id": 2, "detections": []}
{"video_url": 3, "frame_id": 2, "detections": []}
{"video_url": 0, "frame_id": 3, "detections": []}
{"video_url": 1, "frame_id": 2, "detections": []}
{"video_url": 2, "frame_id": 3, "detections": []}
{"video_url": 3, "frame_id": 3, "detections": []}
{"video_url": 0, "frame_id": 4, "detections": []}
{"video_url": 1, "frame_id": 3, "detections": []}
{"video_url": 2, "frame_id": 4, "detections": []}
{"video_url": 3, "frame_id": 4, "detections": []}
{"video_url": 0, "frame_id": 5, "detections": []}
{"video_url": 1, "frame_id": 4, "detections": []}
{"video_url": 2, "frame_id": 5, "detections": []}
{"video_url": 3, "frame_id": 5, "detections": []}
{"video_url": 0, "frame_id": 6, "detections": [{"xyxy": [302, 445, 479, 857], "confidence": 0.91650390625, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [1, 391, 195, 1004], "confidence": 0.83544921875, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [118, 464, 210, 771], "confidence": 0.67578125, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [463, 484, 491, 554], "confidence": 0.625, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [435, 479, 461, 552], "confidence": 0.60595703125, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [612, 496, 719, 574], "confidence": 0.86474609375, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [544, 473, 602, 516], "confidence": 0.75927734375, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [589, 478, 662, 531], "confidence": 0.65869140625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}]}
{"video_url": 1, "frame_id": 5, "detections": [{"xyxy": [96, 96, 293, 652], "confidence": 0.91943359375, "class_id": 0, "class_name": "person", "frame_id": 5, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}, {"xyxy": [452, 61, 641, 538], "confidence": 0.8759765625, "class_id": 0, "class_name": "person", "frame_id": 5, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 103}]}
{"video_url": 2, "frame_id": 6, "detections": [{"xyxy": [867, 635, 1084, 953], "confidence": 0.8701171875, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [404, 381, 536, 508], "confidence": 0.85400390625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [867, 411, 977, 570], "confidence": 0.84619140625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [625, 154, 678, 212], "confidence": 0.7509765625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [610, 57, 645, 92], "confidence": 0.67431640625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [433, 135, 494, 195], "confidence": 0.64794921875, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [656, 1, 688, 30], "confidence": 0.63134765625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}]}
{"video_url": 3, "frame_id": 6, "detections": [{"xyxy": [708, 296, 731, 350], "confidence": 0.802734375, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [384, 315, 519, 425], "confidence": 0.91845703125, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [195, 311, 344, 408], "confidence": 0.9072265625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [363, 333, 397, 361], "confidence": 0.80712890625, "class_id": 2, "class_name": "car", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}]}
{"video_url": 0, "frame_id": 7, "detections": []}
{"video_url": 1, "frame_id": 6, "detections": [{"xyxy": [74, 102, 294, 645], "confidence": 0.91259765625, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}, {"xyxy": [453, 64, 678, 534], "confidence": 0.888671875, "class_id": 0, "class_name": "person", "frame_id": 6, "using_phone_scores": 0.0, "attach_phone_scores": 0.0, "unique_component_id": 104}]}
{"video_url": 2, "frame_id": 7, "detections": []}
error: “video_url”: 1, “frame_id”: 5 => Pay attention to the unique_component_id — at this point, frame_5 of video 1 contains the output from one branch.
This issue occurs randomly on certain frames, but once an error happens at a specific frame_idx, the bounding boxes for that video_url start appearing every +6 frames from that point onward. When running the pipeline multiple times, the issue happens intermittently — sometimes it’s correct, but most of the time the results are misaligned.
I ran the sample using the DeepStream C version and encountered this issue with the new streammux. With the old streammux, the problem didn’t seem to occur, but the pipeline would hang or behave incorrectly when one of the sources reached EOS, since the new streammux includes a mechanism to handle EOS signals from individual sources.
After that, I reimplemented the pipeline using the Python version via pyds. I’ll include the pipeline diagram and configuration files below, but the same issue still occurs — even when running only 4 sources.
Next, I tested on a machine with an RTX 5090 GPU and DeepStream 8.0. The issue did not appear when running a small number of videos. However, when scaling up (for example, branch 1 running 40 videos and branch 2 running 2 videos), the problem reappeared.
Do you have any idea what might be causing this issue? Thank you.
parallel_issues.zip (80.7 MB)