View Full Version : Maximum # segments?
Calypso
20th February 2003, 07:56
The documentation for SegmentedAVISource() indicates a maximum of 99 segments will be loaded. I found tonight that the maximum appears to be 75- this is with version(s) 2.07, 2.06, and 2.05.
I have tons of experience with AviSynth, so this is not user error. My files are named Capture.XX.avi, and my script reads:
SegmentedAVISource("H:\Captures\Capture.avi").
I even tried renaming 15 of the 81 files, and created an alternate script:
SegmentedAVISource("H:\Captures\Cap.avi","H:\Captures\Capture.avi").
Still loads only 75 files. No errors in any of the files, VirtualDub confirmed that. I then renamed five files in the middle of the sequence a completely different name. AVISynth ignored those, and picked up files 75-80; a total of 75 files were loaded again.
Is this an error in the documentation? What's the best way to salvage this project?
hakko504
20th February 2003, 08:11
Originally posted by Calypso
What's the best way to salvage this project? That depends on the size of the captured chunks and the size of your HD as well as a few other factors.
First: if you load the files in VirtualDub, can you load all files there? If yes, you should consider using VD's frameserver to create on single file out of all the others. That file can be loaded in AviSynth, but the drawback is that VD will always convert to RGB!
Second: how large are the captured files? 2GB each? If yes you should reconsider the first option. If not, load them a few at a time in VD and re-save them as 2GB chunks using 'Save Segmented AVI'. Use as many as you can depending on how much HD space you have left. Maybe even recompress to MJPEG if you have used Huffyuv. Also check your Audio. It could be a good idea to save audio in a separate file and let the AVI only contain video. This depends on the expected size of the audio, 2 hours of uncompressed 44kHz stereo audio will be about 1.4GB so it's worth checking.
Guest
20th February 2003, 08:21
I looked at the 2.5 code and the loop allows for 0-99. You may be running into a limit on the number of open files or something like that. Why not break your files into two groups and then join them. Something like this might work:
a=SegmentedAVISource("firstbunch.avi")
b=SegmentedAVISource("secondbunch.avi")
whatever(a+b, ...)
You'll have to rename the files in the second bunch. I don't know if this will get around the 75 limit but it's worth a try.
Calypso
20th February 2003, 08:23
hakko504,
Thanks for the tips. The files total about 33GB, leaving me with 20GB free space. Each file is around 465MB (due to an infuriating problem I'm having with AVI_IO not honoring file size settings).
I have already saved out the audio as a WAV file for post encoding into AC3. Are you saying I can resave out several existing segments into one larger segment, and not screw with the sync? Seems reasonable I suppose, but once I start, there is no turning back, since I will have to delete most of the original segments as I go.
I'm also not sure how several sessions of creating new multi-segmented files can be 'put back together' and recognized as a new multi-segmented AVI. Does avisynth really only care about the filename(s), and re-construct from there?
hakko504
20th February 2003, 08:26
Originally posted by Calypso
Are you saying I can resave out several existing segments into one larger segment, and not screw with the sync? Seems reasonable I suppose, but once I start, there is no turning back, since I will have to delete most of the original segments as I go.
Yes, as long as you treat them a a compete unity in AviSynth later.
Does avisynth really only care about the filename(s), and re-construct from there? Strange but true.
bb
20th February 2003, 08:26
Somehow I have the feeling the second bunch would be an invalid AVI...
As far as I know the segments are being split by bytes, without considering the AVI container structure.
bb
hakko504
20th February 2003, 08:27
Originally posted by bb
As far as I know the segments are being split by bytes, without considering the AVI container structure. Nope, VD splits them by frame (but not necessarily keyframe)
sh0dan
20th February 2003, 09:05
It sounds like a Win9X issue with loading multiple dll's. I'm not sure if there is any solution on this currently other than upgrading.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.