[Libav-user] Why does av_seek_frame() not seek to a keyframe?

Roger Pack rogerdpack2 at gmail.com
Thu Aug 2 20:19:29 CEST 2012


> $ ffmpeg -i sintel.mpg -vcodec copy -acodec copy -ss 90.0 starting_at_90.mpg
>
> then try and use it again:
>
> $ ffmpeg -i starting_at_90.mpg  -vframes 1 -f image2 -an snap.jpg
>
> I get this warning message:
> [mpeg2video @ 01f09860] warning: first frame is no keyframe
>
> Anybody know if this is expected? I almost don't think it is...

My only conjecture is that, today, running "ffmpeg -ss 90.0 -vcodec
copy" actually goes exactly to second 90.0, then inserts some "a few
non i-frames" and then an i-frame, and continues normally.  Then when
I use that file, it skips past the non-i-frames until it reaches its
first i-frame, and then continues on.

Except I get this warning message no matter what "-ss" time I specify
for my original cut (since this is from a DVD, I'd expect an i-frame
at least every second, but can never find *even a single one*), which
leaves me wondering what is actually occurring...
Thanks!
-roger-


More information about the Libav-user mailing list