kadu
kadu

Reputation: 513

Read video using VideoReader function in Matlab?

I want to read a video from a folder and extract the frames from it.I used VidoeReader function.But it gives error.My code is shown below along with the error.

 mov=VideoReader('11.mp4');
 vidFrames=read(mov);
 nFrames=mov.NumberOfFrames;
 for i=1:nFrames
     imshow(vidFrames(:,:,i),[]);
 end

and the error show is as given below

Error using VideoReader/init The file does not appear to have any video data.

Error in VideoReader (line 147) obj.init(fileName);

Error in video (line 7) mov=VideoReader('11.mp4');

Upvotes: 0

Views: 1449

Answers (1)

CuriousCoder
CuriousCoder

Reputation: 491

I think this is a MATLAB version related problem. I faced the same problem when I was using MATLAB 2013a. However, when I changed to MATLAB 2014b the problem just disappeared.

Upvotes: 1

Related Questions