mpv快捷键设置问题
mpv上开启某一视频滤镜的快捷键在input.config中怎么设置?比如拿 vf=vapoursynth="~~/mvtools-blksize64.py":concurrent-frames=25 这一滤镜举例,欲设置开启快捷键ctrl+M,该如何写input.config? 本帖最后由 HuangRuixiao 于 2020-12-11 13:31 编辑
TK4E 发表于 2020-12-11 11:36
# Vapoursynth {{{
##
## Vapoursynth toggle keybinding
谢谢,最后成功了
实测这两行代码只有下面不带引号的可行
CTRL+m vf toggle vapoursynth="~~/mvtools-blksize64.py:concurrent-frames=25"#开关mvtools补帧CTRL+m vf toggle vapoursynth=~~/mvtools-blksize64.py:concurrent-frames=25#开关mvtools补帧
本帖最后由 TK4E 于 2020-12-11 10:00 编辑
没用过vpy
你可以参考下
input.conf
F5 vf toggle "oscilloscope=x=0.5:y=0.5:s=1:c=1"
原命令
ffplay -vf "oscilloscope=x=0.5:y=0.5:s=1:c=1" -i x.ts n.ts
上面那个可能有误导性
mpv --vf="oscilloscope=x=0.5:y=0.5:s=1:c=1"i.ts
试了半天还是没有成功,目前是这样的思路
CTRL+q vf-toggle=vapoursynth="~~/mvtools-blksize64.py":concurrent-frames=25#开关mvtools补帧
但是没有用,播放界面报错如下
# Vapoursynth {{{
##
## Vapoursynth toggle keybinding
## defalut key overwrite for IR remote key
#
## mvtools
1 vf toggle vapoursynth=/home/nietz/.config/mpv/vapoursynth/mvtools.vpy
## flash3kyuu debanding
#2 vf toggle vapoursynth=~/.config/mpv/vapoursynth/flash3kyuu.vpy
2 quit
## SVP4 interpolation low quality
# vf toggle vapoursynth=/home/nietz/.config/mpv/vapoursynth/svp4.vpy
## SVP4 interpolation middle quality + gpu
3 vf toggle vapoursynth=/home/nietz/.config/mpv/vapoursynth/svp4.vpy
#3 vf toggle vapoursynth=/home/nietz/.config/mpv/vapoursynth/svp4gpu.vpy
## SVP4 interpolation low quality for tv 29.970 fps
#4 vf toggle vapoursynth=/home/nietz/.config/mpv/vapoursynth/svp4tv.vpy
4 vf toggle "lavfi=graph=,lavfi=graph=,lavfi=graph=,vapoursynth=/home/nietz/.config/mpv/vapoursynth/mvtools.vpy,lavfi=graph=" # toggle deinterlacer (auto-inserted filter)
## toggle gradfun debanding on 5
5 vf toggle lavfi=gradfun
#
# remove all video filters on 6
6 vf set ""
# vf toggle vapoursynth=/home/nietz/.config/mpv/vapoursynth/test.vpy
## fullscreen 7
7 cycle fullscreen
## osd toggle 8
8 cycle osd-level
# }}}
https://rina-kawakita.tistory.com/entry/configmpvinputconf
能不能用我不清楚我也不知道文本里的内容我也没用win
我感觉你是路径写错
本帖最后由 HuangRuixiao 于 2020-12-11 13:33 编辑
又试了一下单独关闭,仅仅是把
CTRL+m vf toggle vapoursynth=~~/mvtools-blksize64.py:concurrent-frames=25#开关mvtools补帧
中的“toggle"换成remove,变成
CTRL+Alt+m vf remove vapoursynth=~~/mvtools-blksize64.py:concurrent-frames=25#关闭mvtools补帧
然后发现不起作用,无法移除已加载的滤镜。 HuangRuixiao 发表于 2020-12-11 13:29
又试了一下单独关闭,仅仅是把
中的“toggle"换成remove,变成
vf append "@interp:vapoursynth=~~/filters/svpflow.py:concurrent-frames=25"
vf remove "@interp"我测试下来是可以的mpv.io
对另外帖子的问题做个回答
那个vpy效果不会和懒人包里现有的存在区别,没必要“使用”它。
mvtools增加质量可以把vpy里的 BlockFPS 改成 FlowFPS,
但是flow可能产生很扭曲的效果,建议视具体情况自行决定。 Starlight 发表于 2020-12-11 18:21
对另外帖子的问题做个回答
那个vpy效果不会和懒人包里现有的存在区别,没必要“使用”它。
谢谢,最后测试成功了,发现之前失败是因为Ctrl+Alt不能作为快捷键组合,现在改成Shift+Ctrl就没问题了。CTRL+m vf append vapoursynth=~~/mvtools-blksize64.py:concurrent-frames=25#开启mvtools补帧
Shift+Ctrl+m vf remove vapoursynth=~~/mvtools-blksize64.py:concurrent-frames=25#关闭mvtools补帧
Starlight 发表于 2020-12-11 18:21
对另外帖子的问题做个回答
那个vpy效果不会和懒人包里现有的存在区别,没必要“使用”它。
在"mvtools-blksize64"中发现以下两行包含相关关键字
#clip = core.mv.FlowFPS(clip,_super,mvbw,mvfw,num=dfps,den=vden,mask=0,ml=100.0,thscd1=970,thscd2=255,blend=False)
clip = core.mv.BlockFPS(clip,_super,mvbw,mvfw,num=dfps,den=vden,mode=2,ml=100.0,thscd1=970,thscd2=255,blend=False)是把下面一行的Block改成Flow还是把下一行直接换成上一行呢?
PS:附上完整代码:
import vapoursynth as vs
core = vs.core
clip = video_in
vfps = int(container_fps*1e8)
dfps = 60000
def ffps(fps):
rfps = int('%.0f' % fps)
if ( abs(fps - (rfps/1.001)) < abs(fps - (rfps/1.000)) ):
vfps,vden = rfps*1000, 1001
else:
vfps,vden = rfps*1000, 1000
return vfps, vden
'''
mv.Super(clip clip[, int hpad=8, int vpad=8, int pel=2, int levels=0, bint chroma=True, int sharp=2, int rfilter=2, clip pelclip=None, bint opt=True])
mv.Analyse(
clip super [,int blksize =8,int blksizev=blksize,int levels =0,
int search =4,int searchparam=2,int pelsearch =0, bint isb =False,
int lambda , bint chroma=True,int delta =1, bint truemotion =True,
int lsad ,int plevel ,int global ,int pnew ,
int pzero =pnew,int pglobal =0,int overlap =0,int overlapv=overlap,
bint divide =False,int badsad =10000,int badrange =24, bint opt =True,
bint meander =True, bint trymany=False, bint fields =False, bint tff ,
int search_coarse=3,int dct =0]
)
mv.BlockFPS(clip clip, clip super, clip mvbw, clip mvfw[, int num=25, int den=1, int mode=3, float ml=100.0, bint blend=True, int thscd1=400, int thscd2=130, bint opt=True])
'''
if (container_fps <= 30):
vfps,vden = ffps(container_fps)
print(container_fps, vfps, vden)
clip = core.std.AssumeFPS(clip, fpsnum=vfps, fpsden=vden)
_super= core.mv.Super(clip, pel=2, sharp=1, rfilter=4,hpad=8,vpad=8,levels=0)
mvbw = core.mv.Analyse(_super, 64, 64, 0,
4, 0,3, True,
0,
lsad=10000,
overlap=0,overlapv=18,
badrange=0,badsad=10000,
dct=0,
search_coarse=4,
)
mvfw = core.mv.Analyse(_super, 64, 64, 0,
4, 0,3, False,
0,
lsad=10000,
overlap=0,overlapv=18,
badrange=0,badsad=10000,
dct=0,
search_coarse=4,
)
''' bvec = core.mv.Analyse(_super,blksize=32,blksizev=16,overlap=16,overlapv=8,
levels=0,isb=True,
pelsearch=4,search=4,searchparam=0,
badrange=1,badsad=100000,
#lambda=400,
#truemotion=False
#divide=True,
#dct=7,
#pzero=110
)
#blksize=32,blksizev=16,overlap=16,overlapv=2,
#blksize=32,blksizev=16,overlap=16,overlapv=8,
#[(i,1080-int(1080/(64-i))*(64-i)-i ) for i in range(0,33,2)]
#4x4, 8x4, 8x8, 16x2, 16x8, 16x16, 32x16, 32x32, 64x32, 64x64, 128x64, or 128x128
fvec = core.mv.Analyse(_super,blksize=32,blksizev=16,overlap=16,overlapv=8,
levels=0,isb=False,
pelsearch=4,search=4,searchparam=0,
badrange=1,badsad=100000,
#lambda=400,
#truemotion=False
#divide=True,
#dct=7,
#pzero=110
)
'''
#clip = core.mv.FlowFPS(clip,_super,mvbw,mvfw,num=dfps,den=vden,mask=0,ml=100.0,thscd1=970,thscd2=255,blend=False)
clip = core.mv.BlockFPS(clip,_super,mvbw,mvfw,num=dfps,den=vden,mode=2,ml=100.0,thscd1=970,thscd2=255,blend=False)
clip.set_output()
#_super.set_output()
#core.mv.SCDetection(sup,bvec).set_output()
页:
[1]
2