PDA

View Full Version : DirectShowSource("01.avi") ++ DirectShowSource("02.avi")....


Synthetic
12th June 2007, 10:02
Another question to simpllify my life:

On that script:

DirectShowSource("01.avi") ++ DirectShowSource("02.avi") - etc -
ConverttoRGB32()
ImageWriter("C:\RemotePlayback\Cam01\0430\sliced\", type = "jpeg")

When I have 60 avi files, I have to write:
DirectShowSource("01.avi") ++ DirectShowSource("02.avi")++ DirectShowSource("03.avi") etc.... up to ++ DirectShowSource("60.avi")
or there is another way to write the script?

Yes I know, Im a newbie, a real one!

Thanks again

Zach
12th June 2007, 11:18
Maybe the following thread will help you:

http://forum.doom9.org/showthread.php?s=&threadid=79259

foxyshadis
12th June 2007, 11:54
Or look into SegmentedAVISource and SegmentedDirectShowSource. They use unalignedsplice (+) however, so they might not meet your needs.

gzarkadas
12th June 2007, 22:50
...
When I have 60 avi files, I have to write
DirectShowSource("01.avi") ++ DirectShowSource("02.avi")++ DirectShowSource("03.avi") etc.... up to ++ DirectShowSource("60.avi")
or there is another way to write the script?
...


You can use the array facilities of AVSLib (see my sig for links). In the example scripts (http://avslib.sourceforge.net/examples/index.html) section of the AVSLib website there are similar examples (cf. examples 1, 5, 8).

The following code snippet will handle the particular example you provide (have not tested it though, may need some tweaking):


LoadLibrary("avslib", CONFIG_AVSLIB_ARRAYS)

Function MakeFName(int idx) { return String(idx, "%02.0f") + ".avi" }

ids = ArrayRange(1, 60)
names = ids.ArrayOpFunc("MakeFName")
clips = names.ArrayOpFunc("DirectShowSource")
last = clips.ArraySum(sum_func="AllignedSplice")
# continue as usual
...