On 26 June 2012 18:05, Rouhi Amirhossein2 <[email protected]> wrote: > > Hi > 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: https://github.com/mpenkov/sandpit/blob/master/ffmpeg/keyframes.c Provided that you're using MP4 as the container, you can confirm that the keyframes extracted are indeed I-frames by using the mp4videoinfo utility (http://mpeg4ip.sourceforge.net/documentation/index.php). > Thanks for your expert advice. > Amir > > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
