An mpv script for Windows that provides SVP frame interpolation without having to use the official GUI. Comes with a menu for direct control:
SVP converts any video to 60+ FPS in real time as you watch it, with GPU acceleration supported. It can also fill black bars with lights when the monitor's aspect ratio and the video's differ.
This script makes use of the last SVPFlow DLL versions that could be extracted from the demo and used without requiring the GUI to be running. The LICENSE.txt in this repository does not cover the files in the third_party directory.
Not implemented:
- Basic performance-quality slider (from looking at the original GUI's generated scripts, most levels changed absolutely nothing)
- RIFE AI interpolation (too slow and complicated for little gained)
- Automatic cropping of baked-in black bars (try dynamic-crop.lua)
- Phoning home
-
VapourSynth Support: Your mpv build must support VapourSynth. This works out of the box with:
-
Version Compatibility: VapourSynth R72 and VapourSynth R54 are confirmed to work with:
- mpv 0.41 or mpv.net v7.1.2.0
- mpv 0.37 or mpv.net v7.1.1.0
Run this in PowerShell to launch the interactive installer:
irm https://raw.githubusercontent.com/Brobeda/svp4mpv/master/install.ps1 | iexClone this repository or click Code → Download ZIP. Extract the files into your mpv scripts directory:
- Windows:
%APPDATA%\mpv\scripts\svp4mpv
- Go to the VapourSynth R72 release page.
- Download these two files:
Install-Portable-VapourSynth-Rxx.batInstall-Portable-VapourSynth-R72.ps1
- Create a new folder named
vapoursynth-portable. - Place both downloaded files into that folder.
- Run
Install-Portable-VapourSynth-Rxx.batto generate the portable environment. - When prompted to install R72 or the latest stable release, choose R72.
Choose one of the following three options:
-
Option 1 (Recommended): Place inside the script folder
Move the entirevapoursynth-portablefolder into your script directory:
%APPDATA%\mpv\scripts\svp4mpv\
(Optionally, you can renamevapoursynth-portabletovapoursynth) -
Option 2: Place in the mpv root directory
Move all files and folders contained insidevapoursynth-portabledirectly into the mpv root directory wherempv.exe(ormpvnet.exe) is located. -
Option 3: Add to system PATH
⚠️ Warning: Using this method may cause version conflicts with other software on your system that relies on VapourSynth, as this setup requires an older/specific version.To add the portable folder to your user environment variables, open PowerShell and run (replace
C:\vapoursynth-portablewith your actual path):[Environment]::SetEnvironmentVariable("Path", "C:\vapoursynth-portable" + ";" + [Environment]::GetEnvironmentVariable("Path","User"),"User")
Alt+Shift+s script-binding svp4mpv/svp-menu
You can change the hotkey to whatever you like.
⚠️ Warning: Left Alt + Shift toggles Switch Input Language in Windows. Another hotkey is recommended if you use multiple keyboard layouts.
If using hardware-accelerated video playback in mpv, the -copy version of
the decoder must be used, e.g. hwdec=d3d11va-copy instead of hwdec=d3d11va.
If you have UOSC installed, you can add a button to your UOSC menu.
- Open
script-opts\uosc.confand look for the line starts withcontrols=. - Add
command:slow_motion_video:script-binding svp4mpv/svp-menu?SVP,gapat the desired position.
For example:
controls=menu,gap,<video,audio>subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,gap,command:slow_motion_video:script-binding svp4mpv/svp-menu?SVP,gap,space,<video,audio>speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen
- Press Alt+Shift+S to open the menu
- Press Enter to toggle interpolation on or off
- Navigate options with the arrow keys or HJKL, reset selected with R
- Press A to apply changes immediately
- Changes are forgotten when mpv is closed unless you press S, then a file will be created in mpv's script-opts folder to remember your choices.
- Press Escape or Q to close the menu.
More details about the options can be found on the
SVP wiki.
If you're in a hurry, try the settings from the above screenshot for maximum
smoothness (the * indicates non-default settings).
For options in the "Rendering" and "Motion vectors" sections, the choices
are ordered from least (left) to most (right) CPU cost.
The default multiplicand/multiplier settings pair try to be smart, for example: if you play a 24 FPS video on a 75hz screen, the script will multiply the framerate by exactly 3x to reach 72 FPS, as integer multipliers tend to give better results and 72 is right under 75.
However, if the screen is 60hz instead, then the multiplier will be 2.5 to reach exactly 60 FPS, since forcing 72 would cause stutter from dropped frames and the smoothness gained from 60 FPS in my opinion outweighs the benefits of using a 2x integer multiplier and getting only 48 FPS.
Most 60hz monitors can be easily overclocked to at least 72hz, which will make a noticeable difference for SVP.
If you have multiple monitors with different framerates, you may need to use mpv in full screen to avoid dropped frames.
Also note that if mpv is moved to another monitor, or the monitor's refresh rate is changed while mpv is open, mpv may stay stick with the old value, causing interpolation to target the wrong framerate. On laptops, beware of automatic changes on AC un/plugging (this can usually be disabled in your graphic chip's control panel).
The menu displays a dropped frames/second estimation (averaged over the last 4 seconds) on the bottom, which should stay at/near 0 for smooth playback.
For weak hardware, the mpv rendering options can make a large difference. Hardware acceleration might actually degrade performance, e.g. with old Intel HD chips. Baseline settings to try:
vo=gpu-next
libplacebo-opts=preset=fast
hwdec=noGPU acceleration and 10bit decoding in the SVP menu are important too. After that, the Motion Vectors section make the most difference. For animated content, using a larger motion vectors grid value (e.g. 24px) is essentially a free performance and quality increase.
