MATLAB Answers

avi king

I frames from a video file

Asked by avi king
on 28 Jun 2011

Hello every one, I am trying to find all the i-frames from any video file. Are there any possibilities of finding it on Matlab or outside of matlab. Please suggest me.



No products are associated with this question.

2 Answers

Answer by Walter Roberson
on 28 Jun 2011
 Accepted answer

In order to do it in MATLAB you would have to open the video file as a binary file, and decode the binary file format.

In MATLAB, once you have read in a video file using aviread() or VideoReader or the like, the information about which frames were I frames is not retrievable from the decoded stream. There is no fixed rule for which frames must be I frames (other than the first and last frame): any other kinds of frames are only optimizations to reduce bandwidth requirements.

You might be able to find C or C++ source code for reading these kinds of files, and you could then adapt that source to tell you which frames were of which variety. I do not recall having seen any MATLAB source code for reading these kinds of files, but it is not something I have looked for.

If you have a moment, I would appreciate a brief explanation of why you want the I frames? We have had this question before (about extracting the I frames), but people have not explained what they intend to do with the information; about the only answer we've had has been the impression that "I dunno: it is a course assignment."


Answer by avi king
on 28 Jun 2011

I am working on steganography. If i can get I-frames from a video file, I can atleast have some progress in my work


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!