About this blog

I feel this blog as a reflection of my thoughts to myself , and sometimes as a public diary, and the last she is my best friend to share my thoughts who says never a "oh no! ,you shouldn't....That Disgusts...."

make a movie from octave ouput images

Save the image matrices to a sequence using 'imwrite' in to a folder "image_sequence"
---use 'sprintf' to generate a filename string with full digits of the sequence indices.

now use the 'system'  command to generate video from the folder "image_sequence" using ffmpeg command(install it if required).

The following is the code.

system("rm -rf segment-output; mkdir segment-output");
for it=1:123,
imwrite(Z,sprintf('segment-output/%04d.png',it));
endfor;

system('ffmpeg -sameq -i segment-output/%04d.png -y segment-output/movie.avi');

system('mplayer segment-output/movie.avi');

This small bit of code made my life easy.

Main source is : (fredagen)
    http://lnotestoself.blogspot.in/2010/03/making-movie-in-octave.html