View Single Post
Old 21st January 2018, 06:13   #56  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
A frame cannot be released whilst something else holds a reference to it, things would start exploding.

When SRestore (or whatever) is doing its stuff, it references only input frames, and when it moves on in the clip, those frames are no longer referenced, because it is now references other later frames, and so those input frames can be released. (They would actually not be released until all frames that reference them, including any cached frames, are released).
When you instead reference previous OUTPUT frames, where E references D, and D refrences C, and C references B, and B references A, then A cannot be released until EVERY following frame which references it (directly or indirectly) is also released.
OverLay, Layer, Stackhorizontal, or any other filter which 'combines' multiple frames, or transforms single frames, will hold a reference to all source frames involved (where source in this case would include previous OUTPUT frames if that was what was used as source the the filter).

Any script which does as above, would crash Out Of Memory very quickly, just like your script did (and mine), way before thousands of frames were processed.

I dont think that there will likely be any other solution other than something like FrameStore.

EDIT: Oh, and nice pic too.

EDIT: Where my original script crashed at about 845 frames, thats how many OUTPUT frames were being held in memory, ALL AT ONCE.
(In actual fact, there would be additional intermediate frames also held in ram/pagefile).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 21st January 2018 at 06:51.
StainlessS is offline   Reply With Quote