<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Massimo,<div><br></div><div>I'm using PTS values and 1 second timer and have no problems at all. </div><div><br></div><div>Also it's possible to sleep in thread by (cur_pts - prev_pts) value to get the most accurate timing, but of course it consumes more CPU.</div><div><br></div><div>But these methods works only for streams where packets ordered by PTS. If it's not a truth, you should respect format's order and use, for example, DTS if it's suitable or reorder packets by PTS. </div><div><br></div><div>Also when using duration value I didn't get accurate timing for most streams.</div><div><br><div><div>19.07.2013, в 20:02, Massimo Battistel написал(а):</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div><div>Hello,<br></div>I have a similar problem. I need to stream some videos through udp/mpegts. Without flow control memory grows continuously.<br></div>I solved comparing stream time with absolute time a making some Sleep(...) to slow down packet sending.<br>
<br></div>I would like to know if a more elegant solution is available.<br><br></div>thanks<br><br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/19 Oleg <span dir="ltr"><<a href="mailto:mybrokenbeat@gmail.com" target="_blank">mybrokenbeat@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Player should use PTS value anyway for correct and smooth playback. Are you sure that you're filling PTS correct?<br>

19.07.2013, в 19:20, Gyula Hatalyák написал(а):<br>
<div><div class="h5"><br>
> Hi,<br>
><br>
> I am streaming out packets with RTMP output format to Wowza media server.<br>
> I have a packet buffer as the input of the RTMP muxer.<br>
> I can send the packets faster than their duration - by av_interleaved_write_frame calls.<br>
> I send all the packets in the buffer until it is empty, and then wait for new packets to come.<br>
> The problem is:<br>
> During playback from Wowza the frames are displayed in the same timing as they were sent with av_interleaved_write_frame calls resulting fast playback and pause/still until the next bunch of packets.<br>
><br>
> With command line ffmpeg I can use "-re" option to make the flow real-time.<br>
> Is there a lib counterpart of this option?<br>
> Or must I implement manually this "real-time" option?<br>
> Why aren't PTS/DTS used by muxer/wowza/player?<br>
><br>
> Thanks for any help in advance.<br>
> Gyula<br>
</div></div>> _______________________________________________<br>
> Libav-user mailing list<br>
> <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
> <a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Massimo Battistel.
</div>
_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>http://ffmpeg.org/mailman/listinfo/libav-user<br></blockquote></div><br></div></body></html>