[Libav-user] Accuracy of seek_frame (h264)
km at sportcaster.dk
Thu Oct 13 18:13:56 EEST 2016
I am currently having problems seeking to keyframe with good accuracy
(videos are h264). To calculate target time I currently use:
int seek_target = target_frame *
pFormatCtx->streams[videoStreamIndex]->time_base.num) / (float)
I would note that target_frame is being set to only be a keyframe. The
problem I have is that using this I frequently end up seeking to a keyframe
that is behind or ahead by 1. When working on a specific video I am able to
add an offset to the target_frame and get precise results for that specific
case but I need a solution that works on all the videos. What adjustments
would I need to make to get better accuracy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user