<div dir="auto">Using std::chrono to calculate the "real timestamp" seems to be good. But now I have another problem: after a bit of seconds where the stream seems well synchronised, it starts "loosing frames". The signal "data-needed" is requested more and more rarely, like if the pipeline cannot handle all the data.<div dir="auto"><br></div><div dir="auto">Can it be a "buffering problem" related to file writing?<br><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">-- <br>Walter Lucetti<br><br>email: <a href="mailto:myzhar@gmail.com" target="_blank">myzhar@gmail.com</a><br>web: <a href="http://www.robot-home.it" target="_blank">www.robot-home.it</a> - <a href="http://www.opencv.it" target="_blank">www.opencv.it</a><br>project:  <a href="http://myzharbot.robot-home.it" target="_blank">http://myzharbot.robot-home.it</a></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 05 Feb 2017 14:46, "Walter Lucetti" <<a href="mailto:myzhar@gmail.com" target="_blank">myzhar@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">What I did was printing out the timestamp for the buffer at each "push frame" event... and effectively the timestamps were wrong: at the end of a 10 seconds recording I got about 5 seconds of time stamp.<div dir="auto"><br></div><div dir="auto">What I noticed is that my source has not a stable fps, varying from 30 fps to 25 fps... </div><div dir="auto"><br></div><div dir="auto">I thought to use std::chrono to calculate the time elapsed from one push to the next and use the "real" timestamp setting do-timestamp to false.</div><div dir="auto"><br></div><div dir="auto">Is there a more clever way to do this?</div><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">-- <br>Walter Lucetti<br><br>email: <a href="mailto:myzhar@gmail.com" target="_blank">myzhar@gmail.com</a><br>web: <a href="http://www.robot-home.it" target="_blank">www.robot-home.it</a> - <a href="http://www.opencv.it" target="_blank">www.opencv.it</a><br>project:  <a href="http://myzharbot.robot-home.it" target="_blank">http://myzharbot.robot-home.it</a></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">Il 04 Feb 2017 20:43, "Arjen Veenhuizen" <<a href="mailto:arjen.veenhuizen@tno.nl" target="_blank">arjen.veenhuizen@tno.nl</a>> ha scritto:<br type="attribution"><blockquote class="m_81811725951475388quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Apparently, the timestamps are incorrect. What you could do is insert the<br>
identity element before the videorate element and examine the timestamps by<br>
setting silent=false on that element. Next step would be to examine the<br>
timestamps before the encoder and see where things go wrong.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/appsrc-timestamp-and-filesink-tp4681716p4681717.html" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.<wbr>n4.nabble.com/appsrc-timestamp<wbr>-and-filesink-tp4681716p468171<wbr>7.html</a><br>
<div class="m_81811725951475388elided-text">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesk<wbr>top.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-dev<wbr>el</a><br>
</div></blockquote></div><br></div>
</blockquote></div></div>