just compare pts to current timestamp, then invoke usleep. see ffmpeg.c:<br><br>        if (rate_emu) {<br>            int64_t pts = av_rescale(ist->pts, 1000000, AV_TIME_BASE);<br>            int64_t now = av_gettime() - ist->start;<br>
            if (pts > now)<br>                usleep(pts - now);<br>        }<br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 6:37 AM, Isaac Wang <span dir="ltr"><<a href="mailto:isaac.wang@visorcorp.com">isaac.wang@visorcorp.com</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;">Hello,<br>
I'm trying to stream a UDP video stream in its native frame rate using the ffmpeg libraries, but am having difficulty in doing so.  Right now, I can display the stream but at first the stream is displayed very quickly (aka a higher frame rate than the native one) until eventually it displays the video in a stuttering manner.  I read that if you pass "-re" to ffmpeg via the command line, ffmpeg will be able to detect the native frame rate and display the video with that rate, but I can't find any documentation detailing how to do this using the C libraries.  Any help would be tremendously appreciated!<br>

______________________________<u></u>_________________<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/<u></u>listinfo/libav-user</a><br>
</blockquote></div><br>