I expect I cannot get duration, since the RTSP source can sometimes be live video (unknown duration).<div>However, when I try to get the position, using a Query on my rtspsrc element of the pipeline, I always get "-1" as result. I've tried using a position query with bytes, buffers, time, percentage and everything, but none returns a usable value.</div>
<div><br></div><div>Furthermore, the rtspsrc clock is not usable either, since it's just a counter of time passed on the client side. So when playing at 2x, it doesn'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><div><br></div><div>The code I'm using looks like this (using gstreamer-sharp):</div><br>Element rtspsrc = m_pipeline.GetByName("rtspsrc");<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("Query results: " + format + ", " + 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"><<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000"><div>
On 01/24/2012 05:24 PM, Bruno Gonzalez wrote:
<blockquote type="cite"><span>Thanks for the
input.</span><br>
<br>
<span>Unfortunately, I still
don't have any hints as to how to get the play </span><span>time in the original source
file.</span><br>
</blockquote>
<br></div>
Use queries to get the duration and current playback position<span><font color="#888888"><br>
<br>
Stefan.</font></span><div><div><br>
<blockquote type="cite">
<br>
<span>Doing back-of-the-envelope
calculations on the client is not an </span><span>option, I need the actual
playing time, with a precision of cents of </span><span>second.</span>
<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"><<a href="mailto:ensonic@hora-obscura.de" target="_blank">ensonic@hora-obscura.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid 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"><span>Hi,</span><br>
<br>
<span>I have a server-client video streaming using
gstreamer and RTP. So basically:</span><br>
<span>[source storage] --> [server] --------->
[client] --> [frames rendered</span><br>
<span>on screen]</span><br>
<br>
<span>Is there any way to know, for each rendered
frame, what was the</span><br>
<span>original playing time in the video source of the
server?</span><br>
<br>
<span>For example.</span><br>
<span> - At 10 fps, after 30 seconds of playing, the
"playing time" would be</span><br>
<span>300.0 seconds.</span><br>
<span> - But if the network is slow, the playing time
could very well be</span><br>
<span>only 276.4 seconds.</span><br>
<span> - Or maybe some frames could be lost if using
UDP.</span><br>
<span> - Also, if the source storage has variable
framerate, I cannot use</span><br>
<span>"10fps" or any other average fps for any
calculations.</span><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>
<span>How could this be achieved?</span><br>
<br>
<span>Thanks!</span><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>