- Open the video file using the QuickTime player. If the file is supported on macOS, the player automatically converts the file into a newer format.
- Save this newly converted video file.
- Use "VideoReader" to read this newly converted video file.
Why does VideoReader not load a video in R2017a or later that used to load in R2016b on Mac?
4 views (last 30 days)
Show older comments
MathWorks Support Team
on 2 Mar 2018
Answered: MathWorks Support Team
on 17 Apr 2018
In MATLAB R2016a, I used to be able to do this:
v = VideoReader('myVideo.avi');
However, when I do this in R2017a or later, I get an error:
Error using VideoReader/init (line 619)
Could not read file due to an unexpected error. Reason: Cannot Decode
Error in VideoReader (line 172)
obj.init(fileName);
Why do I get an error now?
Accepted Answer
MathWorks Support Team
on 2 Mar 2018
The macOS platform no longer supports certain older video file formats. As of MATLAB R2017a, you may experience errors when using "VideoReader" to read in files.
To read such files using "VideoReader":
This is captured in the Release Notes:
<https://www.mathworks.com/help/matlab/release-notes.html?rntext=VideoReader&startrelease=R2017a&endrelease=R2017a&groupby=release&sortby=descending&searchHighlight=VideoReader https://www.mathworks.com/help/matlab/release-notes.html?rntext=VideoReader&startrelease=R2017a&endrelease=R2017a&groupby=release&sortby=descending&searchHighlight=VideoReader>
0 Comments
More Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!