curryage
curryage

Reputation: 491

Find out which codec MATLAB uses while opening avi file

I have a avi file encoded using Microsoft MPEG-4(MP42). Is there a way to find out which codec MATLAB uses (and optionally its location) while opening this avi file using VideoReader ? I am using MATLAB Version 7.12.0.635 (R2011a).

Upvotes: 3

Views: 2417

Answers (1)

nkjt
nkjt

Reputation: 7817

Try:

info = mmfileinfo('myfile.avi');
info.Video.Format

That should return a code confirming which codec Matlab thinks the file uses (see here for a list), which in your case should be "mp42". On older versions of Matlab you may need to use aviinfo instead of mmfileinfo.

Matlab doesn't install its own codecs, just uses what exists on your system already. If the right codec is not on your system, it will return an error when you try to read the .avi file.

Upvotes: 1

Related Questions