1 (edited by travolter 14-04-2013 20:26:56)

Topic: script for using SVP without the SVP manager loaded (?)

Im currently using this script pasted into ffdshow

# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.
SetMemoryMax(1024)
global svp_scheduler=true
global threads=5
global svp_cache_fwd=threads+2
LoadPlugin("C:\Program Files\SVP\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files\SVP\plugins\svpflow2.dll")
SetMTMode(3,threads)
ffdShow_source()
SetMTMode(2)
global crop_params=""
global resize_string=""
global super_params="{scale:{up:2},gpu:0,rc:true}"
global analyse_params="{block:{w:8,h:8,overlap:0},main:{search:{coarse:{type:2,distance:-6,satd:false,bad:{sad:2000}},type:2,distance:0}},refine:[{thsad:65000}]}"
global smoothfps_params="{rate:{num:12,den:5},algo:11,block:true,scene:{blend:true,mode:0}}"
global demo_mode=0
stereo_type=0
########## BEGIN OF MSMoothFps.avs ##########
# This file is a part of SmoothVideo Project (SVP) 3.1.3
# This is NOT the full AVS script, all used variables are defined via 
# JavaScript code that generates the full script text.
function interpolate(clip src)        
{
    input = crop_params=="" ? src : eval("src.crop("+crop_params+")")
    input = resize_string=="" ? input : eval("input."+resize_string)
    super=SVSuper(input, super_params)
    vectors=SVAnalyse(super, analyse_params, src=input)
    smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")
    return demo_mode==0 ? smooth : demo(input,smooth)
}
input=last
    stereo_type==0 ? eval(""" interpolate(input)
""") :     stereo_type==1 || stereo_type==3 ? eval("""
        lf = interpolate(input.crop(0,0,input.width/2,0))
        rf = interpolate(input.crop(input.width/2,0,0,0))
        StackHorizontal(lf, rf)
""") :     stereo_type==2 || stereo_type==4  ? Eval("""
        lf = interpolate(input.crop(0,0,0,input.height/2))
        rf = interpolate(input.crop(0,input.height/2,0,0))
        StackVertical(lf, rf)""") : input
########### END OF MSMoothFps.avs ###########
distributor()

but I need to add some lines to check the fps of the source and change it..
Somethig like:

num2=1
den2=1
Framerate<=30 && Framerate>=29 ? Eval("""
num2=2
den2=1
""") : Framerate<=24 && Framerate>=23 ? Eval("""
num2=5
den2=2
""") : Framerate<=25 && Framerate> 24 ? Eval("""
num2=12
den2=5
""") : NOP

and then add these new values to num and den

num=FramerateNumerator(last)*num2, den=FramerateDenominator(last)*den2

How can I do that?

If I write these lines into the first script... something like

global smoothfps_params="{rate:{num:FramerateNumerator(last)*num2,den:FramerateDenominator(last)*den2},algo:11,block:true,scene:{blend:true,mode:0}}"

then SVP gives an error.

There is any other way to add these lines to check original FPS and change num and den values?

Thanks for the help wink

Re: script for using SVP without the SVP manager loaded (?)

abc = FramerateNumerator(last)*num2
def = FramerateDenominator(last)*den2
...
smoothfps_params="{rate:{num:"+abc+",den:"+def+"},blah-blah-blah}"

Re: script for using SVP without the SVP manager loaded (?)

Thanks for the help Chainik!

I modified the script with your guide .. but ffdshow continue giving me same warning "value, object, or array expected" and error points to this line

smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")

maybe the smoothfps_params are not receiving correct syntax

Here the full script im using. I was testing other combos but they dont work.. maybe you can find the solution.

# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.
SetMemoryMax(1024)
global svp_scheduler=true
global threads=5
global svp_cache_fwd=threads+2
LoadPlugin("C:\Program Files\SVP\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files\SVP\plugins\svpflow2.dll")
SetMTMode(3,threads)
ffdShow_source()
SetMTMode(2)
num2=1
den2=1
Framerate<=30 && Framerate>=29 ? Eval("""
num2=2
den2=1
""") : Framerate<=24 && Framerate>=23 ? Eval("""
num2=5
den2=2
""") : Framerate<=25 && Framerate> 24 ? Eval("""
num2=12
den2=5
""") : Framerate<=50 && Framerate> 49 ? Eval("""
num2=6
den2=5
""") : NOP
abc = FramerateNumerator(last)*num2
def = FramerateDenominator(last)*den2
global crop_params=""
global resize_string=""
global super_params="{scale:{up:2},gpu:0,rc:true}"
global analyse_params="{block:{w:8,h:8,overlap:0},main:{search:{coarse:{type:2,distance:-6,satd:false,bad:{sad:2000}},type:2,distance:0}},refine:[{thsad:65000}]}"
global smoothfps_params="{rate:{num:+abc+,den:+def+},algo:11,block:true,scene:{blend:true,mode:0}}"
global demo_mode=0
stereo_type=0

########## BEGIN OF MSMoothFps.avs ##########
# This file is a part of SmoothVideo Project (SVP) 3.1.3
# This is NOT the full AVS script, all used variables are defined via 
# JavaScript code that generates the full script text.
function interpolate(clip src)        
{
    input = crop_params=="" ? src : eval("src.crop("+crop_params+")")
    input = resize_string=="" ? input : eval("input."+resize_string)
    super=SVSuper(input, super_params)
    vectors=SVAnalyse(super, analyse_params, src=input)
    smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")
    return demo_mode==0 ? smooth : demo(input,smooth)
}
input=last
    stereo_type==0 ? eval(""" interpolate(input)
""") :     stereo_type==1 || stereo_type==3 ? eval("""
        lf = interpolate(input.crop(0,0,input.width/2,0))
        rf = interpolate(input.crop(input.width/2,0,0,0))
        StackHorizontal(lf, rf)
""") :     stereo_type==2 || stereo_type==4  ? Eval("""
        lf = interpolate(input.crop(0,0,0,input.height/2))
        rf = interpolate(input.crop(0,input.height/2,0,0))
        StackVertical(lf, rf)""") : input
########### END OF MSMoothFps.avs ###########
distributor()

Re: script for using SVP without the SVP manager loaded (?)

travolter

May be you should rtfm  big_smile

global smoothfps_params="{rate:{num:"+abc+",den:"+def+"},algo:11,block:true,scene:{blend:true,mode:0}}"

please count quote marks in that line wink

Re: script for using SVP without the SVP manager loaded (?)

ouch.. sorry.. missed the quote marks! ;/

anyway its not working yet.
New error message:
"evaluate: operands of + must both be numbers, strings or clips"

Thanks for your patience

Re: script for using SVP without the SVP manager loaded (?)

travolter
global smoothfps_params="{rate:{num:"+string(abc)+",den:"+string(def)+"},algo:11,block:true,scene:{blend:true,mode:0}}"

It is avisynth syntax.

7 (edited by travolter 16-04-2013 08:26:15)

Re: script for using SVP without the SVP manager loaded (?)

thank you guys for helping me with the syntax. Im newbie yet with avisynth but Im learning for these mistakes and your lessons smile

script Its working now without errors. smile

Re: script for using SVP without the SVP manager loaded (?)

Hello!

I use shark007 codecs and it *uses* ffdshow, but the installation is slightly different. I think that the ffdshow version is x64... Ultimately, I would just like to use the SVP avs script in the ffdshow from shark007 and not have to install SVP at all (only the required dlls), because shark007 offers many features I would be missing otherwise.

However, I can't get the script to work. I currently have SVP installed (with madvr, haali, ffdshow, mpchc x86) and shark007 is not installed while I try to

SVP works. I exit SVP, paste the script into ffdshow (copied from travolter and MAG79), and all I get is "invalid script!" no matter what changes I make.

