Deepstream pipeline runs for a bit then hangs after muxing meta/x-klv and video/x-h264 with mpegtsmux

Please provide complete information as applicable to your setup.

• Jetson Xavier NX
• DeepStream 5.1
• JetPack Version 4.5.1
• TensorRT 7.1.3
• CUDA 10.2

I have a pipeline that uses tsdemux to separate a transport stream file into its h264 and KLV elementary streams, process each, then mux the streams back into mpegts. The pipeline runs normally for a few seconds and successfully processes some buffers, then hangs.

My pipeline works properly when I let tsdemux ignore the KLV branch. However, when I include the KLV branch I see the following error at the start of my program before it processes some of the buffers and hangs.

(python3:455): GStreamer-CRITICAL **: 10:12:37.484: gst_segment_to_running_time: assertion 'segment->format == format' failed

Generally, my pipeline takes the shape of:

  • What I have tried:
  1. Ran with ./tegrastats to ensure the hang is infact still processing (high CPU).
  2. Ran with GST_DEBUG=5 and saw the following repeatedly printed out:
0:00:00.279736134 [334m19731[00m      0x1dc1f60 [37mDEBUG  [00m [00m         collectpads gstcollectpads.c:960:gst_collect_pads_peek:<collectpads0>[00m Peeking at pad tsmux:sink_0: buffer=buffer: 0x7fd340015000, pts 0:00:00.047919148, dts 0:00:00.047919148, dur 99:99:99.999999999, size 97, offset 169200, offset_end none, flags 0x40
0:00:00.279740102 [334m19731[00m      0x1dc1f60 [37mDEBUG  [00m [00m         collectpads gstcollectpads.c:960:gst_collect_pads_peek:<collectpads0>[00m Peeking at pad tsmux:sink_1: buffer=buffer: 0x1d97d80, pts 0:00:00.047919148, dts 0:00:00.047919148, dur 99:99:99.999999999, size 6, offset 169200, offset_end none, flags 0x2040
0:00:00.279743558 [334m19731[00m      0x1dc1f60 [37mDEBUG  [00m [00m         collectpads gstcollectpads.c:1485:gst_collect_pads_find_best_pad:<collectpads0>[00m best pad sink_0, best time 0:00:00.047919148
0:00:00.279746604 [334m19731[00m      0x1dc1f60 [37mDEBUG  [00m [00m         collectpads gstcollectpads.c:1224:gst_collect_pads_set_waiting:<collectpads0>[00m Setting pad sink_0 to waiting 1, locked 1
  1. Only demux one of the streams (ignore/drop the other)
    a. Run video/x-h264 branch and let tsdemux ignore klv, the pipeline worked
    b. Run meta/x-klv branch and let tsdemux ignore video, this does not work and the same segment error is displayed. I suspect there is some formatting issue with my KLV branch.

Please let me know what you think, I am happy to try any suggestions. Thank you!

Please raise your topic to gstreamer community. GStreamer: Mailing Lists
It has nothing to do with deepstream.

Ok. Thank you for your response.