<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello again,
<div><br>
</div>
<div>I tried moving the queue2 before the tsdemux and that seems to have helped. Now what I am seeing is when I issue the seek command with a time 5 seconds prior to the current time it seems to jump to the data at the beginning of the ring buffer regardless
 of what time information I give in the seek command. Then it looks as if it is playing back the frames as fast as possible until it catches up to real-time instead of playing it at the proper rate. </div>
<div><br>
</div>
<div>I realized I forgot to mention that I am using GStreamer 1.6.1.</div>
<div><br>
</div>
<div>Thanks,<br>
Piyush<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF498066" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Agarwal, Piyush - 0446 - MITLL<br>
<b>Sent:</b> Tuesday, January 19, 2016 12:33 PM<br>
<b>To:</b> gstreamer-devel@lists.freedesktop.org<br>
<b>Subject:</b> Timeshifting using Queue2 for mpegts container with h264 encoded stream<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi All,
<div><br>
</div>
<div>Just had a question about how to use the queue2 in ring-buffer mode to support time shifting during playback of an h264 encoded mpegts stream. (Haven't found any thing on google or the mailing list that matches exactly what I am trying to achieve). </div>
<div><br>
</div>
<div>My pipeline is as follows:</div>
<div><br>
</div>
<div>udpsrc address=xxx.xxx.xxx.xxx port=xxxx ! tsdemux ! queue2 ring-buffer-max-size=10240000 ! h264parse ! capsfilter ! video/x-h264,stream-format=byte-stream ! avdec_h264 ! videoconvert ! autovideosink</div>
<div><br>
</div>
<div>The pipeline itself seems to be working, if I specify temp-template and temp-remove false I can see a file being written to up to the max-size I have specified. But I wasn't sure if I have the queue2 element at the right spot in the pipeline for it to
 keep all the information that is needed to allow seeking.</div>
<div><br>
</div>
<div>My goal is to be able to store the last 5-10 seconds of a stream and then seek to the beginning of that point and allow the user to play back from there. Unfortunately with the above if I try to seek nothing seems to change. If I query the pipeline for
 duration it always returns 00:00:00. I thought that the queue2 element with the ring-buffer property would allow me to do that.</div>
<div><br>
</div>
<div>Is the Queue2 element the right one to do what I am trying to do? If so any thoughts on what I might be doing wrong?</div>
<div><br>
</div>
<div>Otherwise I was thinking maybe I could somehow use the downloadbuffer element and keep overwriting the file for every 5-10 seconds and when user wants to timeshift it just loads the downloaded file, but that would be less ideal.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Piyush</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>