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. |
5th March 2012, 04:23 | #1 | Link |
Registered User
Join Date: Oct 2005
Posts: 76
|
AutoCrop script?
Hello, I'm trying to encode a series that was made in the late 70's and looks like it was a VHS transfer to DVD. My problem is that each scene seems to have different crop values. Currently this method works great:
trim(0,1000).crop(24,0,-10,0).resize(640,480) ++ trim (1001,2000).crop(20,0,-8,0).resize(640,480) ++ ... etc Obviously this becomes extremely tedious for a 21 episode series and is prone to human error. AutoCrop from len0x does not solve the problem because it finds 1 crop value and applies it to the whole video. I don't suppose there is a simple script that would loop through each frame to determine it's crop value, resize, and go on to the next frame? Something like for i = 0 to lastframe autocrop(samplestartframe=i, sampleendframe=i).resize(640,480) next i I'm not sure if something like that would work. I don't speak enough avisynth-ese yet to make it into a function, and I'm not sure exactly how slow this would be but it's an idea anyway. Anyone able to translate something like this into an avisynth function script? Or any thoughts? Obviously it would be fleshed out with parameters to choose your resizing filter and dimentions, along with any other parameters you'd need. |
9th March 2012, 11:09 | #2 | Link |
Registered User
Join Date: Mar 2012
Posts: 1
|
Maybe you can adapt this code snippet for that purpose.
Code:
frame = 1 last = movie.FrameCount() video = AutoCrop(movie.trim(0,0),0,716,424,0,0,0,0,30,1,0,0,0) GScript(""" while (frame < last ) { video = video ++ AutoCrop(movie.trim(frame,frame),0,716,424,0,0,0,0,30,1,frame,frame,0) frame = frame + 1 } """) |
Thread Tools | Search this Thread |
Display Modes | |
|
|