title: How to create a mp4 video out of Octave/via plot
body: <p>This is a follow up to question 54847941. I make videos from sequences of images created by Octave using the print command, for example:</p>
  
  <pre><code>clear;
  for kt=1:100
    t(kt)=0.1*kt;
    clf,plot(t,sin(t),'linewidth',1);axis([0,10,-1,1]);
    fname=strcat('img',num2str(kt,"%0.2i"),'.png');
    eval(['print -dpng ' fname ' -r100']);
  endfor
  
  ##use ffmpeg to make mp4 with:
  ##ffmpeg -framerate 20 -i img%02d.png -vf scale=1080:-1 Example1.mp4
  </code></pre>
  
  <p>This works when the imgaes are small, but if they are large, the print operations takes a very long time.  What is an alternative to my method, using functions like getframe and imwrite?</p>