Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
minimaxwell
minimaxwell's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Screen capturing / Movie stills
[2 Replies]
01-Oct-2011 09:22 AM
Forum:
Core Library Questions
I'm trying to make a thing that captures movie stills every minute with processing but because i'm new to processing i'm not advanced and keep getting the same note.
It says "Cannot convert movie to capture"
Can someone help me out with this?
Here's the code:
import processing.video.*;
Capture myMovie;
int intervalTime = 1*60;
int secondsSinceStart = 0;
String startTime = getTimestamp();
int counter = 0;
boolean doSave = true;
void setup() {
myMovie = new Movie(this, "movie.avi");
size(myMovie.height, myMovie.width);
println(Capture.list());
myMovie = new Capture(this, width, height, 30);
noStroke();
}
void draw() {
if (interval == 0 && doSave == true) {
String saveFileName = startTime+"-"+nf(counter,5);
saveFrame(saveFileName+".png");
doSave = false;
counter++;
}
else if (interval != 0) {
doSave = true;
}
fill(random(0,255),random(0,255),random(0,255));
rect(map(interval, 0,intervalTime, 0,width),0, 5,5);
}
String getTimestamp() {
Calendar now = Calendar.getInstance();
return String.format("%1$ty%1$tm%1$td_%1$tH%1$tM%1$tS", now);
}
«Prev
Next »
Moderate user : minimaxwell
Forum