Cannot find an exact (case-sensitive) match for 'videoreader'

I was tried to upload video file on matlab but it didn't work and I tried to moved my file followed the description but it;s alway shoen liks this.
>> v = videoreader('test1.avi');
Cannot find an exact (case-sensitive) match for 'videoreader'
The closest match is: VideoReader in C:\Program
FilesMATLAB\R2018b\toolbox\matlab\audiovideo\@VideoReader\VideoReader.m
obj = VideoReader('ultrasound test');
Error using VideoReader/init (line 611)
The filename specified was not found in the MATLAB path.
Error in VideoReader (line 176)
obj.init(fileName);
Can someone help me to solve this problem? please

3 Comments

Your first try with the wrong function name was trying to read 'test1.avi'.
Your second try with the correct function name was trying to read 'ultrasound test' with no file extension. .avi is not assumed.
>> v = VideoReader('test1.avi');
Error using VideoReader/init (line 611)
The filename specified was not found in the MATLAB path.
Error in VideoReader (line 176)
obj.init(fileName);
First of all thank you for your kindnessI was typed followed by your suggesstion but its still not work
which directory is test1.avi in? Is that the directory you are cd() to ? Is the directory on your matlab path?

Sign in to comment.

Answers (2)

Now that you've spelled VideoReader correctly, it's not finding the file. Try this:
if exist('test.avi', 'file')
v = videoreader('test1.avi');
else
message = sprintf('WARNING: The file test.avi was not found in the current folder or on the search path');
uiwait(warndlg(message));
end
To fix it, you can just put the entire path (folder plus base filename) into your calls.

Asked:

on 4 Mar 2019

Answered:

on 4 Mar 2019

Community Treasure Hunt

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

Start Hunting!