We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Appending frames to existing movies via moviemaker
Page Index Toggle Pages: 1
Appending frames to existing movies via moviemaker (Read 204 times)
Appending frames to existing movies via moviemaker
Dec 1st, 2008, 9:01pm
 
Hello. I'm very new to processing and I'm trying to use moviemaker to add a frame captured from a video feed (when spacebar is pressed), to the end of an existing video file, before saving the newly combined video again. Are there any examples floating around of a smart way to do something like this? Thanks in advance.

Here's what i have so far:

import processing.video.*;
Capture myCapture;
MovieMaker mm;  // Declare MovieMaker object
void setup()  
{
 size(768, 432);
 myCapture = new Capture(this, width, height, 30);
 initialiseMovieMaker();
}

void captureEvent(Capture myCapture) {
 myCapture.read();
}

void draw() {
 image(myCapture, 0, 0);
}

void keyPressed() {
 if (key == ' ') {
   mm.addFrame();  // Add window's pixels to movie
   mm.finish();  // Finish the movie if space bar is pressed!
   initialiseMovieMaker();
 }
}

void initialiseMovieMaker(){
 mm = new MovieMaker(this, width, height, ""+year()+month()+day()+hour()+minute()+second()+"_snapshots.mov",30, MovieMaker.H263, MovieMaker.HIGH);
 // need to somehow add existing frames from previous movie to mm here.
}
Page Index Toggle Pages: 1