On Mon, Jul 23, 2012 at 7:12 PM, Carl Eugen Hoyos <[email protected]> wrote:

> Michael Bradshaw <mbradshaw@...> writes:
>
> > Anyone have any answers on these two things? If the answer to the
> > above would be "yes" can anyone else verify that "ffmpeg -dump
> > -loglevel debug -ss 38 -i 704x480-m2v-ac3.mpg -vframes 1 out.jpg" does
> > not seek to a keyframe?
>
> As said, afaict it does seek to a keyframe.
> (But I may of course be wrong.)
>
>
I am quite sure neither MPEG-PS nor MPEG-TS has the ability to seek to a
keyframe. Its been a problem for me for a while and i've been over this
code many times.
All they do is a binary search for the timestamp, and when they arrive
close enough, they are done.

To compensate for this, decoders like MPEG-2 will simply discard frames
until they see a keyframe to start decoding from, so visual corruption is
avoided.
If you run those codecs with AVCodeContext.flags2 set to
CODEC_FLAG2_SHOW_ALL, you'll probably get plenty of corrupted frames before
a real frame is shown, however i do not know how to do that via ffmpeg
commandline to demonstrate.
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to