<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 9/20/2011 10:51 PM, Marlon Yao wrote:
    <blockquote
cite="mid:CAMeYFw14a6yo3Z27RsRpyWXEb0AcTodP83duNOM5BstPzf4Nww@mail.gmail.com"
      type="cite">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 moz-do-not-send="true"
            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>
          _______________________________________________<br>
          Libav-user mailing list<br>
          <a moz-do-not-send="true" href="mailto:Libav-user@ffmpeg.org"
            target="_blank">Libav-user@ffmpeg.org</a><br>
          <a moz-do-not-send="true"
            href="http://ffmpeg.org/mailman/listinfo/libav-user"
            target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Libav-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a class="moz-txt-link-freetext" href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
    </blockquote>
    Where do I get the PTS from if I'm not using  a AVInputStream
    object?  I've followed the tutorial on dranger.com but the PTS that
    I calculate from the method listed on that site is much too big.<br>
  </body>
</html>