How to merge two mov files
in
Contributed Library Questions
•
2 years ago
Hi,
I am a novice writing code in processing, so this may be a simple question, but I need some help.
I am trying to merge two .mov files so one will continue the other
I have written a sample code to explain what I am trying to do
Can anyone please advise how to join the two .mov clips?
I do not mind using another library, other then JMyron
- import processing.video.*;
- import JMyron.*;
- final int CANVAS_WIDTH = 640;
- final int CANVAS_HEIGHT = 480;
- final int FRAME_RATE = 24;
- final boolean DEBUG = true;
- final int FRAMES_PER_MINUTE = DEBUG? 3* FRAME_RATE: 60 * FRAME_RATE;
- final int MOVIES_ARR = 2;
- JMyron mov;
- MovieMaker mm;
- int movIndex;
- void setup() {
- smooth();
- frameRate(FRAME_RATE);
- size(CANVAS_WIDTH, CANVAS_HEIGHT);
- movIndex = 0;
- mm = new MovieMaker(this, width, height,"C:\\Temp\\Clip_"+movIndex+".mov", FRAME_RATE, MovieMaker.ANIMATION, MovieMaker.BEST);
- mov = new JMyron();
- mov.start(CANVAS_WIDTH, CANVAS_HEIGHT);
- mov.findGlobs(0);
- loadPixels();
- }
- void draw() {
- mov.update();//update the camera view
- mov.imageCopy(pixels);//draw image to stage
- updatePixels();
- if (frameCount > FRAMES_PER_MINUTE) {
- frameCount = 0;
- mm.finish();
- delay(100);
- movIndex = (movIndex + 1) % MOVIES_ARR;
- File tmp = new File("C:\\Temp\\Clip_"+movIndex+".mov");
- if (tmp.exists()){
- tmp.delete();
- }
- mm = new MovieMaker(this, width, height, tmp.getPath(), FRAME_RATE, MovieMaker.ANIMATION, MovieMaker.BEST);
- }
- mm.addFrame();
- }
- void mousePressed(){
- //Join the clips done so far, use movIndex and % MOVIES_ARR to know where to start from
- }
ilan
1