feat(video): alias "av1" to "libsvtav1" for backward compat

This commit is contained in:
CarolinePascal
2026-04-26 13:55:36 +02:00
parent 2c796d3352
commit 5d0a20bd9c
2 changed files with 18 additions and 0 deletions

View File

@@ -311,6 +311,18 @@ class TestEncoderDetection:
assert "h264_videotoolbox" in VALID_VIDEO_CODECS
assert "h264_nvenc" in VALID_VIDEO_CODECS
def test_av1_alias_resolves_to_libsvtav1(self):
"""Older datasets persist ``vcodec="av1"``; backward-compat alias must keep them loadable."""
cfg = VideoEncoderConfig(vcodec="av1")
assert cfg.vcodec == "libsvtav1"
def test_av1_alias_persisted_after_resolve(self):
"""Repeated calls to ``resolve_vcodec`` should be idempotent (alias only fires once)."""
cfg = VideoEncoderConfig(vcodec="av1")
assert cfg.vcodec == "libsvtav1"
cfg.resolve_vcodec()
assert cfg.vcodec == "libsvtav1"
ARTIFACTS = Path(__file__).parent.parent / "fixtures" / "artifacts" / "videos"