MATLAB: Does VideoReader not load a video in R2017a or later that used to load in R2016b on Mac

MATLAB

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?

Best Answer

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":
  • 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.
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>