[Libav-user] rtp h264 stream too fast

Alex Cohn alexcohn at netvision.net.il
Mon Nov 14 15:13:29 CET 2011


> 2) The duration of the file is 52.6 sec (526 total frames @ 10 fps),  in the
> above ffmpeg command the -re option forces ffmpeg to read the file in native
> frame rate at 10fps. How can i do this from my source code ? Should i
> implemented and how ? Is there any value to set in any libav structure ?
> thanks in advance
>
> andreasP

To the best of my knowledge you can get the pts values for decoded
frames, or you can estimate them from frame number and the expected
FPS (in your case, you don't have to worry about variable frame rate
and other exotics). From this pts you determine how long to sleep
between calls to decode_video or render.

Good luck,
Alex


More information about the Libav-user mailing list