If Matlab avifile does not work (it may have problems with the codecs of the 64-bit OS), then use mmwrite. http://www.mathworks.com/matlabcentral/fileexchange/15881-mmwrite
It is simple and it works. I used it to create * .wmv files, simply: mmwrite(filename, frames);
Edit: sample code
% set params fps = 25; n_samples = 5 * fps; filename = 'd:/rand.wmv'; % allocate frames struct fig = figure; f = getframe(fig); mov = struct('frames', repmat(f, n_samples, 1), ... 'times', (1 : n_samples)' / fps, ... 'width', size(f.cdata, 2), ... 'height', size(f.cdata, 1)); % generate frames for k = 1 : n_samples imagesc(rand(100), [0, 1]); drawnow; mov.frames(k) = getframe(fig); end % save (assuming mmwrite.m is in the path) mmwrite(filename, mov);
source share