why i am getting error in mmreader function?

when i write the following piece of code i am getting error.
clc
obj=mmreader('wildlife.wmv')
vedio=read(obj)
??? Error using ==> mmreader.mmreader>getFullPathName at 103 The filename specified was not found in the MATLAB path.
Error in ==> mmreader.mmreader at 63 fullFilePath = getFullPathName( filename );
Error in ==> PQR at 2 obj=mmreader('wildlife.wmv')
please help me to solve this problem.

 採用された回答

Walter Roberson
Walter Roberson 2013 年 10 月 7 日

0 投票

It did not find wildlife.wmv . You will need to have a look at which directory you are in, and then go to an operating system window and locate the file and see which directory it is in.
Have a look at fullfile() and at uigetfile()

5 件のコメント

Urmila
Urmila 2013 年 10 月 8 日
hello sir,my current directory was=> C:\Users\Administrator\Documents\MATLAB And vedio was in following directory=> C:\Users\Public\Videos\Sample Videos
so i copy vedio & paste it in current directory i.e in C:\Users\Administrator\Documents\MATLAB, is it right? and now i am getting warning=> Unable to determine the number of frames in this file. and error => ??? MATLAB:read:readTimedOut
Error in ==> PQR at 3 video=read(obj). what means that?
here is part of code:
clc
obj= mmreader('Wildlife.wmv')
video=read(obj)
nFrames = Obj.NumberOfFrames
vidHeight = Obj.Height
vidWidth = Obj.Width
ES
ES 2013 年 10 月 8 日
either add C:\Users\Public\Videos\Sample Videos to matlab path using
path
or pass the full file path to mmreader, that is
mmreader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv')
Walter Roberson
Walter Roberson 2013 年 10 月 8 日
Is it a very large .wmv file?
Urmila
Urmila 2013 年 10 月 8 日
編集済み: Urmila 2013 年 10 月 8 日
yes sir,it is of 25 MB. For lager size file is there another solution to read?
Walter Roberson
Walter Roberson 2020 年 4 月 29 日
You could try with VideoReader with a hasFrame / readFrame loop. Or you could use vision.VideoFileReader https://www.mathworks.com/help/vision/ref/vision.videofilereader-system-object.html

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVariables についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by