Log in

View Full Version : If then statement to determine when to do IVTC


swaaye
9th February 2008, 05:19
Hi folks.

I'd like to set up a test in the script to run IVTC only if the framerate is 29.97 fps. This is to detect if Staxrip has forced film or not and run IVTC if not.

if (framerate (clip) == 29.97) {
tfm (source)
tdecimate (hybrid=1)
}

Can I do that with avisynth? I can't really come to grips with the block statements guide for avisynth. lol... :)

Reuf Toc
9th February 2008, 05:38
clip = (framerate(clip) == 29.97) ? clip.TFM().Tdecimate(hybrid=1) : clip

If clip framerate equal 29.97 fps then run IVTC, else return clip.

DarkT
9th February 2008, 12:50
Errr, but, you DO know that 29.970 isn't a 100% indicator that IVTC is needed, and that there are other things to take into account even if IVTC is needed, right? This is just for testing purposes, right? :).

swaaye
12th February 2008, 06:34
yes, indeed. This is NTSC television using an annoying hybrid video/film telecine.

Thanks for the code snippet. It works great!