[Libav-user] Extracting I-Frame intra-prediction modes
misha.penkov at gmail.com
Tue Jun 26 11:12:18 CEST 2012
On 26 June 2012 18:05, Rouhi Amirhossein2 <amir.rouhi at rmit.edu.au> wrote:
> You know that in h264, a methos is used for compression which is called
> intra prediction method. totally we have 9 intra prediction modes which
> showing different direction of top and left side pixels of 4x4 blocks. I
> want to extract such modes in any frame that uses intra prediction such as
> I-Frames and IDR,s. Do you know how can i achive this purpose?
> In JM software i did the same in decoder, do you think it should be done in
> FFplay as a decoder or it can be done by FFmpeg?
AFAIK, H.264 I-frames and keyframes are the same thing. Once you have
an AVFrame, you can check its key_frame member. It will be non-zero
if it's a keyframe (I-frame).
For full code, have a look here:
Provided that you're using MP4 as the container, you can confirm that
the keyframes extracted are indeed I-frames by using the mp4videoinfo
> Thanks for your expert advice.
> Libav-user mailing list
> Libav-user at ffmpeg.org
More information about the Libav-user