Log in

View Full Version : Interleave just won't work


Prettz
26th April 2003, 18:04
I always have trouble when initially setting up a quick script to compare two clips with StackVertical or Interleave, and it usually takes me a good deal of time each time to tweak the script so that the two clips are compatible. But this time I've been trying to get Interleave work for several hours and am still no closer to figuring out why it won't work than I was at the beginning.

I'm trying to combine a DVD source (with a few filters applied to it) and an Xvid avi source, which is 544x304, 23.976 fps. Here's my script:

LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\Avisynth 2.5\plugins\Decomb.dll")

MPEG2Source("C:\Metropolis\metropolis_full_02.d2v")
Telecide()
Decimate(cycle=5)
Trim(80525,-69048) #80525+69047=149572
Crop(8,8,-10,-12) #new res: 702x460 (mod 2x4)
BicubicResize(544,304) #after cropping, produces 1.1% aspect error
a = ChangeFPS(23.9756).Subtitle("org")

AVISource("C:\Metropolis\test2_part2_10.avi").KillAudio()
b = Subtitle("10")

Interleave(a,b)

This always produces the error message:
Avisynth open failure:
Interleave: video attributes of all streams must be identical (C:\Metropolis\join_02.avs, line 15)


Obviously I tried a few scripts to find out what avisynth thought the video attributes of each were. I took a screenshot of each and combined them into one pic to attach it here.
The top frame of the pic is from the script
MPEG2Source("C:\Metropolis\metropolis_full_02.d2v")
Telecide()
Decimate(cycle=5)
Trim(80525,-69048)
Crop(8,8,-10,-12)
BicubicResize(544,304)
Info().Subtitle("framecount = " + string(Framecount()), y=200)

The bottom frame is from the script
AVISource("C:\Metropolis\test2_part2_10.avi").KillAudio()
b = Info().Subtitle("framecount = " + string(Framecount()), y=200)


I HAVE to be missing something here, because I've been tweaking and rearranging the script a thousand different ways and nothing makes a difference.

sh0dan
26th April 2003, 18:09
Sorry - most probably my bad. A temporary workaround would be to convert to another colorspace.

(The video from mpeg2dec3 is actually I420, and the AVI is YV12, and I forgot to check for that).

Prettz
27th April 2003, 04:14
What is I420 and why have never even heard of it? Also, why is mpeg2dec3 outputting in that colorspace? I thought that it output in the mpeg source's colorspace, YV12.

edit: nevermind, I found the fourcc reference and it does mention it there. Looks like I420 is to YV12 what UYVY is to YUY2.

edit 2: I put in a CovertToYV12() and a SwapUV() after Mpeg2dec3(), but that doesn't seem to help. Is that what you meant by try converting to another colorspace, or did you mean covert it somewhere else?

edit 3 (I'm going for a record here): I forgot to mention that when I try to open the Interleave script and it gives me the error, when I later try to close virtualdub or zoom player they give me a page fault error message box which reappears immediately after you close it and never stops reappearing. I'm running Windows 98SE if that means anything.
edit 4: forgettinging the word 'never' in there significantly changes the meaning...

Kurosu
27th April 2003, 10:43
Could it be the different framerate? VirtualDub refuses to join clips with different fps. This sometimes happens when a frame gets 'somehow' forgotten: the video was 23.976 but for some reason, VDub saves it at a different fps. 69048/69049 * 23.9760 ~= 23.97565 (and rounding for display towards 0)

You can directly edit the framerate info with the tool Avifrate1.10 on Doom9 software page. I hope it helps.

sh0dan
27th April 2003, 14:15
I420 and YV12 are transparent, except the pixel_type. You should try YUY2. It has been fixed in CVS, but there is no binary up yet.

Framerate actually isn't checked, but taken from the first clip.

sh0dan
28th April 2003, 10:22
New CVS binary up, where the bug should be fixed.