View Full Version : Using VS with MPV.. How?
TicTakToe
23rd May 2023, 14:22
I would like to use Vapoursynth with the MPV media player but have no idea how to do this. I have searched online for an answer but all info I have seen seems contradictory. I thought by asking here you guys might be better help. Anyway, thanks.
hello_hello
23rd September 2023, 14:30
A very late reply, but because I very recently messed around getting this to work, if you still need an answer or it's helpful to someone else....
For the MPV player itself, you need to determine the location where a configuration file for MPV should be located.
I've no clue for Windows, but for my Linux distro it's /home/YourUserName/.config/mpv/
You'll need to enable the display of hidden files and folders to see the .config folder.
The configuration file should be saved as mpv.config.
I was recently playing around with a Vapoursynth version of my FrostyBorders function, so I'll use it as an example.
This is my configuration file. The second last line is the Vapoursynth script as a filter. It's a Linux file path to the script.
vo=gpu
profile=gpu-hq
scale=ewa_lanczossharp
cscale=bicubic
dscale=mitchell
deband=no
video-sync=display-resample
interpolation=yes
tscale=oversample
vf="vapoursynth=/media/Drive1/Frosty.py"
af="dynaudnorm=f=150"
The "Frosty" script itself that applies the function is simply this, but obviously other functions can used in the same manner.
import vapoursynth as vs
vc = vs.core
import FrostyBorders as FB
clip = video_in
clip = FB.FrostyBorders(clip, 1280,720, CropDAR=1.5, TCRatio=0.3)
clip.set_output()
MPV front-ends such as SMPlayer can be difficult about adding a VapourSynth script to their command lines, and generally they use their own configuration files rather than the MPV one.
For SMPlayer at least, a script can be added, but not as a video filter (I couldn't find a way to add it as a filter that SMPlayer understood). It can be added as a general MPV option in the following manner though.
--vf-add="vapoursynth=/media/Drive1/Frosty.py"
A screenshot with the script added to the end of the "options" section.
https://imgur.com/ByLbvJ1.png
stax76
4th December 2023, 08:20
There is a small tutorial here:
https://github.com/mpvnet-player/mpv.net/wiki/Using-VapourSynth-in-mpv.net
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.