<p dir="ltr">My strategy was to skip frames that are available before the next time_base interval and provide the PTS that works have been in effect as determined by elapsed_time / time_base as each available frame is encoded.  As I mentioned it doesn't seem to work for me.</p>

<p dir="ltr">One thing stands out, you're using a milliseconds multiplier, i.e. 33000. Maybe I've interpreted it incorrectly, but I understood the DTS and PTS to be sequence numbers, not actual time based values: so with a time_base of 25, a frame to be shown at 0.5 secs would have a PTS of 12, a frame to be shown at 2 secs has a PTS of 50, etc.  Where did you see use of the ms values that you're using?</p>

<p dir="ltr">Raymond</p>
<div class="gmail_quote">On May 14, 2014 10:55 PM, "Ken Bass" <<a href="mailto:daytooner@gmail.com">daytooner@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>To put it another way: must there be a one-to-one correspondence between the frame interval and the PTS? That is, if I initialize the stream for 30fps, must frame 0 have PTS 0, frame 1 have PTS 33000, frame 2 have PTS 66000?<br>

</div><div><br>What I would like to do is this:<br><br></div>I write out the first frame with PTS of 0. I write out the next frame with PTS of 50000 (50ms). The next with PTS of 90000 (90ms).<br><br></div><div>Will libav let me do this? And what happens with playback?<br>

</div><div><br></div><div class="gmail_extra">If need be, I can simply duplicate the last frame if a new one is not available at the expected interval. But, then, what if a new frame arrives in between intervals? Can I set its PTS the the actual PTS, or must it be adjusted up to the next interval?<br>

<br></div><div class="gmail_extra">Thanks for the response.<br><br></div><div class="gmail_extra">ken<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 14, 2014 at 4:38 PM, NITIN GOYAL <span dir="ltr"><<a href="mailto:nitinkumgoyal@gmail.com" target="_blank">nitinkumgoyal@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><br><div class="gmail_quote">On Wed, May 14, 2014 at 10:30 AM, Ken Bass <span dir="ltr"><<a href="mailto:daytooner@gmail.com" target="_blank">daytooner@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br></div>Question: can I simply write out each frame as I receive it, with an appropriate PTS? This would most likely skip expected frames. Also, the captured frame most likely wouldn't be written at the specified fps interval.<br>



<br></div></blockquote></div><br></div>I think I am not clear on your question but as per my understanding, For the raw frames, if you will get them in a proper manner of PT, ti will create less issues in encoding process. May be you can buffer some frames and then send it to encode the frames and thus there wont be any skipped frames.</div>


</div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">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></blockquote></div><br></div><div><div><div></div></div></div></div>
<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>
<br></blockquote></div>