Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th August 2008, 13:23   #1  |  Link
cerncern
Registered User
 
Join Date: Sep 2005
Posts: 11
Variable crop, is it possible?

Well, what I intend is apply diferents crops in some parts of a source resulting a single video.

Example: dvdvideo source

frames 1 to 300 need crop(16,16,16,16) and resize 640x480

frames 301 to 500 need crop(8,16,8,16) and resize 640x480

frames 501 to 800 need crop(32,4,32,8) and resize 640x480

If I apply the bigest crop in each border I would lost too much area of video depending the zone, that's why I was wondering if the previously mentioned is possible.

Thanks in advance
cerncern is offline   Reply With Quote
Old 6th August 2008, 13:26   #2  |  Link
martino
masktools2 (ab)user
 
martino's Avatar
 
Join Date: Oct 2006
Location: PAL-I :(
Posts: 235
Trim(0,1) + Trim(1,300).Crop(16,16,16,16).Lanczos4Resize(640,480) + \
Trim(301,500).Crop(8,16,8,16).Lanczos4Resize(640,480) + \
Trim(501,800).Crop(32,4,32,8).Lanczos4Resize(640,480)


P.S. Frame 0 is a frame too, if you've missed that part.
martino is offline   Reply With Quote
Old 6th August 2008, 14:07   #3  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,412
Note that you can combine the crop with the resize as a single operation.
I expect that cerncern also meant the crop values to be right and bottom rather than width and height. So
Code:
 Trim(1,300).Lanczos4Resize(640,480,16,16,-16,-16) + etc
Gavino is offline   Reply With Quote
Old 6th August 2008, 15:19   #4  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
...and also use odd numbers for cropping (where necessary) in resize filter.
Alex_ander is offline   Reply With Quote
Old 7th August 2008, 10:41   #5  |  Link
cerncern
Registered User
 
Join Date: Sep 2005
Posts: 11
Thanks a lot to everyone. question solved.
cerncern is offline   Reply With Quote
Old 7th August 2008, 11:08   #6  |  Link
pavan_a
n00b
 
Join Date: Dec 2007
Posts: 2
Quote:
Originally Posted by martino View Post
Trim(0,1) + Trim(1,300).Crop(16,16,16,16).Lanczos4Resize(640,480) + \
Trim(301,500).Crop(8,16,8,16).Lanczos4Resize(640,480) + \
Trim(501,800).Crop(32,4,32,8).Lanczos4Resize(640,480)


P.S. Frame 0 is a frame too, if you've missed that part.
will it affect in A/V synch???
pavan_a is offline   Reply With Quote
Old 7th August 2008, 11:26   #7  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 715
No. But it WILL affect the look. Objects will have different proportions in different frames.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 7th August 2008, 15:12   #8  |  Link
themostestultimategenius
Kwon BoA
 
themostestultimategenius's Avatar
 
Join Date: Feb 2007
Location: Singapore
Posts: 83
Just looks neater in my opinion.
Code:
Source = DirectShowSource("Video")
a = Source.Trim(0,1)
b = Source.Trim(1,300).Spline36Resize(640,480,16,16,-16,-16)
c = Source.Trim(301,500).Spline36Resize(640,480,8,16,-8,-16)
d = Source.Trim(501,800).Spline36Resize(640,480,32,4,-32,-8)
e = Source.Trim(801,0)
f = a++b++c++d++e
Return f
__________________
Jeremy Clarkson - Getting fat is just evolution

Last edited by themostestultimategenius; 7th August 2008 at 15:16.
themostestultimategenius is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.