<font color='black' size='2' face='arial'>Li,
<div><br>
</div>

<div>This is typical for any streaming application. The server is sending packets at rate Rs ffmpeg is playing at Rf. For streaming content these rates will only be equal if the sender and receiver are using the same clock source.  Apparently Rf  > Rs, so you keep running out of packets.  I don't know of any simple solution for this.</div>

<div><br>
</div>

<div>-Felix<br>
<br>
<br>

<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Zuwei Li <zuwei@imrsv.com><br>
To: libav-user <libav-user@ffmpeg.org><br>
Sent: Tue, Oct 8, 2013 9:28 pm<br>
Subject: [Libav-user] Fwd: Problems with RTMP streams on FFMpeg<br>
<br>




<div id="AOLMsgPart_2_4e02b8cf-59c3-45f3-a985-135f93e9b836">

<div dir="ltr">I am using FFMpeg to receive RTMP streams. It decodes and plays the RTMP stream correctly but I have problems playing the video for long periods of time.<br>

<div class="gmail_quote">
<div dir="ltr">
<div><br>
</div>


<div>It seems that </div>

<div><br>
</div>


<div>av_read_frame(format_context, &packet);</div>

<div><br>
</div>

<div>returns an AVERROR_EOF after playing for a period in time say 7 or 8 mins, this occurs randomly, when that happens I presume that the stream has ended so my playback stops.</div>



<div>However, the playback hasn't reached the actual video duration.</div>

<div><br>
</div>

<div>My question is if this behaviour is characteristic of RTMP streams, if so is there a way to properly stream RTMP reliably so the playback can continue for long periods using FFMpeg<span class="HOEnZb"><font color="#888888"><br clear="all">


<div><br>
</div>
-- <br>

<div dir="ltr"><font color="#000000">Li Zuwei<br>
</font><br>

</div>

</font></span></div>
</div>

</div>
<br>

</div>


</div>



<div id="AOLMsgPart_3_4e02b8cf-59c3-45f3-a985-135f93e9b836" style="margin: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;color: #000;background-color: #fff;">

<pre style="font-size: 9pt;"><tt>_______________________________________________
Libav-user mailing list
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</tt></pre>
</div>
 <!-- end of AOLMsgPart_3_4e02b8cf-59c3-45f3-a985-135f93e9b836 -->



</div>
</div>
</font>