Log in

View Full Version : Bug in AviSynth 2.5 + Trim


jonny
11th January 2003, 15:38
I'm using this script:

LoadPlugin("c:\yv12\MPEG2Dec3\MPEG2Dec3.dll")
mpeg2source("D:\divx_d2v\test.d2v")
trim(20000, -10)

It actually returns an 11 frames clip, instead of 10 (i think documentation in AviSynth 2.07 need some little fix about this, anyway 2.07 returns a 10 frames clip).

from AviSynth 2.07 docs:

A negative value of last_frame returns the frames from first_frame to first_frame + (- last_frame-1). This is the only way to get the very first frame!

should be:

A negative value of last_frame returns the frames from first_frame to first_frame + (- total_number_of_frames-1). This is the only way to get the very first frame!


this is because in a 100 frames clip the last frame is 99, not 100.


(sorry if it's a bit confusing, i've reported 2 problems mixed in one :D)

seewen
12th January 2003, 02:50
It's not the only 2.5-alpha/beta filter, which behave not as the 2.0x version did.

For exemple, TWEAK().

If you read documentation, you see that HUE values must be between -180 and 180. But in fact, you can use "infinite" values..
The same for the 3 others parameters of tweak.

Belgabor
12th January 2003, 03:24
@jonny: Huh? The doc is completely correct.
Trim(first_frame,last_frame), if you set a negative value for last_frame you get the frames first_frame to first_frame+(-last_frame-1), = a clip starting at first_frame being -last_frame frames long.

The bug in AVS2.5 seems to be a regeression to a bug found in a older AVS2.0x version (2.06 iirc).

jonny
12th January 2003, 17:52
Ops sorry the docs are ok :) ... i've made a bit of confusion
(i'm asking myself: what i was thinking when i've written this :rolleyes: )