新浪博客

potplayer开启avisynth滤镜功能!SVP

2017-03-13 12:12阅读:
https://forum.doom9.org/showthread.php?t=152800&page=42
Code:
DirectShowSource('D:\video\1.avi') LoadPlugin('C:\Program Files (x86)\AviSynth\plugins\InterFrame\Dependencies\svpflow1.dll') LoadPlugin('C:\Program Files (x86)\AviSynth\plugins\InterFrame\Dependencies\svpflow2.dll') Import('C:\Program Files (x86)\AviSynth\plugins\InterFrame\InterFrame2.avsi') InterFrame(Preset='Medium', Tuning='Film', GPU=false, Cores=4)
avs script works in VirtualDub 32 when using AviSynth+:

(29.97 > 60)
But it doesn't work for Potplayer 32 with AviSynth+, so it only works with AviSynth 2.6:
Code:
potplayer_source() LoadPlugin('C:\Program Files (x86)\AviSynth\plugins\Int
erFrame\Dependencies\svpflow1.dll') LoadPlugin('C:\Program Files (x86)\AviSynth\plugins\InterFrame\Dependencies\svpflow2.dll') Import('C:\Program Files (x86)\AviSynth\plugins\InterFrame\InterFrame2.avsi') InterFrame(Preset='Medium', Tuning='Film', GPU=false, Cores=4)
Also when using AVS+ it doesn't show any messages in the player if your avs script has errors
But good thing that InterFrame & svpflow*.dll also works in VirtualDub 64 (must replace .dll 32 to 64 in '...\AviSynth\plugins\InterFrame\Dependencies\' from http://www.svp-team.com/files/gpl/svpflow-1.1.17.zip)
So we can get 60 fps in 64 bit programs
* Note: sometimes you must use ConvertToYV12 in the script:
Code:
DirectShowSource('D:\video\1.avi') ConvertToYV12 ...
for one my video I had to use ConvertToYV12 only in VirtualDub 64 while in VirtualDub 32 the script opens normally without it
SetMemoryMax(1024)
LoadPlugin('A:\svpflow-1.1.17\svpflow1.dll')
LoadPlugin('A:\svpflow-1.1.17\svpflow2.dll')
threads=10
super_params='{pel:2,gpu:1}'
analyse_params='''{block:{w:32,h:32},
main:{search:{coarse:{distance:-10}}},
refine:[{thsad:200}]}'''
smoothfps_params='{rate:{num:5,den:2},algo:13,scene:{}}'
super = SVSuper(super_params)
vectors = SVAnalyse(super, analyse_params)
SVSmoothFps(super, vectors, smoothfps_params, url='www.svp-team.com', mt=threads)
potplayer开启avisynth滤镜功能!SVP
SVP的avs脚步临时存放目录:C:\Users\*\AppData\Roaming\SVP4\scripts
之前用的avs脚本:
https://zhidao.baidu.com/question/551678184284291652.html
# This script was generated by SmoothVideo Project (SVP) Manager.# Check http://www.svp-team.com for more details.
SetMemoryMax(1024)
global svp_scheduler=trueglobal threads=3global svp_cache_fwd=threads+2
LoadPlugin('E:\SVP\plugins\svpflow1.dll')LoadPlugin('E:\SVP\plugins\svpflow2.dll')
SetMTMode(3,threads)DirectShowSource('F:\Users\adrom\Desktop\2013pv.mp4', fps=23.976, convertfps=true, pixel_type='YV12')SetMTMode(2)
global crop_params=''global resize_string=''global super_params='{pel:1,scale:{up:2},gpu:0,full:false,rc:false}'global analyse_params='{block:{overlap:0},main:{search:{coarse:{type:2,distance:-6},distance:0}}}'global smoothfps_params='{rate:{num:5,den:2},algo:13,scene:{}}'
global demo_mode=0stereo_type=0stereo_left_selection=''stereo_right_selection=''
########## BEGIN OF MSMoothFps.avs ########### This file is a part of SmoothVideo Project (SVP) 3.1.4# 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_r('src.crop('+crop_params+')') input = resize_string=='' ? input : eval_r('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_r(''' interpolate(input)''') : stereo_type==1 || stereo_type==3 ? eval_r(''' lf = interpolate(input.crop(0,0,input.width/2,0))'''+stereo_left_selection+''' rf = interpolate(input.crop(input.width/2,0,0,0))'''+stereo_right_selection+''' StackHorizontal(lf, rf)''') : stereo_type==2 || stereo_type==4 ? eval_r(''' lf = interpolate(input.crop(0,0,0,input.height/2))'''+stereo_left_selection+''' rf = interpolate(input.crop(0,input.height/2,0,0))'''+stereo_right_selection+''' StackVertical(lf, rf)''') : input
########### END OF MSMoothFps.avs ###########
下面是从自动脚本撸下来的,改了下帧率,但是在播放1080p时会有问题,估计是自动cpu利用率,但就是不能正常播放,要么帧数减半,要么就几秒钟后卡住!
SetMemoryMax(1024)
global threads=7
LoadPlugin('C:\Program Files (x86)\SVP 4\plugins\svpflow1.dll')
LoadPlugin('C:\Program Files (x86)\SVP 4\plugins\svpflow2.dll')
SetMTMode(3,threads)
SetMTMode(2)
global crop_string = ''
global resize_string = ''
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:2,den:1},algo:2,mask:{area:200},scene:{}}'
global demo_mode=0
global stereo_type=0
########## BEGIN OF base.avs ##########
# This file is a part of SmoothVideo Project (SVP) ver.4
# This is NOT the full AVS script, all used variables are defined via
# JScript code that generates the full script text.
function interpolate(clip src)
{
input = crop_string=='' ? src : eval_r('src.'+crop_string)
input = resize_string=='' ? input : eval_r('input.'+resize_string)
#MT-MODE-1 #do not remove this line!
super=SVSuper(input, super_params)
vectors=SVAnalyse(super, analyse_params, src=input)
smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, src=src)
#MT-MODE-2 #do not remove this line!
return demo_mode==0 ? smooth : demo(input,smooth)
}
input=last
stereo_type==0 ? eval_r(''' interpolate(input)
''') : stereo_type==1 ? eval_r('''
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 ? eval_r('''
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 base.avs ###########
最终选择:
# This script was generated by SVP 4 Manager.
# Check https://www.svp-team.com for more details.
SetMemoryMax(1024)
global threads=7
LoadPlugin('C:\Program Files (x86)\SVP 4\plugins\svpflow1.dll')
LoadPlugin('C:\Program Files (x86)\SVP 4\plugins\svpflow2.dll')
SetMTMode(3,threads)
SetMTMode(2)
global crop_string = ''
global resize_string = ''
global super_params = '{pel:1,scale:{up:0},gpu:1,full:false,rc:true}'
global analyse_params = '{block:{w:32,overlap:0},main:{search:{coarse:{distance:-8,bad:{range:0}},distance:0}}}'
global smoothfps_params = '{gpuid:21,rate:{num:1001,den:400},algo:2,scene:{}}'
global demo_mode=0
global stereo_type=0
########## BEGIN OF base.avs ##########
# This file is a part of SmoothVideo Project (SVP) ver.4
# This is NOT the full AVS script, all used variables are defined via
# JScript code that generates the full script text.
function interpolate(clip src)
{
input = crop_string=='' ? src : eval_r('src.'+crop_string)
input = resize_string=='' ? input : eval_r('input.'+resize_string)
#MT-MODE-1 #do not remove this line!
super=SVSuper(input, super_params)
vectors=SVAnalyse(super, analyse_params, src=input)
smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, src=src)
#MT-MODE-2 #do not remove this line!
return demo_mode==0 ? smooth : demo(input,smooth)
}
input=last
stereo_type==0 ? eval_r(''' interpolate(input)
''') : stereo_type==1 ? eval_r('''
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 ? eval_r('''
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 base.avs ###########
distributor()

我的更多文章

下载客户端阅读体验更佳

APP专享