Log in

View Full Version : Dfttest,Scriptclip and current_frame help.


althor1138
24th November 2013, 01:32
I want to make a function that uses dfttest to sample noise from the current frame and denoise the current frame with aforementioned noise sample. The function below doesn't work because I believe that current_frame is not being defined as a number inside the string. Is there a way to do this? I'd be grateful for any input.

Function denoise(clip z)
{
scriptclip(z,"""dfttest(sigma=0,dither=0,sbsize=30,sosize=15,tbsize=9,tosize=3,nstring="a:3 current_frame,0,440,10")""")
}

Gavino
24th November 2013, 01:40
...,nstring=("a:3
"+string(current_frame)+",0,440,10")""")

althor1138
24th November 2013, 01:46
That works exactly like it should. Thank you!