[Libav-user] Knowing the wait time between each frame display

Michael Albanese mja266 at nau.edu
Tue Jul 15 02:54:20 CEST 2014


I'm currently messing around with the ffmpeg API, more specifically, I've
been looking at ffmpeg's filtering_video.c example + the updated dranger
tutorial02.c which rapidly pushes decoded video frames to an SDL instance.

I'm trying to modify dranger's tutorial02 in order to playback frames at
the rate which they are meant to be played, I've tried the following:

- (Close, but too slow / fast) Getting the FPS, sleeping calculated_delay -
processing time
- (Too fast) Delaying the video as shown in the filtering_video.c example

I've been looking into how dranger was accomplishing it in tutorial05
<http://dranger.com/ffmpeg/tutorial05.html>, he appears to be using the pts
/ dts in order to calculate the delay, however the overridden
AVCodecContext get_buffer and release_buffer pointers seem to be
depreciated.

Since the up to date version of his tutorial05 found here
<https://github.com/chelyaev/ffmpeg-tutorial> does not synchronize properly
either (comparing against ffplay)... is anyone willing to point me in the
right direction (or write an up to date tutorial on playing back video +
audio at the correct rates).

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140714/5ae8ef3e/attachment.html>


More information about the Libav-user mailing list