Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out which codec MATLAB uses while opening avi file

Tags:

matlab

codec

avi

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).

like image 347
curryage Avatar asked Feb 01 '26 09:02

curryage


1 Answers

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.

like image 175
nkjt Avatar answered Feb 03 '26 07:02

nkjt