Skip to content

AviSynth Script: SVP

Anime4000 edited this page Feb 9, 2019 · 6 revisions

High Quality Frame Interpolation

InterFrame by spirton not high quality enough, I create simple script that communicate directly SVP library. There are 3 JSON script for visual/gpu tweaking

SetMemoryMax(6000)

global threads=25

LoadPlugin("C:\Program Files (x86)\SVP 4\plugins64\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\SVP 4\plugins64\svpflow2.dll")

SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("SVSuper", 1)
SetFilterMTMode("SVAnalyse", 1)
SetFilterMTMode("ffdshow_source", 3)
DirectShowSource("my imouto video.mkv")

ConvertToYV12()

global super_params = """
{
    scale: {
        up: 0
    },
    gpu: 1,
    rc: true
}
"""

global analyse_params = """
{
    main: {
        search: {
            coarse: {
                distance: -8,
                bad: {
                    sad: 2000,
                    range: 24
                }
            },
            type: 2
        }
    },
    refine: [{
        thsad: 250
    }]
}
"""

global smoothfps_params = """
{
    gpuid: 21,
    rate: {
        num: 120,
        den: 1,
        abs: true
    },
    algo: 13,
    mask: {
        area: 200
    },
    scene: {}
}
"""

input=last
super=SVSuper(input, super_params)
vectors=SVAnalyse(super, analyse_params, src=input)
smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads)

smooth

Prefetch(threads)
  • save it as anyname.avs 😄
  • You can find more properties here
  • Please use Latest AviSynth+ If have installed SVP you can skip to download latest AviSynth+
  • This script will use GPU by default.

Other Quality Option

You can simply replace super_params, analyse_params and smoothfps_params code above

Low (Fast/Realtime)

Anime

global super_params     = "{scale:{up:0},gpu:1,rc:true}"
global analyse_params   = "{block:{w:32},main:{search:{coarse:{type:2,distance:-6,bad:{sad:2000,range:24}},type:2}},refine:[{thsad:250}]}"
global smoothfps_params = "{gpuid:21,rate:{num:23,den:4},algo:2,scene:{}}"

Film

global super_params     = "{scale:{up:0},gpu:1,rc:true}"
global analyse_params   = "{main:{search:{coarse:{distance:-8,bad:{sad:2000,range:24}},type:2}},refine:[{thsad:250}]}"
global smoothfps_params = "{gpuid:21,rate:{num:23,den:4},algo:13,scene:{}}"

High (Fluid, need mid-high end GPU)

Anime

global super_params     = "{scale:{up:0},gpu:1,rc:true}"
global analyse_params   = "{block:{w:32},main:{search:{coarse:{type:2,distance:-6,bad:{sad:2000,range:24}},type:2}},refine:[{thsad:250}]}"
global smoothfps_params = "{gpuid:21,rate:{num:23,den:4},algo:2,mask:{area:200},scene:{}}"

Film

global super_params     = "{scale:{up:0},gpu:1,rc:true}"
global analyse_params   = "{main:{search:{coarse:{distance:-8,bad:{sad:2000,range:24}},type:2}},refine:[{thsad:250}]}"
global smoothfps_params = "{gpuid:21,rate:{num:23,den:4},algo:13,mask:{area:200},scene:{}}"

Use SVP Without SVP Manager

Lately SVP for Windows no longer have free version, however, there are some work around.

Requirement

  • Media Player Classic (MPC) I using K-Lite Codec Pack Mega
  • ffdshow raw video filter
  • Latest AviSynth+
  • Latest svpflow plugins

  • Open MPC
  • Press O key to open Option
  • Go to External Filters
  • Add filter, find ffdshow raw video filter then click OK
  • Change to Prefer from Block, Set Merit
  • Double click ffdshow raw video filter
  • Scroll down to find AviSynth and tick (Enable)
  • Do this:
  • YV12
  • YUY2
  • RGB24
  • RGB32
  • Also do this:
  • Buffer back/ahead: 0 32
  • Paste code below
  • Replace Line DirectShowSource() to ffdshow_source()

Known bug

  • If you using AMD Radeon Adrenalin driver, please use 64-bit decoder
Clone this wiki locally