help with clock synchronization on filesrc/multifilesrc

Marianna S. Buschle msb at qtec.com
Wed May 26 07:32:41 UTC 2021


I'm trying to play a MPEG-TS file (with H264 encoded video) like this:

"multifilesrc loop=1 location=/home/msb/test.ts
caps=video/mpegts,framerate=30/1 ! "
"tsdemux : h264parse ! avdec_h264 ! video/x-raw,framerate=30/1 !
videoconvert ! ximagesink sync=0"

However, instead of playing at 30fps, the video is playing as fast as it can
('sync=0').
If I change to 'sync=1' in the 'ximagesink' it plays as expected.

Unfortunately it is not an option for me to use 'sync=1', since my real
pipeline is a lot more complex and this is just a simple way to show the
issue.

I would like to be able to get the same behavior I get with a live source,
fx:

"videotestsrc is-live=true ! video/x-raw,framerate=30/1,format=NV12 !
timeoverlay ! videoconvert ! ximagesink sync=0 "

So far I can make it work if I add a fakesink with 'sync=1' to the pipeline,
but that looks a bit too much like a hack:

"multifilesrc loop=1 location=/home/msb/test.ts
caps=video/mpegts,framerate=30/1 ! "
"tsdemux : h264parse ! avdec_h264 ! video/x-raw,framerate=30/1 ! tee name=t
! queue ! videoconvert ! ximagesink sync=0 t. ! queue ! fakesink sync=1"

Isn't there a better way to make 'multifilesrc' or 'filesrc' behave like a
livesrc?



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


More information about the gstreamer-devel mailing list