On Thu, Jun 17, 2010 at 4:59 AM, Luca Abeni <[email protected]> wrote:
> On 06/16/2010 06:17 PM, Walter P. Mondale wrote:
>>
>> When I pass a udp url to the output example the program plays
>> extremely fast and jams all the frames together.  Is there any way to
>> slow down the output for network traffic, or I do need to implement my
>> own timers to control the framerate?
>
> Look at what ffmpeg does when you specify the "-re" option (search for
> "rate_emu" in ffmpeg.c)
>
>
>                                Luca
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>

I tried implementing this using ffmpeg.c as an example, but I
periodically get 1 second delays between outputs with the following
code:

        t2 = av_gettime();
        while(t2 - t1 < (AV_TIME_BASE / STREAM_FRAME_RATE) )
        {
            usleep( (AV_TIME_BASE / STREAM_FRAME_RATE) - (t2 - t1) );
            t2 = av_gettime();
        }
        t1 = av_gettime();

t1 is set at the top of the loop, and this code block is at the very
end.  Any ideas?

Thanks.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to