Double rtspsrc, single mkv containter; plus multifilesrc and multifilesink

kim at aptget.dk kim at aptget.dk
Thu Apr 5 12:04:12 UTC 2018


Hullo all,

The task: record from two IP cameras via rtsp, and save them into a 
continuous stream of files, each lasting 5 minuets, and having each file 
containing two video streams; two different angles of the same area. 
Then I need another pipeline to 'glue' together any interval of 
recordings, still keeping the two streams in one container file.

The two feeds needs to be timed within as few frames as possible of each 
other, and there has to be no frame loss between the files, so as to not 
have any drop in quality in the finished product. For this reason, 
multifilesink/src seemed like the best option, as the splitmuxsink 
element has some frame-drop issues.

The pipeline for the first task is:

gst-launch-1.0 -ev \
	mpegtsmux name=mux \
	! multifilesink next-file=max-duration max-file-duration=300000000000 
post-messages=true location=/path/%05d.ts \
	rtspsrc location=IP.CAMERAS.ADDRESS.1 'ntp-sync=true 
protocols=GST_RTSP_LOWER_TRANS_TCP ntp-time-source=1' \
	! queue ! capsfilter caps='application/x-rtp,media=video' \
	! rtph264depay ! mux. \
	rtspsrc location=IP.CAMERAS.ADDRESS.2 'ntp-sync=true 
protocols=GST_RTSP_LOWER_TRANS_TCP ntp-time-source=1' \
	! queue ! capsfilter caps='application/x-rtp,media=video' \
	! rtph264depay ! mux.

Which works(though maybe not, given later problems, more on that in a 
bit..).

The second pipeline:

gst-launch-1.0 -ev \
	matroskamux name=mux \
	! filesink location=/path/to/onefile.mkv \
	multifilesrc location=/path/"%05d.ts" \
	! decodebin name=bin \
	bin.src_0 ! x264enc ! h264parse ! mux. \
	bin.src_1 ! x264enc ! h264parse ! mux.

Which works - sometimes. Sometimes, it stitches the clips together fine, 
and it looks like the streams are synchronous, without any frame-loss. 
Other times, it simply stalls out, the output looks frozen, and the file 
doesn't grow beyond a certain size. The produced file will then have 
maybe one or two seconds of video in it - no matter how long I leave it 
for.

