Simple creation of movies

Post date: May 04, 2009 2:14:51 PM

I had some difficulties to create movies from Matlab watchable from every OS platform, even from Mac Leopard to Tiger.

I finally adopted a simple approach, not based on the movie function of Matlab but the command line function "convert".

I know this is not an amazing solution, but at least you can watch the output from everything, incorporate it into keynote talks, webpages and so on ...

> The workflow is as follow:

print(gcf,'-dpng',sprintf('movie/%s_%0.3d.png',filename,iteration));

convert *.png movie.gif

will create an animated movie into movie.gif

> Convert is highly flexible, note that you can:

see the man page of convert

> You can also produce videos in different format such as .mov .avi and .mpg.

For example:

convert -delay 1/10 -rotate 90 *.png movie.mpg

but for mpeg compression I had to installed the mpeg2vidcodec with MacPort