Apply video effect to every frame

hey guys, I recently learned to create the dithering effect
image no. 1 is the processed image
image no. 2 is the original image
… Its a lil heavy effect , So im unable to use it on videos and see it effect realtime.
image no.3 is when I try to apply the effect on the video. (it also skips frames.)

how would one go about — > taking every frame of a video ----- > processing each frame ----- > and then saving the frame …

1 Like

Is this a performance question – how to make it more efficient? When you say “saving the frame” do you mean to a directory of images?

Hey There!

Processing runs at 60 FPS maybe reduce it to 24 ( Standard for movies) saving pics at 60 FPS is a hefty job.

Did you also try threading?

ideally i would love it real time … so what i think is happening now , with a certain video is that the program jumps to a future frame without displaying the result of the current frame .
ex. while frame number 1 is not completely processed and the result it is viewable the video has already moved to a future frame , lets say frame number 15.
So i want to process every frame of a video and save every frame … it is okay if i cant view it in the sketch window. as long as every frame of the video is processed and saved.

You can use video library setframe to load frames programmatically. Then transform and use saveFrame to save each frame image to disk.

processing-video/Frames.pde

Alternately, you could dump the frames to a free directory with QuickTime or ffmpeg etc, then loop over the images in the directory and edit them.