<div dir="ltr">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.<div>
<br></div><div>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:</div><div><br></div><div>- (Close, but too slow / fast) Getting the FPS, sleeping calculated_delay - processing time</div>
<div>- (Too fast) Delaying the video as shown in the filtering_video.c example <br><div><br></div><div>I've been looking into how dranger was accomplishing it in <a href="http://dranger.com/ffmpeg/tutorial05.html">tutorial05</a>, 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.</div>
<div><br></div><div>Since the up to date version of his tutorial05 found <a href="https://github.com/chelyaev/ffmpeg-tutorial">here</a> 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).</div>
<div><br></div><div>Thanks! </div><div><br></div></div></div>