[Libav-user] Extracting I-Frame intra-prediction modes

Rouhi Amirhossein2 amir.rouhi at rmit.edu.au
Tue Jun 26 11:21:49 CEST 2012


Hi Misha
Thanks for prompt reply. That would be a very useful code for extracting
key frame images. but actually need to extract the intra-prediction modes
in each key frame of an input video stream. Can you help me to achieve
this? the input of the program would be an h264 raw video file and the
output would be a text file that stores intra-prediction modes with related
MB address and i-frame id.


On 26 June 2012 19:12, Misha Penkov <misha.penkov at gmail.com> wrote:

> On 26 June 2012 18:05, Rouhi Amirhossein2 <amir.rouhi at rmit.edu.au> 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
> > Libav-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/libav-user
> >
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>



-- 
Amir H. Rouhi
PhD Student/ CSIT RMIT University
Room: 14-09-04
http://raws.adc.rmit.edu.au/~s3288736/blog2/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120626/e76833f6/attachment.html>


More information about the Libav-user mailing list