Hello,
based on some chunks of code from internet I did following. This gives me
the best acurancy:
// tsms- time in milliseconds
int64_t frame = av_rescale(tsms, video_stream->time_base.den,
video_stream->time_base.num);
frame /= 1000;
if (avformat_seek_file(format_context, video_stream_id,
I saw many threads about seeking in video files with FFMPEG. But still it
is not clear for me how to seek to specific location (in milliseconds) with
good accuracy. I know that to seek in video file it is needed to seek than
decode frames and check where we are, than seek again decode frames etc.
t