Slow seek in MKV videos with FFmpeg C/C++

Viewed 433

Seeking in any large MKV H.264 video works very slow.

Call of av_seek_frame() in my code using FFmpeg LibAV takes about 3-10 seconds to jump to a middle position in 1-2 hours video.

I tried all combinations of flags: AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE, AVSEEK_FLAG_ANY, AVSEEK_FLAG_FRAME

However VLC seeks very fast in same MVK videos.

Seeking in MP4 H.264 works instantly. The problem is only with MKV.

Latest FFmpeg 4.1.3.

0 Answers
Related