The output it stalls out at is:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDecodeBin:bin/GstTypeFindElement:typefind.GstPad:src: 
caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstDecodeBin:bin/GstTSDemux:tsdemux0.GstPad:sink: 
caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0.GstPad:src_0: 
caps = video/x-h264, stream-format=(string)byte-stream, 
alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:bin/GstH264Parse:h264parse2.GstPad:sink: 
caps = video/x-h264, stream-format=(string)byte-stream, 
alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0.GstPad:src_1: 
caps = video/x-h264, stream-format=(string)byte-stream, 
alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:bin/GstH264Parse:h264parse3.GstPad:sink: 
caps = video/x-h264, stream-format=(string)byte-stream, 
alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0.GstMultiQueuePad:sink_0: 
caps = video/x-h264, stream-format=(string)byte-stream, 
alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0.GstMultiQueuePad:sink_1: 
caps = video/x-h264, stream-format=(string)byte-stream, 
alignment=(string)nal
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstH264Parse:h264parse3.GstPad:src: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/GstH264Parse:h264parse3.GstPad:src: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/avdec_h264:avdec_h264-0.GstPad:sink: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/GstCapsFilter:capsfilter1.GstPad:src: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/GstCapsFilter:capsfilter1.GstPad:sink: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/avdec_h264:avdec_h264-1.GstPad:sink: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/GstCapsFilter:capsfilter0.GstPad:src: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/GstCapsFilter:capsfilter0.GstPad:sink: 
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, 
pixel-aspect-ratio=(fraction)1/1, width=(int)3840, height=(int)2160, 
framerate=(fraction)0/1, interlace-mode=(string)progressive, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, 
level=(string)5.1, 
codec_data=(buffer)01640033ffe1001367640033ac34cc03c0043ec05a80808082f4e001000468ee3830
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/avdec_h264:avdec_h264-1.GstPad:src: 
caps = video/x-raw, format=(string)I420, width=(int)3840, 
height=(int)2160, interlace-mode=(string)progressive, 
multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, 
colorimetry=(string)bt709, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:bin/GstMultiQueue:multiqueue0: 
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:bin/avdec_h264:avdec_h264-0.GstPad:src: 
caps = video/x-raw, format=(string)I420, width=(int)3840, 
height=(int)2160, interlace-mode=(string)progressive, 
multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, 
colorimetry=(string)bt709, framerate=(fraction)0/1
Redistribute latency...
Redistribute latency...
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = 
video/x-raw, format=(string)I420, width=(int)3840, height=(int)2160, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, 
colorimetry=(string)bt709, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstX264Enc:x264enc1.GstPad:sink: caps = 
video/x-raw, format=(string)I420, width=(int)3840, height=(int)2160, 
interlace-mode=(string)progressive, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, 
colorimetry=(string)bt709, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstDecodeBin:bin.GstDecodePad:src_1.GstProxyPad:proxypad3: 
caps = video/x-raw, format=(string)I420, width=(int)3840, 
height=(int)2160, interlace-mode=(string)progressive, 
multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, 
colorimetry=(string)bt709, framerate=(fraction)0/1
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = 
video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = 
video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:video_0: 
caps = video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
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, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstX264Enc:x264enc1.GstPad:src: caps = 
video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:src: caps = 
video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:video_1: 
caps = video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, 
chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, 
bit-depth-chroma=(uint)8, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:sink: caps = 
video/x-h264, 
codec_data=(buffer)01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c, 
stream-format=(string)avc, alignment=(string)au, level=(string)5.1, 
profile=(string)high, width=(int)3840, height=(int)2160, 
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, 
interlace-mode=(string)progressive, colorimetry=(string)bt709, 
chroma-site=(string)mpeg2, multiview-mode=(string)mono, 
multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = 
video/x-matroska
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = 
video/x-matroska
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = 
video/x-matroska, streamheader=(buffer)< 
1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a490b0d8953ef7fdaafb472f29eb0a94af9e2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e30005741994753747265616d6572204d6174726f736b61206d7578657200446188078ee046a640b6001654ae6b01000000000000ecae010000000000006dd7810183810173c588a3305684d7155aeb536e86566964656f00e00100000000000008b0820f00ba8208708690565f4d504547342f49534f2f4156430063a2ad01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22cae010000000000006dd7810283810173c58898ec25a09fe7edb4536e86566964656f00e00100000000000008b0
820f00ba8208708690565f4d504547342f49534f2f4156430063a2ad01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c 
 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = 
video/x-matroska, streamheader=(buffer)< 
1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a490b0d8953ef7fdaafb472f29eb0a94af9e2ad7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31342e30005741994753747265616d6572204d6174726f736b61206d7578657200446188078ee046a640b6001654ae6b01000000000000ecae010000000000006dd7810183810173c588a3305684d7155aeb536e86566964656f00e00100000000000008b0820f00ba8208708690565f4d504547342f49534f2f4156430063a2ad01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22cae010000000000006dd7810283810173c58898ec25a09fe7edb4536e86566964656f00e00100000000000008b0
820f00ba8208708690565f4d504547342f49534f2f4156430063a2ad01640033ffe1001d67640033acd9403c0043ec05a808080a0000030002ee6b28001e30632c01000568ebecb22c 
 >^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
^C

Now, I can run the second pipeline as many times on the same recordings 
as I'd like, and the outcome will be the same. Alternately, on some 
recordings - everything goes fine, and the second pipeline runs smoothly 
through. Due to this, I think the problem is in the first pipeline, and 
in how the recordings are made in the first place..?

I know if I try to shove the rtspsrc recordings directly into a simple 
filesink to .mkv file, that time timestamp is wrong, and maybe this has 
something to do with my issue?

I've tried doing some experimentation, and if I substitute the rtspsrc 
with some two videotestsrc, it's never a problem to stitch the files 
together. Like so:

gst-launch-1.0 -ev \
     mpegtsmux name=mux \
     ! multifilesink next-file=max-duration 
max-file-duration=300000000000 post-messages=true location=/path/%05d.ts 
\
     videotestsrc ! "video/x-raw, width=(int)1280, height=(int)720, 
format=(string)I420" \
     ! x264enc ! mux. \
     videotestsrc pattern=11 ! "video/x-raw, width=(int)1280, 
height=(int)720, format=(string)I420" \
     ! x264enc! mux.

Further making me believe that the issue is with the rtspsrc, or 
something, however, I've really run out of ideas.

Any suggestions or insights are welcome, and I hope I've made myself 
clear.

Regards, Kim









More information about the gstreamer-devel mailing list