I was working on a video player of an app and I ran into a problem.
I need a video's playing cycle locked into a specified time interval. For instance, I need a video loop to play from 00:04
to 00:08
.
My dilemma is, the video only has keyframes at 00:00
and 00:10
, MediaPlayer.seekTo(4000)
will seek the start time to 00:10
which is not what I expected. I need the video to play at a precise time, 00:04
to 00:08
, not 00:00
to 00:10
.
FFPlay
also supports AVSEEK_FLAG
, but none of the flags seem to work in my case.
Maybe playing at 00:00
then fast-forward encoding to 00:04
is a good idea, but I have no idea how to implement that. My FFMPEG
experience is poor.
Any help would be greatly appreciated.