<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 26 mai 2021 04 h 45, Marianna S. Buschle via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to play a MPEG-TS file (with H264 encoded video) like this:<br>
<br>
"multifilesrc loop=1 location=/home/msb/test.ts<br>
caps=video/mpegts,framerate=30/1 ! "<br>
"tsdemux : h264parse ! avdec_h264 ! video/x-raw,framerate=30/1 !<br>
videoconvert ! ximagesink sync=0"<br>
<br>
However, instead of playing at 30fps, the video is playing as fast as it can<br>
('sync=0').<br>
If I change to 'sync=1' in the 'ximagesink' it plays as expected.<br>
<br>
Unfortunately it is not an option for me to use 'sync=1', since my real<br>
pipeline is a lot more complex and this is just a simple way to show the<br>
issue.<br>
<br>
I would like to be able to get the same behavior I get with a live source,<br>
fx:<br>
<br>
"videotestsrc is-live=true ! video/x-raw,framerate=30/1,format=NV12 !<br>
timeoverlay ! videoconvert ! ximagesink sync=0 "<br>
<br>
So far I can make it work if I add a fakesink with 'sync=1' to the pipeline,<br>
but that looks a bit too much like a hack:<br>
<br>
"multifilesrc loop=1 location=/home/msb/test.ts<br>
caps=video/mpegts,framerate=30/1 ! "<br>
"tsdemux : h264parse ! avdec_h264 ! video/x-raw,framerate=30/1 ! tee name=t<br>
! queue ! videoconvert ! ximagesink sync=0 t. ! queue ! fakesink sync=1"<br>
<br>
Isn't there a better way to make 'multifilesrc' or 'filesrc' behave like a<br>
livesrc?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You can use mpegtsparse, there is parameters you have to set (smoothing delays and add-timestamp, something near that) and the use identity sync=1</div><div dir="auto"><br></div><div dir="auto">multifilesrc ! mpegtsparse add-timestamps=1 smooth... ! identity sync=1 ! ....</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>