View Full Version : Is there a limit to how many clips can be loaded simultaneously?
Chainmax
3rd July 2008, 01:06
For a new DVD I'm creating, 117 clips have to be loaded at once and concatenated in an avisynth script to be opened by CCE. The reason for that is lack of HDD space.
If I try to load all clips at once, a "couldn't locate a decompressor for fourcc lags" pops up, but loading a reduced number of clips (40, for example), seems to work fine. I'd rather avoid that since it introduces a couple of unnecessary steps into the process. So, what I'd like to know is whether there's a limit to the number of clips you can load and append on a single script and if so, how to get around that, if possible.
martino
3rd July 2008, 01:17
How about using ffmpegsource or directshowsource? Or do those have some... limits(?) too?
foxyshadis
4th July 2008, 02:43
http://forum.doom9.org/showthread.php?t=131687
The documentation for avisource even points to this thread now.
Dark Shikari
4th July 2008, 02:56
AVISource has the limit (around 70 on my system), DirectShow doesn't.
squid_80
4th July 2008, 17:00
The limit comes from how many .dlls can be loaded into a process - avisource loads a codec for each call. Before anyone responds with "Why not fix it/make it work differently?" I suggest they look at the code and see what can be done. I had a go and managed to avoid reloading codecs that were already in use, but soon ran into another obstacle - setting up decompression processes for ~100 files makes memory usage go through the roof.
A much better solution, if suitable, is segmentedavisource. But it's only designed for joining segments that have been cut from one original file and it joins using unalignedsplice.
I had a go and managed to avoid reloading codecs that were already in use, but soon ran into another obstacle - setting up decompression processes for ~100 files makes memory usage go through the roof.
Shouldn't it be possible to open files at the beginning to get their properties, then start closing them again on a LRU-basis once a certain number of open files is hit to only re-open them when their frames are being requested and closing them again according to the LRU list?
Unless all files are needed at the very same time (for, say, overlaying 100 clips on top of each other) this should keep the number of simultaneously open files down, and in the case where the files are just joined at the ends it shouldn't affect performance too much. (Well, it working at a slightly slower pace vs. AviSynth erroring out might be called a performance improvement... :p)
Also, if the total number of opened files is below the LRU limit the performance should be the same as before...
(Disclaimer: I haven't looked at AviSynth's code in some time and haven't seen the AviSource at all, but since VirtualDub is able to open and close hundreds of video files in a row I assume the same should also be possible from AviSynth...)
np: Magnum38 - Alligator (Musick To Play In The Club)
The other downside is what happens when half way thru the script, when trying to reopen a file it chokes and dies. Fine VDub drops an error, other apps get the tail end of the video painted with an error message.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.