MATLAB Answers


Problems reading video with mmreader

Asked by Georg Clauss on 19 Sep 2013

I want to load a video and work on the single frames. When I read the video it displays "unable to determine the number of frames in this file". I need only the first part of the video using the following code

obj = mmreader('videoname.avi');
for n=1:500
    mov(n).cdata =;

now I try to access the single frames in the video and display them with

img1 = mov(1).cdata

but every image in mov shows exactly the same (always the first image of the video)

My Questions:

1. Why is Matlab not able to determine the number of frames? Is there a way to work around this problem?

2. Why are always the same images (first image from video file) stored in mov? Is sthat a problem of the read function?

... I use Matlab 7.1, so can't use the VideoReader ... this is a very simplified example, but doesn't really work


Log in to comment.

0 Answers

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today