View Single Post
Old 12th January 2019, 01:34   #4  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Quote:
Originally Posted by ChaosKing View Post
Why not just pass an path argument to FrameEval?
Yes that's certainly possible. I was just hoping that there would be a "cleaner" option.

Quote:
Originally Posted by ChaosKing View Post
Also possibly relevant for AvisynthOptimizer:
> Generally I don't recommend invoking filters within FrameEval unless unavoidable, because that introduces extra overhead.
That's good advice right there, luckily I don't need to invoke any filters, I only need to read the frame properties, measure time and store those into a file. And the writing is only done during the last frame so file I/O should not be a bottleneck.

Quote:
Originally Posted by Myrsloik View Post
I suspect you open and write a file or something. Open the file handle outside frameeval and pass it as an argument to the function or something. See the functools.partial example in the documentation.
Thanks, turns out I don't need to worry about the working directory inside FrameEval after all. The optimizer sets the output file using an absolute path and that will work just fine inside FrameEval. And while the working directory will be wrong inside FrameEval I think nobody wants to open any clips in there...

By the way the optimizer works with VapourSynth scripts now. I'm going to do an official release this weekend. Now the question is... what to call it when it's no longer Avisynth-specific. SynthOptimizer? MetaOptimizer? ZorrIsDaManOptimizer?
zorr is offline   Reply With Quote