English | Русский
Step-by-step guide for setting up a fully portable build for real-time video interpolation with RIFE in MPV.
Important
This guide is aimed at NVIDIA RTX on Windows, so interpolation.vpy uses Backend.TRT (TensorRT) — the fastest backend for NVIDIA RTX cards.
Warning
On an RTX 3070 (no undervolt or OC, 240w) with TensorRT, real-time interpolation is available for:
x2: source ≤ 1080p ~30 fps -any base model; source == 1440p ~24 fps -4.17_v2_light, 4.6v2.x3: source ≤ 1080p ~30 fps4.4v2;
For weaker cards, you may want to consider alternatives:
- Lossless Scaling
- SVP (optical flow interpolation)
- Interpolation to a file, then watch it later:
- Flowframes
- enhancr
- Send VapourSynth output to
ffmpeg, then usemkvtoolnixto replace the video track in the original.mkv
C:\MPV_VS\ ← root (path with no spaces or Cyrillic)
├── MPV\
│ ├── mpv.exe ← mpv player
│ └── portable_config\ ← mpv config
│ ├── mpv.conf
│ ├── input.conf
│ └── vs\
│ └── interpolation.vpy
│
└── VS\ ← Python + VapourSynth + vs-mlrt
├── python.exe
├── pythonYYY.dll
├── pythonYYY._pth ← edited (step 1)
├── pythonYYY.zip
├── pip.pyz ← for pip (step 2)
├── Lib\site-packages\ ← (step 3.1)
│ └── vapoursynth\...
├── portable.vs ← from VS Portable archive (step 3)
├── VSScript.dll ← from VS Portable archive (step 3)
├── VSPipe.exe ← from VS Portable archive (step 3)
├── other VapourSynth files
├── vs-coreplugins\
├── vsmlrt.py ← (step 4.2)
├── vs-plugins\ ← extracted vs-mlrt (step 4.1)
│ ├── vstrt.dll / vsort.dll ← depends on backend
│ ├── LSMASHSource.dll ← (step 4.3)
│ ├── other backend DLLs
│ └── models\
│ └── rife\ ← RIFE models (step 4.4)
│ ├── rife_v4.17_lite.onnx
│ └── rife_v4.25.onnx
├── sdk\
└── wheel\
└── vapoursynth-XX-cpYYY-abi3-win_amd64.whl
Warning
AT LEAST the version in the VapourSynth wheel filename. For example: for VapourSynth64-Portable-R73.zip → wheel → vapoursynth-73-cp312-abi3-win_amd64.whl, the minimum Python version is 3.12. For vapoursynth-73-cp38-cp38-win_amd64.whl, cp38-cp38 means Python 3.8 only.
- Download Python 3.xx.x → "Windows embeddable package (64-bit)" from python.org
- Extract it to
C:\MPV_VS\VS\ - Required: edit
python312._pth— uncomment the last line:
python312.zip
.
-#import site
+import site
+Lib/site-packages
⚠️ Without this, pip will not be able to install packages, and the interpreter will not seesite-packages.
- Download pip.pyz and put it in
C:\MPV_VS\VS\
- Download the latest VapourSynth Portable (
.zip) - Extract it to
C:\MPV_VS\VS\— this will create subfolders likesdk\,vs-plugins\,wheel\,vsgenstubs4...
Open cmd in C:\MPV_VS\VS\ and run:
python.exe pip.pyz install wheel/vapoursynth-XX-cpYYY-abi3-win_amd64.whl
⚠️ ReplaceXX-cpYYYwith your downloaded VS version. The exact filename is inwheel\.
Important
For ORT CUDA and TensorRT, the NVIDIA driver version must match the requirements of the specific vs-mlrt release.
Check the release notes.
For example, vs-mlrt v15.15 requires CUDA 13, which means NVIDIA >= 581.80.
Download vsmlrt-windows-x64-tensorrt.v*.7z.001 and vsmlrt-windows-x64-tensorrt.v*.7z.002 from vs-mlrt releases.
Extract them to C:\MPV_VS\VS\vs-plugins\.
vsmlrt.py is included in the backend archive and after extraction will be in vs-plugins\.
It must be moved one level up — to C:\MPV_VS\VS\, so the Python interpreter can import it:
C:\MPV_VS\VS\vs-plugins\vsmlrt.py → C:\MPV_VS\VS\vsmlrt.py
Download the DLL files from each plugin release and put them in C:\MPV_VS\VS\vs-plugins\:
L-SMASH-Works LSMASHSource.dll
You only need the
*.dllfile from the archive — everything else can be skipped.
Download and extract the ONNX files to C:\MPV_VS\VS\vs-plugins\models\rife\
More versions (for example rife_v4.26, rife_v4.25_heavy):
External Models.
Extract them with folder structure preserved to C:\MPV_VS\VS\vs-plugins\models\:
C:\MPV_VS\VS\vs-plugins\models\rife\rife_v4.25.onnx
C:\MPV_VS\VS\vs-plugins\models\rife_v2\rife_v4.25.onnx
Tip
In my internal tests, v2 versions are ~17-23% faster.
Add C:\MPV_VS\VS\ to PATH so vspipe and python are available from any folder.
Option A — via PowerShell (recommended):
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User"); [Environment]::SetEnvironmentVariable("PATH", "$userPath;C:\MPV_VS\VS\", "User")Option B — via GUI:
Win + R → systempropertiesadvanced → "Environment Variables" → Path (user) → "New" → C:\MPV_VS\VS\
Option C — via cmd:
Warning
The setx command truncates PATH to 1024 characters. If your PATH is long, use option A or B.
setx PATH "%PATH%;C:\MPV_VS\VS\"After changing PATH, you must restart the terminal for the changes to take effect.
- Download mpv
- Extract it to
C:\MPV_VS\MPV\ - Create these folders:
C:\MPV_VS\MPV\portable_config\
C:\MPV_VS\MPV\portable_config\vs\
If
portable_configexists next tompv.exe, mpv uses it instead of%AppData%\mpv. In configs,~~/will point toportable_config\.
Important
The MPV-Config repo also includes a custom MPV config.
Tip
Using TRT_RTX instead of TRT is not worth it — performance is lower, RGBH and fp16 are unavailable,
the portable setup becomes more complicated, and the faster engine compile time is not a meaningful gain for end users.
Choose how to enable interpolation:
auto- turns interpolation on at startup for all sources<= 1080p30fpsmanual- enable it manually withF1
Download and place these files:
interpolation.vpy— ready-to-use TensorRT interpolation script forNVIDIA RTX
⚠️ by default, the script uses therife_v4.25model; if playback does not work, use a lighter RIFE model.
| File | Mode | Put here |
|---|---|---|
| interpolation.vpy | all | C:\MPV_VS\MPV\portable_config\vs\ |
| mpv.conf | auto |
C:\MPV_VS\MPV\portable_config\ |
| mpv.conf | manual |
C:\MPV_VS\MPV\portable_config\ |
| input.conf | manual |
C:\MPV_VS\MPV\portable_config\ |
Warning
The first run may take a long time (up to 5 minutes) because the engine is being compiled. Please be patient.
If MPV does not work for you for any reason, you can use MPC-HC:
- download it
- Extract it to
C:\MPV_VS\MPC-HC\ - Download the interpolation script interpolation.vpy and put it in
C:\MPV_VS\MPC-HC\_vapoursynth - download SynthFilters.zip and extract
vapoursynth_filter_64.axfrom the archive toC:\MPV_VS\MPC-HC\_vapoursynth - download vapoursynth_filter.ini and put it in
C:\MPV_VS\MPC-HC - Start
MPC-HCand open settings:External filters:- click
Add filter->Browseand selectC:\MPV_VS\MPC-HC\_vapoursynth\vapoursynth_filter_64.ax - select the added
VapourSynth Filterand enablePrefer - double-click
VapourSynth Filterto open filter settings, then clickBrowseand select the interpolation script interpolation.vpy
- click
Internal filters -> Video decoder- first try Hardware decoder:
d3d11and Hardware Device to use:Automatic(CopyBack). - if
d3d11does not work, select Hardware decoder:DXVA2(copy-back)and Hardware Device to use:Automatic
- After saving the settings, the filter will be applied automatically the next time you play a video.
Warning
In MPC, the filter is applied to all content. Because of that, the script is different from the one used for MPV and includes checks for screen resolution and the maximum supported source fps. The MAX_FPS_ values in the script need to be tuned for your system, because the defaults may limit what your hardware can do.
Tip
If you run into setup issues, feel free to open an issue.