As the error message notes, this is due to the fact that MATLAB is unable to access the 'cvid' codec, also known as Cinepak.
This codec is a 32 bit codec, and is thus only accessible to 32 bit applications.
As a troubleshooting step, it is helpful to verify that it is reproduced by Windows Media Player. Typically, 64 bit Windows installations will have both versions of Windows Media Player. If the 32 bit version can read this file, but the 64 bit version cannot, it is likely related to this particular codec.
Note that the 32 bit version of Windows Media Player can be found in 'C:\Program Files (x86)', while the 64 bit version is in 'C:\Program Files'.
As a workaround, the user can convert the video to a format that is readable from both 32 bit and 64 bit MATLAB. The code snippet below shows one way to do this:
v = VideoReader(source);
v2 = VideoWriter(dest);
open(v2)
while v.hasFrame
currFrame = readFrame(v);
writeVideo(v2,currFrame);
end
close(v2);
Best Answer