Help with mkv splitting pipeline

I’m using a gstreamer pipeline to matroska mux an h264 stream with pcm (s16le) audio, and to expose the result to consumers via tcpserversink.

I can consume the output with a tcpclientsrc and save it via filesink. Audio is ok, video ok.

What I can’t seem to get right is how to segment the video (via splitmuxsink).

This is the closest I’ve got, yet.

gst-launch-1.0 -v tcpclientsrc host=127.0.0.1 port=5001 ! queue ! matroskademux name=demux demux.video_0 ! queue ! h264parse ! queue max-size-buffers=64 ! mux.video demux.audio_0 ! queue ! audioconvert ! audio/x-raw,rate=48000,channels=2 ! mux.audio_0 splitmuxsink location=test%d.mkv max-size-time=10000000000 muxer=matroskamux name=mux

All my attempts so far have hit a brick wall. Help?

And how does it fail / not work?

The producer works as expected, just to be clear.
The output of the above command in the bottom of the reply.

The first file gets created (test0.mkv) but it’s 0 bytes long. No other file gets created. Because of course, the pipe is all messed up.
I did try without the audio and it did work - once. I tried the exact same command multiple times and once in 10 - 15 tries it actually did it’s thing. But again, no audio.

gst-launch-1.0 -v tcpclientsrc host=127.0.0.1 port=5001 ! queue ! matroskademux name=demux demux.video_0 ! queue ! h264parse ! queue max-size-buffers=64 ! mux.video demux.audio_0 ! queue ! audioconvert ! audio/x-raw,rate=48000,channels=2 ! mux.audio_0 splitmuxsink location=test%d.mkv max-size-time=10000000000 muxer=matroskamux name=mux
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstFileSink:sink: async = false
WARNING: from element /GstPipeline:pipeline0/GstMatroskaDemux:demux: Delayed linking failed.
Additional debug info:
gst/parse/grammar.y(540): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstMatroskaDemux:demux:
failed delayed linking pad  audio_0 of GstMatroskaDemux named demux to some pad of GstQueue named queue3

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.313: ../gst/gstpad.c:4677:gst_pad_push_data:<demux:audio_0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.335: ../gst/gstpad.c:4677:gst_pad_push_data:<demux:video_0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.335: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue1:sink> Got data flow before segment event
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.335: ../gst/gstpad.c:4677:gst_pad_push_data:<queue1:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.335: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<h264parse0:sink> Got data flow before segment event
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstSplitMuxSink:mux.GstGhostPad:video.GstProxyPad:proxypad0: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video.GstPad:sink: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstSplitMuxSink:mux.GstGhostPad:video: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.335: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.335: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video.GstPad:src: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.336: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.336: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.336: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.336: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.336: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.336: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.336: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.336: ../gst/gstpad.c:4677:gst_pad_push_data:<queue_video:src> Got data flow before segment event
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = NULL
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstFileSink:sink: location = test0.mkv
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = video/x-h264, level=(string)3.1, profile=(string)main, codec_data=(buffer)014d401fffe1000b674d401f965403c0113f2a01000468ee3880, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
New clock: GstSystemClock

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.371: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.371: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.371: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.407: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.407: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.407: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.443: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.443: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.443: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.479: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.479: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.479: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.511: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.511: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.511: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.547: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.547: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.547: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 6

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.583: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.583: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.583: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 7

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.619: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.619: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.619: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 8

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.655: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.655: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.655: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.655: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.655: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.655: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.655: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.655: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.655: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 9

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.691: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.691: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.691: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.691: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.691: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.691: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.691: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.691: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.691: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 10

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.727: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.727: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.727: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.727: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.727: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.727: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.727: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.727: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.727: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 11

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.763: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.763: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.763: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.763: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.763: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.763: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.763: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.763: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.763: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 12

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.795: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.795: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.795: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.795: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.795: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.795: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.795: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.795: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.795: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 13

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.831: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.831: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.831: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.831: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.831: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.831: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.831: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.831: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.831: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 14

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.867: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.867: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.867: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.867: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.867: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.867: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.867: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.867: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.867: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 15

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.903: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.903: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.903: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.903: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.903: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.903: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.903: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.903: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.903: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 16

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.939: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.939: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.939: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.939: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.939: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.939: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.939: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.939: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.939: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 17

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.975: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.975: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.975: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.975: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.975: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:56.975: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.975: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.975: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:56.975: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 18

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:57.011: ../gst/gstpad.c:4677:gst_pad_push_data:<h264parse0:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:57.011: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue2:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:57.011: ../gst/gstpad.c:4677:gst_pad_push_data:<queue2:src> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:57.011: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<mux:video> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:57.011: ../gst/gstpad.c:4677:gst_pad_push_data:<video:proxypad0> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-WARNING **: 02:10:57.011: ../gst/gstpad.c:4416:gst_pad_chain_data_unchecked:<queue_video:sink> Got data flow before segment event

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:57.011: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:57.011: gst_segment_to_running_time_full: assertion 'segment->format == format' failed

(gst-launch-1.0:83752): GStreamer-CRITICAL **: 02:10:57.011: gst_segment_to_running_time_full: assertion 'segment->format == format' failed
/GstPipeline:pipeline0/GstSplitMuxSink:mux/GstQueue:queue_video: max-size-buffers = 19

What GStreamer version are you using ? The assertions indicate that you have a hit a gstreamer plugin bug, and that probably needs fixing before investigating futher.

Meanwhile, delayed linking failed is because you have hit some limitation of the debug tool, you may have to make your own app and handle the linking the way you want it.

Regarding the version, its 1.20.

I did go that route (writing my own application). It has proven to be a bit overwhelming. But it in the end I did manage (today) to have both a working splitinputmix and a tcpserversink, working together.

I posted this thread because, before getting tangled in dealing with gstreamer api, i tested the pipeline in the command line.

Makes sense, I think.