Log in

View Full Version : Help needed with complex resizing.....


Woodlake
3rd June 2005, 07:28
I dont have the capture with me at the moment, so I'll suggest a hypothetical senario which should illustrate my problem.
I have a capture from a tv show which is from the end of the show. Part way through the capture, credits are added from the left of screen, and slide in about a third of the way across. This progressively "squashes" the main picture. I'd like to know how I would go about cropping the credits out and restoring the picture to full frame. So what I need is a way of progressively cropping if you like, in a linear fashion. This is an example:
- capture is 704x576
- total length of capture is 5250 frames
- at frame 3000, the screen starts compressing GRADUALLY AND EVENLY from the left and continues to frame 3050.
- at frame 3050 the squashed frame is now 528x576 - this continues to until frame 3800.
- at frame 3800, the credits exit to the right restoring the frame to full size (again, gradually over 50 frames)...

Can anyone suggest a sample script to allow me to do this?

Any help welcome
Thanks,
Woodlake

gircobain
3rd June 2005, 09:48
Try this and tell me if it is what you want:

clip = avisource("file.avi")
clip1 = animate(trim(clip,0,3799),3000,3050,"Lanczos4Resize",704,576,0,0,704,576,704,576,0,0,528,576)
clip2 = animate(trim(clip,3800,0),0,50,"Lanczos4Resize",704,576,0,0,528,576,704,576,0,0,704,576)
return clip1 + clip2

Woodlake
3rd June 2005, 16:56
Thanks gircobain - worked a treat :D
I pressume the Lanczos4Resize was a typo? I had an error until I removed the "4".
I just need to study exactly what you did to understand WHY it worked now....Back to the manual I guess :)

Regards,
Woodlake

mrslacker
3rd June 2005, 18:40
Thanks gircobain - worked a treat :D
I pressume the Lanczos4Resize was a typo? I had an error until I removed the "4".
No, Lanczos4Resize is a 4-tap filter (upsizing) shorthand for LanczosResize. It is sharper and handy for upsizing. Just trying to distill this (http://www.avsforum.com/avs-vb/showthread.php?s=&postid=4760581#post4760581).

Oh, yeah... It was added in AviSynth v2.55. :)

Woodlake
4th June 2005, 06:20
Thanks mrslacker,
I have to say the info in the link you provided went straight over my head!!!
I'm going to update AVISynth though - still working with version 2.54.

Regards,
Woodlake