Log in

View Full Version : Need help making avs script to interleave 2 XVID movies


Fucamaroo
23rd September 2003, 20:44
Hey, I have 2 encodes of a movie and I'd like to interleave them in order to compare quality but the cheap little script I made isn't working. I am getting:

Avisynth open Failure:
Script error: Invalid arguments to function "Interleave"
(F:\TOMB_RAIDER\VIDEO_TS\169ff, line7)

here is where I got the syntax from and the script I am using:
http://www.avisynth.org/index.php?page=Interleave

SetWorkingDir("C:\PROGRA~1\GORDIA~1\")
LoadPlugin("mpeg2dec3.dll")

DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider.avi")
DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider2.avi")
Interleave("F:\TOMB_RAIDER\VIDEO_TS\TombRaider.avi", "F:\TOMB_RAIDER\VIDEO_TS\TombRaider2.avi")
#
# TRIM
trim(startframe,endframe)

Another point is that one of these movies has b-frames enabled and i think vdubmod won't display do to a decoder lag or something like that? Are B-frames a dealbreaker wrt what I am trying to do?

I've tried a crapload of different script combinations but none seem to work. I am reminded of my C++ programming days where, when the code wouildn't work I would try every possible combination until I got what I needed but that hasn't worked this time. Any help? Thanks.

stickboy
23rd September 2003, 20:49
Originally posted by Fucamaroo
DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider.avi")
DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider2.avi")
Interleave("F:\TOMB_RAIDER\VIDEO_TS\TombRaider.avi",
\ "F:\TOMB_RAIDER\VIDEO_TS\TombRaider2.avi")Interleave takes two clips as arguments; you gave it two filenames. A clip is an opened video/audio stream; i.e., it is the return type of AVISource, DirectShowSource, BlankClip, et al.

You need to use:clip1 = DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider.avi")
clip2 = DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider2.avi")
Interleave(clip1, clip2)

KpeX
23rd September 2003, 20:49
Your script should look like this:

SetWorkingDir("C:\PROGRA~1\GORDIA~1\")
LoadPlugin("mpeg2dec3.dll")
a=DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider.avi")
b=DirectShowSource("F:\TOMB_RAIDER\VIDEO_TS\TombRaider2.avi")
Interleave(a,b)
trim(startframe,endframe)

There are some issues with decoding B-frames under VfW apps like VDubMod, but don't worry about it for comparison purposes.

btw IMO you would be better off comparing the clips with StackVertical - but that's up to you.

Edit: beaten by a few seconds by Stickboy ;)

Fucamaroo
23rd September 2003, 21:15
Awesome, that was fast.
Thanks for the help stickboy and kpex.

I was able to get the interleave and stackvertical things to work. However, the trim command would cause vdubmod to lockup when set to like 10000-20000 frames. I believe that problem does have to do with b-frames? Anyway, the file sizes are huge which in hindsight is very obvious :-) Oh, and stackvertical does seem to be more useful because the files don't open in bsplayer whrere i can step frame by frame and see which frame I'm on. They only open in media player where I don't know the commands to step thorugh video or see frame number so the verticalstack is better.

Thanks again

-steve

sh0dan
27th September 2003, 10:24
It's related to DirectshowSource. Use AviSource instead.