Got solution from
The issue was the combination of that specific codec and my 64 bit version of MATLAB. Currently 64 bit cidec for Cinepak is non-existent. So I had 2 options;
- Convert the file to another codec or to an uncompressed version.
- Install or get access to a 32-bit version of MATLAB
So I chose mpeg file format for my video and the code worked properly.
Anyone can do this.