Hi there, I am trying to use the capture class along with movie maker to capture feed from a webcam. I want the movie maker to record 10 seconds and then stop by the use of a timer class but I cannot get the two to gel. Any help, bit of a nebwie?
import processing.video.*;
Capture myCapture;
Timer timer;
MovieMaker mm; // Declare MovieMaker object
void setup() {
size(320, 240);
frameRate(24);
myCapture = new Capture(this, width, height);
timer = new Timer(10000);
timer.start();
mm = new MovieMaker(this, width, height, "drawing.mov", 24, MovieMaker.H263, MovieMaker.HIGH);
}
void captureEvent(Capture myCapture) {
myCapture.read();
}
void draw() {
image(myCapture, 0, 0);
mm.addFrame();
if (timer.isFinished()) {
mm.finish();
}
timer.start();
}
and the timer class:
class Timer {
int savedTime; // When Timer started
int totalTime; // How long Timer should last
Timer(int tempTotalTime) {
totalTime = tempTotalTime;
}
// Starting the timer
void start() {
// When the timer starts it stores the current time in milliseconds.
Is it possible in processing to record a certain amount of time from a live feed then for it to reset at a certain point.
Basically I want to create a live feed with a set of 6 video images, each video each records ten seconds and continues to play that ten seconds for up to a minute. Then when it reaches a minute for each video clip it resets and starts recording live from the video source again, records 10 seconds and plays it up to a minute... then starts again.
Just to note it isn't important to note the six videos part yet, I would be happy to just know how to do this once.
Thanks for any help! I know it is possible to control an actual videos timeline but I wasn't sure about a live video feed.