View Full Version : Cannot use crop to enlarge or 'shift' a clip
Camuel
7th December 2003, 18:17
Hi folks,
I've downloaded and attempted to use Auto GK. The DVD decrypter does the job correctly as far as I'm aware, and I followed the instructions in the tutorial implicitly.
When I attempt the encoding with Auto GK, BeSweet does the business with the audio, and, upon completion, VirtualDubMod 1.5.4.1 build 2178 opens up and I am presented with the following error message:
VirtualDub Error
Avisynth open failure:
Crop: You cannot use crop to enlarge or 'shift' a clip
E:\...\_.avs, line 13
I wasn't aware that I was trying to enlarge or shift anything. I've tried various resolution settings in the Advanced section, including the Auto Width but get the same error message every time. Searching the forum has revealed no anwers, and I can't help feeling that it's something really simple that I'm doing wrong, or not doing when I should be.
Please forgive me if this query is in the wrong part of the forums; I am, as my post history will attest, a complete newbie.
Thanks for any help.
Camuel
manono
7th December 2003, 22:02
Hello and welcome-
It can happen if there are 2 crops in the .avs, among other reasons. But you'd better post the .avs.
What happens if you open the .avs directly in VDubMod? Same thing?
And what's in line 13?
Camuel
8th December 2003, 18:25
Originally posted by manono
Hello and welcome-
It can happen if there are 2 crops in the .avs, among other reasons. But you'd better post the .avs.
What happens if you open the .avs directly in VDubMod? Same thing?
And what's in line 13?
Thank you for the welcome, and the reply manono.
The same error message does indeed appear when I open the .avs directly in VDubMod.
The .avs reads as follows (with line 13 in bold):
LoadPlugin("D:\PROGRA~1\AutoGK\filters\mpeg2dec3dg.dll")
LoadPlugin("D:\PROGRA~1\AutoGK\filters\decomb.dll")
LoadPlugin("D:\PROGRA~1\AutoGK\filters\chr.dll")
file="E:\Concerts\tmp\interlace.log"
sep="-"
function IsMoving() {
return (diff < 1.0) ? false : true}
mpeg2source("E:\Concerts\tmp\Bert Jansch.d2v")
c = SelectRangeEvery(160,16)
global clip = c
c = FrameEvaluate(c,"write(file,string(IsCombed(threshold=30))+sep+string(IsMoving()),append=true)")
c = FrameEvaluate(c,"global diff = 0.50*YDifferenceFromPrevious(clip) + 0.25*UDifferenceFromPrevious(clip) + 0.25*VDifferenceFromPrevious(clip)")
crop(c,716,572,4,4)
Presumably it's the crop bit in line 13 that's causing the bother. The same has happened with two DVDs. One is a recording on a DVD+R and I think the other may be too as it is the same colour on the underside (purple). The former is PAL, and the latter, NTSC. Could I simply delete line 13 and start the process again? And what could be causing the error in the first place?
Thanks again for any help.
Camuel
manono
9th December 2003, 12:26
Hi-
That's a real strange looking crop line. I'll ask the developer about it. Try this and see if it works (test first by opening it in VDubMod):
Crop(c,4,4,716,572)
It seems there's a little bit of black along the left and top sides that AutoGK is removing. You can confirm by playing the Vob file.
Yes, you could delete the crop line also, but the movie will begin to get bad Aspect Ratio, although in this case, probably not enough so you'd notice. But you'd also have the slim black bars remaining, which you'd definitely want to avoid if possible.
Camuel
9th December 2003, 13:20
Originally posted by manono
Hi-
That's a real strange looking crop line. I'll ask the developer about it. Try this and see if it works (test first by opening it in VDubMod):
Crop(c,4,4,716,572)
It seems there's a little bit of black along the left and top sides that AutoGK is removing. You can confirm by playing the Vob file.
Yes, you could delete the crop line also, but the movie will begin to get bad Aspect Ratio, although in this case, probably not enough so you'd notice. But you'd also have the slim black bars remaining, which you'd definitely want to avoid if possible.
I tried what you suggested and got the same error message. Perhaps I'm not doing it right - I had to search for the VirtualDubMod.exe which I then used to attempt to open _.avs.
Camuel
sreemv
10th December 2003, 10:23
I am running into the same exact issue, Here is my avs script:
LoadPlugin("C:\PROGRA~1\AutoGK\filters\mpeg2dec3dg.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\decomb.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\chr.dll")
file="T:\Network_drive\misc\temp\tmp\interlace.log"
sep="-"
function IsMoving() {
return (diff < 1.0) ? false : true}
mpeg2source("T:\Network_drive\misc\temp\tmp\armaan-xvid.d2v")
c = SelectRangeEvery(160,16)
global clip = c
c = FrameEvaluate(c,"write(file,string(IsCombed(threshold=30))+sep+string(IsMoving()),append=true)")
c = FrameEvaluate(c,"global diff = 0.50*YDifferenceFromPrevious(clip) + 0.25*UDifferenceFromPrevious(clip) + 0.25*VDifferenceFromPrevious(clip)")
crop(c,716,476,4,4)
The error again is the same:
Avisynth open failure:
Crop: You cannot use crop to enlarge or 'shift' a clip.
(T:\Network_drive\misc\temp\tmp\_.avs, line 13)
len0x
10th December 2003, 14:29
hm...
The crop line is right (what it does is cropping to the size of 4x4, so that without recompression avi can be saved in direct copy mode without having big avi) - it's how my analysis works.
My guess the error is because the input resolution is not right. I assume that if it's NTSC then its 720x480, if PAL then 720x576. If you are dealing with smaller sources (what are they btw?) then you might get this error as it obvisouly cannot crop smaller image with large crop values. I'm not checking for actual input size (I don't have a mechanism for doing that yet), so I have to assume that it's proper DVD source.
hakko504
10th December 2003, 15:01
Originally posted by len0x
I'm not checking for actual input size (I don't have a mechanism for doing that yet), so I have to assume that it's proper DVD source. What's wrong with crop(c,c.width-4,c.height-4,4,4) ? (or even crop(c,0,0,4,4) if you're not really interested in the video output)
len0x
10th December 2003, 15:10
Originally posted by hakko504
What's wrong with crop(c,c.width-4,c.height-4,4,4) ? (or even crop(c,0,0,4,4) if you're not really interested in the video output)
you're absolutely right! that part was written a while ago (when I was not that familiar with avisynth) and I actually meant to improve that but forgot. Now its all coming back to me... :) 10x
len0x
10th December 2003, 21:06
please get version 0.70b which should solve the problem
manono
11th December 2003, 07:43
OK, Camuel and screemv-
Please do as he says and try with the new version released specifically to address your problem. And then you can report back whether or not it fixes the problem. Thanks for bringing it up.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.