<br><br><div class="gmail_quote">On Sun, Jan 29, 2012 at 2:47 PM, Stefan Sauer <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<u></u><div bgcolor="#ffffff" text="#000000"><div class="im">On 01/26/2012 10:50 AM, Bruno Gonzalez wrote:<blockquote type="cite">I expect I cannot get duration, since the RTSP source can sometimes be live video (unknown duration).</blockquote>

</div>Yes, that can be the case.<div class="im"><br><blockquote type="cite"><div>However, when I try to get the position, using a Query on my rtspsrc element of the pipeline, I always get &quot;-1&quot; as result. I&#39;ve tried using a position query with bytes, buffers, time, percentage and everything, but none returns a usable value.</div>

</blockquote></div>Well invetigate the code and figure out why you get a -1. In most cases reporting a position should be possible. Trying the different formats is less useful as e.g. percent is calculated from pos and duration.<div class="im">

<br><blockquote type="cite"><div><br></div><div>Furthermore, the rtspsrc clock is not usable either, since it&#39;s just a counter of time passed on the client side. So when playing at 2x, it doesn&#39;t match the server time, nor does it account for jitter.</div>

<div><br></div><div>What can be influencing the queries to return -1? Am I doing something wrong?</div></blockquote></div>Dump a pipeline graph of you pipeline to see which element are used and check their query implementations to see why they don&#39;t answer the position query.</div>

</blockquote><div>I was trying to query the element which is closest to the origin of data, which is rtspsrc in my client pipeline.</div><div>However if I try to query the whole pipeline, all queries work.</div><div><br>
</div>
<div>My only problem is that, the reported time, is the timestamp on the client side, and not the exact timestamps of the original video source.</div><div><br></div><div>For example, if playing fastfoward or fastreverse (&quot;scale&quot; != 1 on the rtsp element, in the server pipeline), the reported times are not what they should. E.g.: after 10 seconds of playing at 2x, the reported time is 10 seconds instead of 20 seconds.</div>

<div><br></div><div>Is there any way to get the actual time in the client side?</div><div><br></div><div>Thanks for any hints.</div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div bgcolor="#ffffff" text="#000000"><span class="HOEnZb"><font color="#888888"><br><br>Stefan</font></span><div><div class="h5"><br><blockquote type="cite"><div><br></div><div>The code I&#39;m using looks like this (using gstreamer-sharp):</div>

<br>Element rtspsrc = m_pipeline.GetByName(&quot;rtspsrc&quot;);<br>Query query = Query.NewPosition(Gst.Format.Time);<br>rtspsrc.Query(query);<br>long value;<br>Gst.Format format;<br>query.ParsePosition(out format, out value);<br>

writeTrace(&quot;Query results: &quot; + format + &quot;, &quot; + value);<div><br>Is that correct?</div><div><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 10:07, Stefan Sauer <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff" text="#000000">

<div>On 01/24/2012 05:24 PM, Bruno Gonzalez wrote:<blockquote type="cite">Thanks for the input.<br><br>Unfortunately, I still don&#39;t have any hints as to how to get the play time in the original source file.<br></blockquote>

<br></div>Use queries to get the duration and current playback position<font color="#888888"><br><br>Stefan.</font><div><div><br><blockquote type="cite"><br>Doing back-of-the-envelope calculations on the client is not an option, I need the actual playing time, with a precision of cents of second.<div>

<font color="#222222" face="arial,
                        sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Any idea?<br></font><br><div class="gmail_quote">On Tue, Jan 24, 2012 at 16:08, Stefan Sauer <span dir="ltr">&lt;<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff" text="#000000">

<div>On 01/24/2012 03:49 PM, Bruno Gonzalez wrote:<blockquote type="cite">Hi,<br><br>I have a server-client video streaming using gstreamer and RTP. So basically:<br>[source storage] --&gt; [server] ---------&gt; [client] --&gt; [frames rendered<br>

on screen]<br><br>Is there any way to know, for each rendered frame, what was the<br>original playing time in the video source of the server?<br><br>For example.<br> - At 10 fps, after 30 seconds of playing, the &quot;playing time&quot; would be<br>

300.0 seconds.<br> - But if the network is slow, the playing time could very well be<br>only 276.4 seconds.<br> - Or maybe some frames could be lost if using UDP.<br> - Also, if the source storage has variable framerate, I cannot use<br>

&quot;10fps&quot; or any other average fps for any calculations.<br></blockquote><br></div>video is synchronized to the clock. That is after 30 sec of playing time the video is more or less at 30s. If the network is slow, it is likely that some frames have been skipped.<br>

<br>Stefan<br><br><blockquote type="cite"><div><br>How could this be achieved?<br><br>Thanks!<br clear="all"><div><br></div>-- <br>Saludos,<br>     Bruno González<br><br>_______________________________________________<br>

Jabber: stenyak AT <a href="http://gmail.com/" target="_blank">gmail.com</a><br><a href="http://www.stenyak.com/" target="_blank">http://www.stenyak.com</a><br></div><pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre></blockquote><br></div><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>

<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>

Saludos,<br>     Bruno González<br><br>_______________________________________________<br>Jabber: stenyak AT <a href="http://gmail.com/" target="_blank">gmail.com</a><br><a href="http://www.stenyak.com/" target="_blank">http://www.stenyak.com</a><br>

</div><pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre></blockquote><br></div></div></div><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>

<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>

Saludos,<br>     Bruno González<br><br>_______________________________________________<br>Jabber: stenyak AT <a href="http://gmail.com/" target="_blank">gmail.com</a><br><a href="http://www.stenyak.com/" target="_blank">http://www.stenyak.com</a><br>

</div><pre><fieldset></fieldset>
_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre></blockquote><br></div></div></div><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>

<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><br></blockquote></div>