i’m developing a video server in C on GNU/Linux, and i’m using ffmpeg to manage data of each video file. So, i open the file, get all the information about its container, then do the same with its codec and start reading frames one by one.
Unfortunately, ffmpeg and more precisely avcodec is not very well documented. I need to know when a frame is an I-Frame or a B-Frame to maintain a record, so how could i do it?
Thanks in advance.
The picture type is given by the
pict_typefield ofstruct AVFrame. You have 4 types defined in FFMPEG.pict_typeis set toFF_I_TYPEfor I Frames.For example, part of my debug code which give me a letter to set in a debug message :