Best practices for processing a video and outputting to frames

I’m sure this is a silly question but I can’t find an answer yet so…

I’m doing some simple video processing on an mp4: take in video frame, make it look different, output a png to disk. I feel like doing this in the update loop inherently limits the speed & I wonder if there is a best practice for doing this as fast as the machine allows. Is it to simply not have a draw loop and do everything in ofFbo in the update? Or is there a method that involves disabling the auto update loop and checking for new frames manually? Or should I just create a for loop and go thru the video frame by frame that way in setup? Or something else?

you can speed up using threads to save the images.
and I’ve found out benchmarking image output in OF all images uses different compression systems, even tiff, so I’ve written an uncompressed tiff writer, about 30% faster than OF, but just works for RGB888 images, if you want to give a try its here:

I’ve been using a lot syphon recorder (in macos) for realtime video recording.

1 Like

Hey @prismspecs , a separate thread seems to work well for saving images, like Dimitre suggested. In the one posted here, we used a deque to buffer the images for an ofThread on an RPi.

And I think there are some addons for this too, some of which may be platform-specific. One of these days I’ll have to try Arturo’s ofxTextureRecorder. If I remember right, we couldn’t use this on the Pi because of openGLES.