High quality movies from Matlab

Here’s a quick recipe for producing relatively high quality movies from Matlab.

1. Output a series of high resolution images to a folder. Check out this sample code for how to do that. In the example I set the resolution of the figure to be 1280 x 720, a fairly typical high definition resolution. I also scaled the images to be output at 4 times this resolution (they will be scaled smaller later.)

2. Stich the images together with Image2Movie. Download the Image2Movie application, open it up, and drag images to the empty table. From the popup menu, select “Fit into 1280×720 pixels”. This will automatically rescale the images to the lower resolution. Finally, click save movie.

3. Export to other codecs and resolutions. Open up the saved movie using QuickTime Player then choose ‘Export’ or ‘Export for Web…’ from the File menu. This will export to the movie to a more standard codec, H.264 in most cases, and at more reasonable bit rates. I will build this into Image2Movie at some point.