This repository contains the configuration files and scripts to enable real-time 2x frame interpolation in mpv using VapourSynth and the ncnn-Vulkan RIFE engine. It is optimized for hybrid-graphics laptops (e.g., AMD iGPU + NVIDIA RTX 3050).
Copy these files to your mpv configuration directory:
mpv.conf->mpv.confrife_interp.vpy->rife_interp.vpyrife_settings.json->rife_settings.jsonscripts/rife_toggle.lua->scripts/rife_toggle.lua
-
Install core packages and AUR plugins:
sudo pacman -S mpv vapoursynth ncnn yay -S vapoursynth-plugin-rife-ncnn-vulkan vapoursynth-plugin-misc-git
-
Symlink VapourSynth Plugins (Python 3.14+):
sudo ln -sf /usr/lib/vapoursynth/librife.so /usr/lib/python3.14/site-packages/vapoursynth/plugins/librife.so sudo ln -sf /usr/lib/vapoursynth/models /usr/lib/python3.14/site-packages/vapoursynth/plugins/models
-
VapourSynth Python Initialization Fix: Run
vapoursynth configto write the base file, then edit/home/USERNAME/.config/vapoursynth/vapoursynth.tomlto add system library path mappings:"/usr/lib/python3.14/site-packages/vapoursynth/libvsscript.so" = ["/usr/bin/python","/usr/lib/libpython3.14.so.1.0"] "/usr/lib/libvapoursynth-script.so.0" = ["/usr/bin/python","/usr/lib/libpython3.14.so.1.0"] "/usr/lib/libvapoursynth-script.so" = ["/usr/bin/python","/usr/lib/libpython3.14.so.1.0"]
-
Install Termux & Termux-X11:
- Install Termux (get the APK from F-Droid or GitHub).
- Install Termux-X11 (available on GitHub under
termux/termux-x11).
-
Install Ubuntu container in Termux:
pkg update && pkg upgrade -y pkg install proot-distro -y proot-distro install ubuntu proot-distro login ubuntu -
Install GPU Drivers (Mesa Turnip + Zink) inside Ubuntu:
apt update && apt upgrade -y apt install mesa-vulkan-drivers vulkan-tools -y -
Install mpv, VapourSynth, & compile the RIFE plugin:
# Enable universe repository apt install software-properties-common -y add-apt-repository universe apt update # Install compilers and tools apt install mpv vapoursynth python3-pip git cmake g++ meson ninja-build -y # Compile RIFE ncnn-Vulkan git clone --recursive https://github.com/styler00dollar/VapourSynth-RIFE-ncnn-Vulkan.git cd VapourSynth-RIFE-ncnn-Vulkan meson setup build --buildtype=release -Duse_system_ncnn=false meson compile -C build meson install -C build
-
Copy configurations: Copy these configuration files into the container's
/root/.config/mpv/directory. -
Run the player: Start Termux-X11 on your phone, then run:
termux-x11 :1 & export DISPLAY=:1 mpv --vo=gpu --gpu-context=x11vk "video.mp4"
-
Install Python & VapourSynth:
- Install Python 3.12 or 3.11 from
python.org(make sure to check "Add Python to PATH"). - Install VapourSynth (.exe installer) from
vapoursynth.com.
- Install Python 3.12 or 3.11 from
-
Install RIFE ncnn-Vulkan plugin:
- Download the Windows release zip from VapourSynth-RIFE-ncnn-Vulkan Releases.
- Copy
rife.dlland themodelsfolder toC:\Program Files\VapourSynth\plugins\(or%APPDATA%\VapourSynth\plugins\).
-
Set up mpv:
- Download the portable windows build of
mpvfrommpv.ioand extract it.
- Download the portable windows build of
-
Copy configurations:
- Press
Win+R, type%APPDATA%and open thempvfolder. - Copy
mpv.conf,rife_interp.vpy,rife_settings.json, andscripts/rife_toggle.luainto%APPDATA%\mpv\.
- Press
Open your video file using mpv:
- Linux/Android:
mpv video.mp4 - Windows: Drag & drop video file onto
mpv.exe
Ctrl+I: Toggle Frame Interpolation instantly on/off.Ctrl+M: Open the Interactive Settings Menu overlay.- Use
Up/Downarrow keys to navigate the menu options. - Use
Left/Rightarrow keys to change the value (e.g. adjust thread counts or choose models). - Press
Enterto save settings and reload the filter graph immediately. - Press
Escto close the overlay.
- Use