Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How can I extract I-frame from a video?

Asked by maria aa

maria aa (view profile)

on 4 Jan 2013

I want to choose I-frame from a video then I want to do something in it(I want to embed a watermark in it).How can I choose I-fram?

0 Comments

maria aa

maria aa (view profile)

Products

No products are associated with this question.

2 Answers

Answer by Image Analyst

Image Analyst (view profile)

on 4 Jan 2013

You can use VideoReader() and read(). There are examples in the help.

5 Comments

Walter Roberson

Walter Roberson (view profile)

on 9 Jan 2013

Maria did consistently use "I-frame", never "iFrame", and so is referring to Intra-Coded frames

Maria, once a frame has been decoded by VideoReader, it is not possible to tell which kind of frame it was encoded as. The only way to tell is to go into the encoding file itself.

Image Analyst

Image Analyst (view profile)

on 10 Jan 2013

Sorry, I'm not familiar with video compression schemes in general. I just use the videos and depend on someone else's code to make them or recall them. I don't do research into compression or steganography. I'd probably just read in the video, encode the hidden watermark into some frames, and then write back out, but that probably wouldn't guarantee the watermark would be on the least-encrypted "I-frames". If she's doing research into it she probably knows more about it than me. All I can suggest is to look at the published literature here VisionBib, particularly these sections:

23.3.11 Watermarks in Video and Multi-Media, Other Data
    23.3.11.1 Video Data Hiding, Data Hiding in Video, Video Steganography 
maria aa

maria aa (view profile)

on 23 Jan 2013

Thanks for your answer.

Image Analyst

Image Analyst (view profile)

Answer by Walter Roberson

Walter Roberson (view profile)

on 4 Jan 2013

It is a bunch of work, and usually of no value. See http://www.mathworks.co.uk/matlabcentral/answers/10402-i-frames-from-a-video-file

3 Comments

maria aa

maria aa (view profile)

on 4 Jan 2013

so I cant find the code in Matlab!

Thanks

Walter Roberson

Walter Roberson (view profile)

on 4 Jan 2013

You just might be able to find an mpeg-4 decoder written in MATLAB itself, but for efficiency reasons most people would just use a C/C++ based decoder.

maria aa

maria aa (view profile)

on 23 Jan 2013

Thanks for your answer.

Walter Roberson

Walter Roberson (view profile)

Contact us