vsflip is a Python wrapper for VapourSynth that enables perceptual video comparison using the FLIP metric. It computes frame-by-frame error maps that quantify visual differences between a reference and a test video.
This wrapper integrates the flip Python library and works entirely within VapourSynth pipelines.
- Frame-by-frame FLIP comparison between two
VideoNode. - Outputs GrayscaleS error maps where darker pixels indicate better perceptual similarity.
- Supports both
LDRandHDRevaluation modes. - Optionally exports error maps as images (
.png).
- Python ≥ 3.13
- VapourSynth R71 or newer
- NumPy
- Matplotlib
- flip
You can install vsflip via pip:
pip install vsflipfrom vsflip import vsflip_frame, vsflip_video
# Compare the first frame of two clips
result = vsflip_frame(ref_clip, test_clip)
# Compare all frames (must be aligned and same length)
result = vsflip_video(ref_clip, test_clip)-
Both functions return a VideoNode (GRAYS format).
-
Refer to the Python docstrings for detailed parameter descriptions and options.
To help understand the various screen resolution, distance, etc., I have created a set of presets called FlipParams. Check the docstring and the function itself for more info.
This project is licensed under the MIT License. See the LICENSE file for details.
This project uses the FLIP metric python wrapper by NVIDIA, which is licensed under the BSD 3-Clause License.
The flip library's source code or binaries are not bundled with this project. It is installed separately as a required runtime dependency.
- Hoping that Nvidia hasn't dropped the project, I want to create the Python wrapper and the Vaporsynth implementation for the CUDA version as well. I actually tried, but I miserably failed... Any help is appreciated.
For questions, bugs, or feature requests, feel free to open an issue or pull request.