input-selector + multifilesrc with TS file

Marianna S. Buschle msb at qtec.com
Wed May 26 13:26:11 UTC 2021


I have the following pipeline:

videotestsrc1 -> h264enc -> tsmux ->
videotestsrc2 -> h264enc -> tsmux -> input selector -> demux -> decode ->
ximagesink
                 multifilesrc (mpegts file) ->

"videotestsrc is-live=true pattern=ball !
video/x-raw,framerate=30/1,format=NV12 ! timeoverlay ! "
"tee name=t1 ! queue ! videoconvert ! ximagesink sync=0 "
"t1. ! queue ! x264enc key-int-max=30 speed-preset=1 tune=zerolatency !
video/x-h264,profile=high ! mpegtsmux ! "
"input-selector sync-mode=1 sync-streams=1 cache-buffers=1 name=vselect !
tsdemux : identity sync=true ! h264parse ! avdec_h264 !
video/x-raw,framerate=30/1 ! videoconvert ! ximagesink sync=0 "
"videotestsrc is-live=true ! video/x-raw,framerate=30/1,format=NV12 !
timeoverlay ! "
"tee name=t2 ! queue ! videoconvert ! ximagesink sync=0 "
"t2. ! queue ! x264enc key-int-max=30 speed-preset=1 tune=zerolatency !
video/x-h264,profile=high ! mpegtsmux ! vselect. "
"multifilesrc loop=1 name=replay location=test.ts
caps=video/mpegts,framerate=30/1 ! vselect. "

And the test file:

"gst-launch-1.0 videotestsrc is-live=true pattern=ball num-buffers=300 ! "
"video/x-raw,framerate=30/1,format=NV12 ! timeoverlay ! x264enc "
"key-int-max=30 speed-preset=1 tune=zerolatency ! video/x-h264,profile=high
! "
"mpegtsmux ! filesink location=test.ts -v -e "

Now when I change the active pad of the input-selector between '0' and '1'
all works as expected, the change is "instantaneous" (though I get corrupted
frames until the next KF arrives)

When I change to '2' it also goes well.
However when I try to change back to '0' or '1' from '2' the change gets
delayed and only occurs when the file ends.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list