tacman1123
2nd November 2008, 03:56
I was playing around today with using Avisynth to do the cloning effect, the end result is pretty neat:
http://videothoughts.com/project/flash/single.php?fn=avisynth/chess_clone.mp4
The timing is off on the third move, and other issues, but I thought I'd share the script and ask for feedback.
source=AviSource("c:\usr\sites\vidgrab\chess_fin2.avi")
length = 26 * 30
white_start = 70
black_start = 856
a=source.Trim(white_start, -length)
b=source.Trim(black_start, -length)
divide=a.width/2
a=a.Lanczos4Resize(a.Width-divide, a.Height,0,0,divide)
b=b.Lanczos4Resize(b.Width-divide, b.Height, b.Width - divide, 0, b.Width - divide)
# a.ConvertToRGB32().Layer(b.ConvertToRGB32(), x=a.Width/2+1, op="add", level=256)
StackHorizontal(a,b).Trim(0, 560)
Is StackHorizontal() the right approach for this? I tried Layer() (and Overlay, got nowhere with that), but layer requires switching color spaces and I still had a hard time figuring out what parameters to pass.
I'm also looking for ways to make the centerline a bit smoother, something seems not quite right with it. I'm guessing it's the way I did the crop, which was done with the Resize rather than crop because of a note I read on another thread that said not to use Crop to take out a large section, it was more for edge lines.
My goal is to put scripts like this, along with a video, into an Avisynth Cookbook that Mikeytown mentioned in another script.
As always, thanks for any suggestions. Enjoy!
Tac
http://videothoughts.com/project/flash/single.php?fn=avisynth/chess_clone.mp4
The timing is off on the third move, and other issues, but I thought I'd share the script and ask for feedback.
source=AviSource("c:\usr\sites\vidgrab\chess_fin2.avi")
length = 26 * 30
white_start = 70
black_start = 856
a=source.Trim(white_start, -length)
b=source.Trim(black_start, -length)
divide=a.width/2
a=a.Lanczos4Resize(a.Width-divide, a.Height,0,0,divide)
b=b.Lanczos4Resize(b.Width-divide, b.Height, b.Width - divide, 0, b.Width - divide)
# a.ConvertToRGB32().Layer(b.ConvertToRGB32(), x=a.Width/2+1, op="add", level=256)
StackHorizontal(a,b).Trim(0, 560)
Is StackHorizontal() the right approach for this? I tried Layer() (and Overlay, got nowhere with that), but layer requires switching color spaces and I still had a hard time figuring out what parameters to pass.
I'm also looking for ways to make the centerline a bit smoother, something seems not quite right with it. I'm guessing it's the way I did the crop, which was done with the Resize rather than crop because of a note I read on another thread that said not to use Crop to take out a large section, it was more for edge lines.
My goal is to put scripts like this, along with a video, into an Avisynth Cookbook that Mikeytown mentioned in another script.
As always, thanks for any suggestions. Enjoy!
Tac