File Exchange

image thumbnail

List Video Codecs, FourCC

version 1.4.0.0 (3.45 KB) by Dirk-Jan Kroon
Lists all available video compressors for usage with avifile in Matlab

4 Downloads

Updated 16 Feb 2011

View License

This function GETFOURCC gives a list of available Video encoder-codecs in
the current Windows installation. The FourCC code of a codec in the list
can be used to select a custom compressor in the AVIFILE function.

Usage :

getfourcc , Will display a list with available video codecs
or
L = getfourcc , Returns a struct with all available video codecs


Supported OS,
Windows NT, 2000, Vista, Windows 7


Example Output,

Four CC | Description (Driver / DLL)
-----------+---------------------------------------------- -----
mrle | Microsoft - Run Length Encoding (msrle32.dll)
msvc | Microsoft - Video 1 (msvidc32.dll)
i420 | Intel - Indeo 4 codec (iyuv_32.dll)
cvid | Supermac - Cinepak (iccvid.dll)

See also avifile/addframe, avifile/close, movie2avi

Comments and Ratings (9)

Loyim Franck

please can I have the code that you have written?

Jesse

Jesse (view profile)

Can not locate compressor.
Error in ==> FITS_CreateAVI at 42
movie2avi(movFram, aviNameFull, 'compression', 'yvu9');

Yet...
Four CC | Description (Driver / DLL)
:
i420 | Intel - Indeo 4 codec(iyuv_32.dll)
yvu9 | Toshiba Video Codec(tsbyuv.dll)
cvid | Supermac - Cinepak(iccvid.dll)

Same with cvid but worked with i420. Strange.

Jesse

Nikolay S.

Hi.
It fails to display LAGS codec installed on my system, while I'm able to generate video with it using AVIFILE

Zira

Zira (view profile)

HI, CAN I KNOW HOW THO INSTALL IT? I'M STILL NEW IN MATLAB

Dirk-Jan Kroon

*Kenneth Cate
Thank you for your comment. I understand the usefulness of adding the try and catch line. But why replace i by "k"?

Kenneth Cate

Remove trailing backslashes from the two reglok= lines

Put try / catch around the keys = winqueryreg line like so:

try
keys = winqueryreg('name','HKEY_LOCAL_MACHINE',[reglok, '\Drivers32']);
catch %#ok<CTCH>
continue
end

Use k instead of i in:

for k=1:length(keys)
key=keys{k};

I make some other changes to dress up the display of the table that I could send you if you would like.

Kalim DElia, you're probably using windows XP which is not supported, see help above. It would be great if this did support XP, is there any way to achieve this?

Kalim DElia

I Have this problem

??? Error using ==> winqueryreg
Specified key is invalid.

Error in ==> getfourcc at 37
keys = winqueryreg('name','HKEY_LOCAL_MACHINE',[reglok
'\Drivers32']);

Updates

1.4.0.0

Added try-catch

1.3.0.0

Fixed bug : Inner for-loop used also the variable "i"

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor