View Full Version : How to save RAM for rather complex cut lists with many source files?
LigH
12th December 2010, 02:56
Please have a look at the script quoted in this thread in the german doom9/Gleitz board (http://forum.gleitz.info/showthread.php?43067-Avisynth-Virtualdubmod-und-der-Ramverbrauch).
Are there general suggestions how to change such a script so that AviSynth is able to optimize its RAM requirement? Is the user able to give AviSynth e.g. hints that most of the clips are not required for the whole time and can be unloaded after processing?
dansrfe
12th December 2010, 04:29
AviSynth calculates all the unloading and what clip is needed when as to not clog memory when parsing the avs file for the first time before encoding. It does that automatically for the most part, although I'm sure there might be some way to slightly speed this up.
LigH
12th December 2010, 09:15
Therefore I wonder if a good structured file may help finding unloadable clips early, and bad structured files may hide that from the detection so that AviSynth may not unload all already finished sources.
So like...
Is it possibly better to use separate index files or one concatenating index file across similar sources?
Is it possibly better to pre-splice a group of closely related trims and finally these groups, or to finally splice them all at once?
Gavino
12th December 2010, 10:40
The limiting factor in this script is that there are 22 1080p sources - each source filter remains loaded throughout the entire rendering phase and there is nothing you can do about that. I don't know about the internals of AVCSource, but each instance probably has a buffer whose size is proportional to the framesize.
Re-ordering trims, or re-using variable names will have almost zero effect on memory consumption, as these factors have very little impact.
Since the script is basically linear (no frame is accessed more than once), you can reduce the cache size to a minimum by using SetMemoryMax(16). I think that's the best you can do.
LigH
12th December 2010, 14:39
If the number of the Source filters is an important part, then indexing several AVC files to only one index file and one AVCSource call may help reducing overhead?
Gavino
12th December 2010, 15:05
Yes, I would expect so, although it depends how AVCSource works internally with a multi-source index.
Certainly worth a try. :)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.