<div class="gmail_quote">On Thu, Aug 2, 2012 at 12:10 PM, Roger Pack <span dir="ltr"><<a href="mailto:rogerdpack2@gmail.com" target="_blank">rogerdpack2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Could you provide a sample that does not seek to a keyframe with<br>
> ffmpeg -ss x -i input out.png<br>
> (I tested this yesterday on random mpeg2video samples and afaict,<br>
> it did work.)<br>
<br>
With me, I get this:<br>
<br>
with this file: <a href="http://rogerdpack.t28.net/incoming/sintel.mpg" target="_blank">http://rogerdpack.t28.net/incoming/sintel.mpg</a><br>
<br>
$ ffmpeg -i sintel.mpg -vcodec copy -acodec copy -ss 90.0 starting_at_90.mpg<br>
<br>
then try and use it again:<br>
<br>
$ ffmpeg -i starting_at_90.mpg  -vframes 1 -f image2 -an snap.jpg<br>
<br>
I get this warning message:<br>
[mpeg2video @ 01f09860] warning: first frame is no keyframe<br>
<br>
Anybody know if this is expected? I almost don't think it is...</blockquote><div><br></div><div>I could be wrong on my understanding, so someone please correct me if I am...</div><div><br></div><div>I believe that does no seeking there. Putting -ss after the input will cause ffmpeg to demux up to the requested timestamp, so it's not quite related to seeking (putting -ss before the input will seek the input file).</div>
<div><br></div><div>Since -a/vcoded copy avoids re-encoding, it just copies the packets (without regard to keyframes, iiuc). The packet closest to 90 seconds probably isn't a keyframe, but since that's where you requested the start it ffmpeg starts copying packets from there anyway.</div>
<div><br></div><div>Maybe there should be the ability to set a start time and copy packets, starting with the closest keyframe packet to the requested time...</div><div><br></div><div>--Michael</div></div>