Codec Not Found - matlab

I'm trying to read a AVI file into MATLAB using VideoReader.
video = VideoReader('test.avi');
But get this error:
The file requires the following codec(s) to be installed on your system:
cvid
Error in VideoReader (line 147)
obj.init(fileName);
Error in video (line 1)
video = VideoReader('test.avi');
The cvid codec is installed on my win7 64bit box. Any help? I am required to use VideoReader.
EDIT: MATLAB version is 2013a

From here, here and also the document on aviwriter which specifies that you can use "'Cinepak' on 32-bit systems.", I think the issue is with the combination of that specific codec and your 64 bit version of MATLAB. You probably have software on your computer which can handle 32 bit codecs so will be able to view it with some video player software, but MATLAB will be looking for the 64 bit codec (which for Cinepak is non-existent).
Your options would seem to be:
Convert the file to another codec or to an uncompressed version.
Install or get access to a 32-bit version of MATLAB

Related

Reading mov files with VideoReader

I'm trying to read a .mov movie file into MATLAB as follows:
v=VideoReader('file.mov');
I get the following error message:
Error using VideoReader/init (line 619)
Could not read file due to an unexpected error. Reason: Error Creating
Source Reader Reason: Unknown error 0xC00D36C4
Error in VideoReader (line 172)
obj.init(fileName);
How can I resolve this, or what is the source of the problem?
I'm using MATLAB version R2017a, 64-bit & Windows 7 Enterprise.
The movie plays well on Quicktime.
Usually the reasons for that error are:
Unsupported file format.
Missing Codec.
File is corrupted.
In your case, since you're using Windows 7, point#1 should not be a problem because .mov format is supported for Windows 7 and later. Since you are able to play that file with Quicktime, so the third possibility is also not valid. Missing Codec seems to be an issue in your case. Search the web for the codec for .mov files and install it and then run your code again.

Error using VideoReader/init (line 619) MATLAB

I am trying to use VideoReader in Matlab R2016a in Ubuntu 16.04 to read a .mp4 file but it gives me error as follows:
>> VideoReader('Bleach.mp4');
Error using VideoReader/init (line 619)
Failed to initialize internal resources.
Error in VideoReader (line 172)
obj.init(fileName);
I get the same error when trying to read an .avi file using the same. Please help me fix the problem.
Here is how it worked for me.
I downloaded K-lite full coded pack from this page and installed it with Media Player Classic being the install option. It downloaded all the necessary codec packages and VideoReader was able to read .avi, or .mp4 that previously failed to load.
This is the answer that explained it where I learn this.

MATLAB asking for 444P codec for .avi file

I'm using a code that was working for a lot of .avi files. But now I ran it in a different data set and at some file I got the following error :
Error using VideoReader/init (line 457)
The file requires the following codec(s) to be installed on your system:
444P
Error in VideoReader (line 146)
obj.init(fileName);
Error in processVideo(line 19)
vidObj = VideoReader(filePath);
I have k-lite codec pack installed on 64-bit Windows 7. How should I work this around?
Thanks for any help

Modelsim .WLF file version error

I am using Modelsim ALTERA STARTER EDITION 10.1d and am importing a waveform file but am getting the following error.
The WLF file version is 132.Modelsim 10.1d can read up to and including WLF file version 121.
I have tried importing the same file into Modelsim 13.1 and am still receiving similar problems. If anybody knows what version of Modelsim I need to open this file version your help would be most appreciated. Thanks!
It looks like the version number is the fourth byte in the WLF header (121 = 0x79). I manually edited a version 121 file to bump up this field and got the same version warning you are seeing. Your version 132 file should have 0x84 in its fourth byte. You could manually edit the file to reduce its version and hope the format is otherwise compatible with the older version of Modelsim but there are no guarantees.

How do I link a 64-bit MATLAB mex file to OpenCV libraries

Normally in MATLAB I can compile a mex file which uses OpenCV functions using:
mex -O "mxFunc.cpp" -I"C:\OpenCV2.1\include/opencv" -L"C:\OpenCV2.1\lib" -lcv210 -lcvaux210 -lcxcore210 -lhighgui210
However, having switched to a 64-bit version of MATLAB, I now get unresolved symbols, e.g.
mxFunc.obj : error LNK2019: unresolved external symbol cvReleaseImage referenced in function mexFunction
How can I fix this?
System: Windows 7 64-bit; MSVC 2005; MATLAB R2010b 64-bit; OpenCV 2.1.0.
Generally: You need to recompile the used libraries in 64-bit.
As far as I know, it's not enough. If you use STL (and the OpenCV uses a lot) you need to use the same CRT version what the Matlab uses. So you need to use the same version of MSVC what the Mathworks guys...
You can check the dependency of the libmex.dll to figure out which CRT is needed. After it you need to install the proper Visual C++ (normally the free version is enough).