From 2508c9bd4d98068e2509b0eca1a90dc57ab78298 Mon Sep 17 00:00:00 2001 From: zackees Date: Thu, 9 Jul 2026 15:07:09 -0700 Subject: [PATCH] feat: enable ffmpeg-bins2 manifest by default (full-feature 8.1.2 for macOS/Linux) Point DEFAULT_MANIFEST_URL at the published ffmpeg-bins2 catalog. macOS x64/arm64 and glibc-Linux x64/arm64 now resolve to the new full-feature (GPL+nonfree 8.1.2) build, sha256-verified. Windows and musl are not in the catalog yet (pending forge build fixes) and, together with any fetch/parse failure, fall back to the legacy ffmpeg_bins URLs -- so nothing regresses. - manifest.example.json: drop glibc217 naming (linux_x64/linux_arm64) - tests: default URL now points at ffmpeg-bins2 Co-Authored-By: Claude Opus 4.8 --- manifest.example.json | 8 ++++---- static_ffmpeg/manifest.py | 11 +++++++---- tests/test_manifest.py | 6 +++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/manifest.example.json b/manifest.example.json index ae371a2..a760de0 100644 --- a/manifest.example.json +++ b/manifest.example.json @@ -54,21 +54,21 @@ { "platform": { "os": "linux", "arch": "x86_64", "libc": "glibc" }, "asset": { - "filename": "linux_x64_glibc217.zip", + "filename": "linux_x64.zip", "sha256": "0000000000000000000000000000000000000000000000000000000000000000", "size_bytes": 0, "media_type": "application/zip", - "urls": ["https:///ffmpeg/8.0.0/linux_x64_glibc217.zip"] + "urls": ["https:///ffmpeg/8.0.0/linux_x64.zip"] } }, { "platform": { "os": "linux", "arch": "arm64", "libc": "glibc" }, "asset": { - "filename": "linux_arm64_glibc217.zip", + "filename": "linux_arm64.zip", "sha256": "0000000000000000000000000000000000000000000000000000000000000000", "size_bytes": 0, "media_type": "application/zip", - "urls": ["https:///ffmpeg/8.0.0/linux_arm64_glibc217.zip"] + "urls": ["https:///ffmpeg/8.0.0/linux_arm64.zip"] } }, { diff --git a/static_ffmpeg/manifest.py b/static_ffmpeg/manifest.py index 547ec8a..948e967 100644 --- a/static_ffmpeg/manifest.py +++ b/static_ffmpeg/manifest.py @@ -34,10 +34,13 @@ import requests # type: ignore -# Empty by default: current/legacy behaviour is preserved byte-for-byte until -# ffmpeg-bins2 + CDN are live. Override via the environment for early adopters -# and tests, or set this constant once the catalog is published. -DEFAULT_MANIFEST_URL = "" +# Published ffmpeg-bins2 catalog. Resolution is still best-effort: platforms not +# listed here (currently Windows and musl -- pending forge build fixes) and any +# fetch/parse failure fall back to the legacy hard-coded URLs, so existing and +# unlisted-platform installs are never broken. Override via the environment. +DEFAULT_MANIFEST_URL = ( + "https://raw.githubusercontent.com/zackees/ffmpeg-bins2/main/manifest.json" +) # The channel a fresh install pulls from. Existing installs pin their resolved # version in installed.crumb and are never silently upgraded. diff --git a/tests/test_manifest.py b/tests/test_manifest.py index 32f2378..24debf9 100644 --- a/tests/test_manifest.py +++ b/tests/test_manifest.py @@ -109,7 +109,11 @@ def test_disabled_manifest_returns_none(self) -> None: # An empty manifest URL means resolution is disabled: it must be a # no-op that returns None so the caller falls back to the legacy URL. self.assertIsNone(manifest.resolve_asset(url="")) - self.assertEqual(manifest.DEFAULT_MANIFEST_URL, "") + + def test_default_manifest_url_points_at_ffmpeg_bins2(self) -> None: + # The published catalog is the ffmpeg-bins2 manifest. + self.assertIn("ffmpeg-bins2", manifest.DEFAULT_MANIFEST_URL) + self.assertTrue(manifest.DEFAULT_MANIFEST_URL.endswith("manifest.json")) def test_example_manifest_resolves_all_eight_targets(self) -> None: # The shipped example manifest documents the client contract; every one