Monday, February 8, 2010

codecs and videos

you can make videos with matlab, usually i use avifile and addframe (usually in a loop) to make animations of my plots.

matlab will automatically use some kind of compression and this is where you might run into a problem where you aren't able to actually play the .avi on your computer. you might not have the correct codec (encoder/decoder).

These are the options given for the 'compression' parameter of avifile:
'Indeo3'
'Indeo5'
'Cinepak'
'MSVC'
'RLE'
'None'

Most of those are pretty old.

Also, if you want to enrage an open-source person you can start talking about proprietary codecs. I know very little about this stuff, but here's a list of open source codecs.

http://en.wikipedia.org/wiki/List_of_open_source_codecs

What I know is:

1. MATLAB defaults to Indeo5 on Windows, but this isn't part of the base Windows install now, so I had problems playing my own MATLAB generated .avi movies

2. 'Cinepak' seemed to work, but it loses some sharpness, especially in text

3. 'None' is fine but the files are much larger (duh)

4. Picasa will upload the default Indeo videos and play them, but degrade the quality, and mess up the timing

5. Another option is to write out .avis using 'None' compression, then using a third party software to compress.

6. Also some people have written stuff on the matlab file exchange such as mpgwrite, i haven't tried it yet though.

Man, MATLAB is so cool.

No comments:

Post a Comment