My system is high end (i7 and nvidia GTX680) so I can use the best quality settings...  I do watch anime, but the anime settings from your wiki cause worse issues than the artifacts at default settings! I would rather have some messed up lines than the weird cloud that forms around moving objects in otherwise still frames (which basically is 90% of any given anime).

Anyway, baby steps. What is wrong with this script?

# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.
SetMemoryMax(1024)
global svp_scheduler=true
global threads=5
global svp_cache_fwd=threads+2
LoadPlugin("C:\Program Files (x86)\SVP\Plugins\svpflow1.dll"")
LoadPlugin("C:\Program Files (x86)\SVP\Plugins\svpflow2.dll")
SetMTMode(3,threads)
ffdShow_source()
SetMTMode(2)
num2=1
den2=1
Framerate<=30 && Framerate>=29 ? Eval("""
num2=2
den2=1
""") : Framerate<=24 && Framerate>=23 ? Eval("""
num2=5
den2=2
""") : Framerate<=25 && Framerate> 24 ? Eval("""
num2=12
den2=5
""") : Framerate<=50 && Framerate> 49 ? Eval("""
num2=6
den2=5
""") : NOP
abc = FramerateNumerator(last)*num2
def = FramerateDenominator(last)*den2
global crop_params=""
global resize_string=""
global super_params="{scale:{up:2},gpu:0,rc:true}"
global analyse_params="{block:{w:8,h:8,overlap:0},main:{search:{coarse:{type:2,distance:-6,satd:false,bad:{sad:2000}},type:2,distance:0}},refine:[{thsad:65000}]}"
global smoothfps_params="{rate:{num:"+string(abc)+",den:"+string(def)+"},algo:11,block:true,scene:{blend:true,mode:0}}"
global demo_mode=0
stereo_type=0
########## BEGIN OF MSMoothFps.avs ##########
# This file is a part of SmoothVideo Project (SVP) 3.1.3
# This is NOT the full AVS script, all used variables are defined via 
# JavaScript code that generates the full script text.
function interpolate(clip src)        
{
    input = crop_params=="" ? src : eval("src.crop("+crop_params+")")
    input = resize_string=="" ? input : eval("input."+resize_string)
    super=SVSuper(input, super_params)
    vectors=SVAnalyse(super, analyse_params, src=input)
    smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")
    return demo_mode==0 ? smooth : demo(input,smooth)
}
input=last
    stereo_type==0 ? eval(""" interpolate(input)
""") :     stereo_type==1 || stereo_type==3 ? eval("""
        lf = interpolate(input.crop(0,0,input.width/2,0))
        rf = interpolate(input.crop(input.width/2,0,0,0))
        StackHorizontal(lf, rf)
""") :     stereo_type==2 || stereo_type==4  ? Eval("""
        lf = interpolate(input.crop(0,0,0,input.height/2))
        rf = interpolate(input.crop(0,input.height/2,0,0))
        StackVertical(lf, rf)""") : input
########### END OF MSMoothFps.avs ###########
distributor()

Re: script for using SVP without the SVP manager loaded (?)

link68759
I would just like to use the SVP avs script in the ffdshow from shark007 and not have to install SVP at all (only the required dlls), because shark007 offers many features I would be missing otherwise.

hmm
you really don't want this  big_smile
just install SVP Light version and it should work with any other codec packs if there'll be any build of ffdshow x32 installed

Re: script for using SVP without the SVP manager loaded (?)

link68759
What is wrong with this script?
What error text and what script line number?

"invalid script!"
Who is said that?

Re: script for using SVP without the SVP manager loaded (?)

Yeah, it would just show invalid script up in the corner. No error, no line number.

I did manage to get a script working from somewhere else! but as Chainik suggested, using the manager is just easier.

I did manage to get it working with my codec pack, so I'm all good smile

Although I'm a little sad that I have to use x86 mpchc