Log in

View Full Version : Split Screen Comparison with StackHorizontal()


czerro
16th December 2008, 21:18
I want to use StackHorizontal() for a split screen (rather than side-by-side) comparison. The issue I have, is that the videos will not stay in sync. I'm thinking it has something to do with TIVTC and how I'm employing it. Here is what the script looks like. I apologize for the mess:

#Chain for Split-Screen Comparison

original = DGDecode_MPEG2Source("source.d2v").tfm().tdecimate(cycle=25)
target = DirectShowSource("source_ivtc_filtered.m2v")

# Determine Filtered/Target Video width and height
# variable "modifier" assumes YV12 mod4

width = target.Width
height = target.Height
modifier = width/2

StackHorizontal(original.Spline36Resize(width,height).Crop(0,0,-modifier,0).Subtitle("Source"),target.Crop(modifier,0,0,0).Subtitle("Filtered")

# End

The Framerates of the clips are identical, but for some reason the clips fall rapidly out of sync. I'm guessing StackHorizontal does a frame by frame call of the input clips which results in a wierd interaction with TIVTC, but I'm not sure how to correct for this.

Blue_MiSfit
16th December 2008, 21:28
DirectShowSource is very _not_ frame accurate :)

~MiSfit

czerro
16th December 2008, 21:54
Wow, that was it.

I used Nic's MPEGdecoder plugin instead of DirectShowSource and everything sync'ed up.

Much Appreciated.

Guest
16th December 2008, 22:26
For consistency, you could have used DGDecode_MPEG2Source(), just as you did for the original clip.

czerro
16th December 2008, 22:46
I tried this, and avisynth kicked it back as invalid "source is not a d2v file". Maybe my version of dgdecode is out of date (packaged with dgindex 1.4.9).

Edit: Sorry, I understand you. Make a d2v project from the m2v. I believe that's all MPEGdecode plugin does.

MadRat
17th December 2008, 03:53
I know it seems like I'm missing the point but there's the Before and After script in this thread

http://forum.doom9.org/showthread.php?p=675275#post675275

There's also a beforeafterline script that puts a line along the middle for you.