vapoursynth-cambi
Contrast Aware Multiscale Banding Index (CAMBI) as a VapourSynth plugin. This is a pure Rust+VapourSynth implementation of Netflix's banding detection algorithm without a dependency on libvmaf.
Install
pip install vapoursynth-cambi
API
cambi.Cambi(
clip: vs.VideoNode,
window_size: int = 65,
topk: float = 0.6,
tvi_threshold: float = 0.019,
max_log_contrast: int = 2,
eotf: int = 0,
prop: str = "CAMBI",
scores: bool = False,
scaling: float = 1.0 / window_size,
) -> vs.VideoNode
Calculates the CAMBI score of each frame of clip and stores it in the frame
property named prop.
clip— Constant format 10-bit integer clip.window_size— Window size to compute CAMBI. Note that libvmaf's documented default is 63 but internally it actually uses 65, so this plugin defaults to 65 as well.topk— Ratio of pixels for the spatial pooling computation.tvi_threshold— Visibility threshold for luminance ΔL < tvi_threshold*L_mean for BT.1886.max_log_contrast— Maximum contrast in log luma level (2^max_log_contrast) at 10-bit. Default 2 is equivalent to 4 luma levels at 10-bit.eotf— Electro-optical transfer function.Value Description 0 Determine from the _Transferframe property.1 ITU-R BT.1886. 2 Perceptual quantizer (SMPTE ST 2084). prop— Name of the frame property to store the CAMBI score in.scores— WhenTrue, attach the per-pixel c-score map for each scale as a GRAYSVideoFramein frame propertiesCAMBI_SCALE0throughCAMBI_SCALE4.scaling— Factor multiplied into every c-value written to the score map frames. By default uses the rawwindow_size. Only meaningful whenscores=True.
Benchmark
With warm caches, this plugin is about 2.7 times faster than akarin.Cambi() on
1080p clips (222.3 fps vs. 80.5 fps over 10 runs of 1001 frames each).
from vstools import core, initialize_clip, set_output, vs
core.set_affinity(16)
src = core.bs.VideoSource(r"/path/to/1080p_video.m2ts")
src = initialize_clip(src, bits=10)
set_output(core.cambi.Cambi(src, window_size=65))
set_output(core.akarin.Cambi(src, window_size=65))
$ hyperfine --warmup 1 'vspipe test.py --end 1000 -o {output_node} .' -P output_node 0 1
Benchmark 1: vspipe test.py --end 1000 -o 0 .
Time (mean ± σ): 4.502 s ± 0.043 s [User: 53.877 s, System: 4.763 s]
Range (min … max): 4.450 s … 4.575 s 10 runs
Benchmark 2: vspipe test.py --end 1000 -o 1 .
Time (mean ± σ): 12.435 s ± 0.080 s [User: 183.298 s, System: 2.283 s]
Range (min … max): 12.342 s … 12.570 s 10 runs
Summary
vspipe test.py --end 1000 -o 0 . ran
2.76 ± 0.03 times faster than vspipe test.py --end 1000 -o 1 .
Build
Rust v1.100.0-nightly and cargo may be used to build the project. Older versions will likely work fine but they aren't explicitly supported.
$ git clone https://github.com/sgt0/vapoursynth-cambi.git
$ cd vapoursynth-cambi
# Debug build.
$ cargo build
# Release (optimized) build.
$ cargo build --release
# Release build optimized for the host CPU.
$ RUSTFLAGS="-C target-cpu=native" cargo build --release
Metadata
Release files for vapoursynth-cambi 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vapoursynth_cambi-1.4.0.tar.gz | 28.7 kB | With provenance | Details for vapoursynth_cambi-1.4.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| vapoursynth_cambi-1.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for vapoursynth_cambi-1.4.0-py3-none-win_amd64.whl |
| vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_x86_64.whl |
| vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_aarch64.whl |
| vapoursynth_cambi-1.4.0-py3-none-macosx_13_0_arm64.whl | Python 3 | none | macOS 13.0+ ARM64 | Details for vapoursynth_cambi-1.4.0-py3-none-macosx_13_0_arm64.whl |
Total release size: 1.2 MB
Release files / vapoursynth_cambi-1.4.0.tar.gz
| Download URL | vapoursynth_cambi-1.4.0.tar.gz |
|---|---|
| Size | 28.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f40bc55881959cbbcf6dd9c36c9ceebf34229c6647f05e66a53f579354aa3b22
|
|
BLAKE2b-256 checksum How to use checksums |
addaa2a78d65ebd523eb33ed088a3b358d79d37401d3d252508b79263109c511
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / vapoursynth_cambi-1.4.0-py3-none-win_amd64.whl
| Download URL | vapoursynth_cambi-1.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 254.6 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8aba6decad6b95c243c0aa7ef74e76aa09a559a3d402afc17a433101603611aa
|
|
BLAKE2b-256 checksum How to use checksums |
2c988c4f6f0c0264ecdfd474e7741bbd6bd840205c117231b6f500eb5942f3bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 551.8 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c1a96d9ad34a277e6a101bbc85b7e6f7f14405f8f24277c51f96cb89ca672c1e
|
|
BLAKE2b-256 checksum How to use checksums |
ca9ddb50742b127f4826dde2f4be61fc398018eb999d38e71731eadee4cdb9a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | vapoursynth_cambi-1.4.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 184.8 kB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
8124ed04cb6885243675360cfd5227f12eeb7673ec1c9f38f878d2192354557e
|
|
BLAKE2b-256 checksum How to use checksums |
afb62758827346d713ff6240cb5e54b1162e4b0da99d32aa2803cb9dca77cbfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / vapoursynth_cambi-1.4.0-py3-none-macosx_13_0_arm64.whl
| Download URL | vapoursynth_cambi-1.4.0-py3-none-macosx_13_0_arm64.whl |
|---|---|
| Size | 171.2 kB |
| Tags | Python 3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f23ead2efa374fc9bd5c81d95a85ec6d8c32f516a8f46c8c7451c0f8b6add9fb
|
|
BLAKE2b-256 checksum How to use checksums |
043433606c834c10f6befc7588e0707c54218ff3368676ba195a690f3e04337b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logSecurity for vapoursynth-cambi 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for vapoursynth_cambi-1.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.