How to play video at exact seek time?
<p>I was working on a video player of an app and I ran into a problem.</p>

<p>I need a video's playing cycle locked into a specified time interval. For instance, I need a video loop to play from <code>00:04</code> to <code>00:08</code>.</p>

<p>My dilemma is, the video only has keyframes at <code>00:00</code> and <code>00:10</code>, <code>MediaPlayer.seekTo(4000)</code> will seek the start time to <code>00:10</code> which is not  what I expected. I need the video to play at a precise time, <code>00:04</code> to <code>00:08</code>, not <code>00:00</code> to <code>00:10</code>.</p>

<p><code>FFPlay</code> also supports <code>AVSEEK_FLAG</code>, but none of the flags seem to work in my case.</p>

<p>Maybe playing at <code>00:00</code> then fast-forward encoding to <code>00:04</code> is a good idea, but I have no idea how to implement that. My <code>FFMPEG</code> experience is poor. </p>

<p>Any help would be greatly appreciated.</p>