Log in

View Full Version : 1 virtual AVI out of many small AVIs


kallekill
2nd January 2003, 19:14
I want to make a large virtual avi-file out of several small avifiles so that I can feed it to a mpeg2-encoder (TMPG) and encode everything at once so that I really can make use of the 2-pass variable bitrate. Is it a way to do it? Does Avisynth do this kind of stuff?

hakko504
2nd January 2003, 20:06
Sure, AviSynth is most suited for this kind of task: if they are named file.00.avi file.01.avi etc then SegmentedAVISource("file.avi") is the way to go. In other cases you have to do something like this:source1=AviSource("file1.avi")
source2=AviSource("file2.avi")
source3=AviSource("file3.avi")
source4=AviSource("file4.avi")
return source1+source2+source3+source4or for many files it may be easier to do it like this:source=AviSource("file1.avi")
source=source+AviSource("file2.avi")
source=source+AviSource("file3.avi")
source=source+AviSource("file4.avi")
return source
And remember you must make sure they have the same properties before they are joined: Same size, same framerate, same soundsamplerate etc. If they don't have the same properties the you should do something like this:source1=AviSource("file1.avi").BicubicResize(512,384).AssumeFps(25).ResampleAudio(44100)
source2=AviSource("file2.avi").BicubicResize(512,384).AssumeFps(25).ResampleAudio(44100)
source3=AviSource("file3.avi").BicubicResize(512,384).AssumeFps(25).ResampleAudio(44100)
source4=AviSource("file4.avi").BicubicResize(512,384).AssumeFps(25).ResampleAudio(44100)
total=source1+source2+source3+source4
return total

kallekill
2nd January 2003, 23:53
Thanks. I'll try it out