OpusGang / awsmfunc

awesome VapourSynth functions
MIT License
17 stars 4 forks source link

Anyway to reduce memory usage when generating images with ScreenGen? #27

Open jessielw opened 8 months ago

jessielw commented 8 months ago

I'm not sure this is easily possible. However, I've noticed that when you provide a bunch of frame numbers to the function, it generates/creates each photo on disc and holds it in memory until the process is completed for all frames in the list. This is fine, but can easily saturate 6+ GB's of RAM during 4k image generation.

Is there a way after each iteration the data from ram from the previous image could be dropped?

In theory I could use a loop and call the ScreenGen function for an individual frame and set this to None or del after words to allow the garbage collector to work more quickly, but idk if this would make a lot of a difference. But just wanted to hear your thoughts on the subject.