Log in

View Full Version : Destination height is 0 or less (crop problem)


Music Fan
2nd August 2010, 11:34
Hi,
I have a very weird problem.
With these scripts, there's no problem ;
Mpeg2Source(...)
crop(0,40,0,-40)

video=Mpeg2Source(...)
audio=WAVSource(...)
audiodub(video,audio)

But with this one ;
video=Mpeg2Source(...)
audio=WAVSource(...)
crop(0,40,0,-40)
audiodub(video,audio)
... I get this message : "Crop : Destination height is 0 or less".

Why can't I crop when I add sound ?
I don't understand it.:confused:
Thanks for your help.:thanks:

Didée
2nd August 2010, 11:46
The crop line is referring to Avisynth's inherent "LAST" variable. Since you put video and audio explicitely into named variables, the "last" variable is not defined.

The script Mpeg2Source(...)
crop(0,40,0,-40)

is seen by Avisynth like this: last = Mpeg2Source(...)
last.crop(0,40,0,-40)


Correct code:
video = Mpeg2Source(...)
audio = WAVSource(...)
video = video.crop(0,40,0,-40)
audiodub(video,audio)

Music Fan
2nd August 2010, 12:09
Thanks a lot !:thanks:
I didn't know that at all, I usually do very simple scripts without sound.