We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I want make a video of a running sketch using saveFrame. I want the video to freeze for a few seconds under certain circumstances, so one has time to see what's happening. I tried using saveFrame several times with a for-loop:
if (x < 10){
saveFrame("video/video_####.png");
}else{
for(int i = 0; i < 90; i++){
saveFrame("video/video_####.png");
}
}
I don't know why but it only saves one file in the else statement, so the videos doesn't freeze. Do you have a suggestion for how to freeze the movie for a few seconds?
Answers
hmmm if you are using this in draw, you are going to be saving the same frame 90 times.
Consider posting a run ning version of your approach. You can also explore the Video Export library. You can install it directly from the Processing IDE using the library manager. Then you can explore the examples the library comnes with.
Kf
@KmHg -- To explain why this is happening: "####" gets filled in with the current value of
frameCount
.You can then see what happens in this demo sketch -- the same file is repeatedly overwritten:
The easiest way to freeze is to actually add the pause to your sketch -- then saveFrame will proceed as normal. However, if you want the sketch to run without freezing and only the output to freeze, then simply change your saveFrame filenames -- for example, give them a separate suffix.
That outputs files like this:
@jeremydouglass That's a great solution. Thank you.