I’m creating an FxPlug plugin for Final Cut Pro. I’m using the FxPlug Effect composition template.
Is there a clean way to save each frames of the clip to be filtered (the FCPX clip the effect has been applied to) into a temporary folder ?
I can use a Hold List node and store the path to a tmp folder as well as a list of frames I would collect from the image input. But I’m not sure of how reliable this would be and I was wondering if there were a way to request each frames of the clip ?
Thank you in advance!
The best answer would depend on what exactly you are trying to do with the saved frames.
If you just want to output the images for debugging, then you can certainly save them to a folder, like in this example: VuoImageFilterDebug.vuo (2.5 KB)
If you’re trying to use past frames in the rendering of the current frame, then it gets more complicated. As you may have noticed, Final Cut Pro (and Motion and Compressor) can send the frames to the effect in any order — especially when scrubbing the playhead across the timeline, but also to some extent when exporting a project.
So if you’re trying to store the frames seen by the Vuo composition so far — whether by saving them to file or by using a node such as
Enqueue (Image_Echo.vuo (3.7 KB)) — and look up frame N-1 from the stored frames when rendering frame N, there’s no guarantee that frame N-1 will have been rendered already.
However, on brief testing, when exporting a project, the frames after the first few did arrive in order, so maybe that’s good enough depending on what you’re trying to do.
That’s exactly what I had in mind! It seems reliable.