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. |
6th August 2008, 13:23 | #1 | Link |
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 |
6th August 2008, 13:26 | #2 | Link |
masktools2 (ab)user
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. |
6th August 2008, 14:07 | #3 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
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 |
7th August 2008, 15:12 | #8 | Link |
Kwon BoA
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. |
|
|