Skip to content

calibrax.metrics.plugins.video¤

Optional video quality metrics backed by external video tooling.

External FFmpeg Requirement

vmaf_score requires an ffmpeg executable built with Netflix libvmaf support. No Python package extra installs this system dependency.

Video quality metrics backed by optional external tools.

vmaf_score(reference: str | Path, distorted: str | Path, *, model: str | None = None) -> float ¤

Compute VMAF using FFmpeg with libvmaf JSON logging.

Parameters:

Name Type Description Default
reference str | Path

Reference video path.

required
distorted str | Path

Distorted video path.

required
model str | None

Optional libvmaf model expression, such as "version=vmaf_v0.6.1".

None

Returns:

Type Description
float

Mean pooled VMAF score. Higher is better.

Raises:

Type Description
FileNotFoundError

If either video path does not exist.

RuntimeError

If FFmpeg/libvmaf cannot run successfully.

ValueError

If FFmpeg does not produce a valid VMAF JSON log.