Video-export

Note: ffmpeg must to be installed here, even if your processing-folder is located on a different place: user/documents/processing/addons/ffmpeg

the sketch

int a = 0;

void setup() {
  size(540, 540);
}

void draw() {
ellipse(width/2,height/2,a,a);
a++;

// Call the video-export-function and 
// specify the number of frames you want to render
  video(40);
}

The video-export-function can be stored in a separate file (videoexport.pde)

import com.hamoid.*;

VideoExport videoExport;


void videosetup() {
  videoExport = new VideoExport(this, "basic.mp4");
}

void video(int frames) {

  if (frameCount == 1){
   videosetup(); 
  }

 videoExport.saveFrame();
  if (frameCount == frames) {
    exit();
  }
}

results matching ""

    No results matching ""