<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>I can't say anything on the sync and NTP stuff, but I have
"simulated" cameras using files.<br>
I haven't tried to stream those, only feed to other pipelines.<br>
</p>
<p>On my experience the key to proper playback speed is the 'sync'
property.<br>
Generally if you are using a sink with 'sync=true', the 'filesrc'
should produce frames at the proper rate.</p>
<p><br>
</p>
<p><code>filesrc name=replay location=/home/msb/test.ts ! decodebin
! videoconvert ! ximagesink sync=0</code></p>
<p>Produces frames as fast as possible<br>
</p>
<p><code>filesrc name=replay location=/home/msb/test.ts ! decodebin
! videoconvert ! ximagesink sync=1</code></p>
<p>Produces frames with the proper timing<br>
</p>
<p><br>
</p>
<p>Using an '<code>identity sync=true</code>' or '<code>clocksync</code>'
have the same effect</p>
<p><code>filesrc location=/home/msb/test.ts ! decodebin ! identity
sync=true ! videoconvert ! ximagesink sync=0</code><br>
<code><code>filesrc location=/home/msb/test.ts ! decodebin !
clocksync ! videoconvert ! ximagesink sync=0</code></code></p>
<p>Both should produce frames at the correct rate</p>
<p><br>
</p>
<p>However, note that it only works when the data is demuxed (needs
to be placed after the 'tsdemux' in my case)<br>
</p>
<pre class="code highlight" lang="plaintext"><span class="line" id="LC1" lang="plaintext"><code>filesrc</code> location=/home/msb/test.ts ! </span><span class="line" id="LC2" lang="plaintext">tsdemux : identity sync=true ! h264parse ! avdec_h264 ! video/x-raw,framerate=30/1 ! videoconvert ! ximagesink sync=0
</span><span class="line" id="LC1" lang="plaintext"><code>
filesrc</code> location=/home/msb/test.ts ! </span><span class="line" id="LC2" lang="plaintext">tsdemux : identity sync=true ! fakesink sync=0</span>
</pre>
<p><br>
</p>
<p>Best Regards</p>
<p>Marianna<br>
</p>
<div class="moz-cite-prefix">On 08.03.2023 17.39,
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel-request@lists.freedesktop.org">gstreamer-devel-request@lists.freedesktop.org</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:mailman.7559.1678293586.924.gstreamer-devel@lists.freedesktop.org">
<pre class="moz-quote-pre" wrap="">Thank you Andrew!
I do wonder though if this will do the trick, it is quite similar to
what we are trying today.
What we need is the content of the two files we stream to line up as
if they where watching the same thing live.
So the first video frame from the first file should align, as well as
possible, and be synced with the first frame from the second file and
keep that sync wthout drift.
There is no `is-live` property on a filesrc as far as I know, so it is
a bit tricky for us how to do this ...
... we need to throttle the sending of file content I guess?
... and we need someway to make sure that the content of the files
line up and is synced, and that sync is kept.
If we "just" make sure the pipeline is synced to NTP clock and the RTP
bin uses capture time, is that really enough?
What happens when the files are read and sent with a slight difference
in time? How to we correlate the capture times?
Do I make sense? I hardly do to myself <span class="moz-smiley-s1" title=":)"><span>:)</span></span>
All the best
Jonas
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”</pre>
</body>
</html>