Add libopenh264 software (CPU) H.264 fallback to the Windows build - #2
Merged
Conversation
Remove a dangling cross-reference to a README section that no longer exists. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MSYS2 links openh264 as libopenh264-7.dll (its import lib wins over the static archive), so the transitive import audit correctly rejected the unbundled DLL. Ship it alongside ffmpeg.exe with its BSD-2-Clause license, the same way libvpl-2.dll is bundled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enables
--enable-libopenh264in the Windows build so hosts with no usable GPU encoder (NVENC / QSV / AMF all fail to initialize) can still encode H.264 in software, instead of hard-failing. Consumers (e.g. Polycast) auto-fall-back to it and warn the user that quality/throughput are reduced.Licensing
OpenH264 is BSD-2-Clause, so this stays LGPL-clean —
--enable-libopenh264is not--enable-gpl/--enable-nonfree/--enable-version3, so it does not trip the post-link forbidden-flag guardrail. It is statically linked via the MSYS2mingw-w64-x86_64-openh264package (which shipslibopenh264.a) with the existing--pkg-config-flags=--static, so no new runtime DLL is added; the C++ runtime it needs (libstdc++-6.dll) is already in the bundle closure via libvpl.Changes
scripts/build-windows.sh:--enable-libopenh264,libopenh264added to the encoder allowlist, openh264 pkg-config dependency check, and the symbol-presence verification..github/workflows/build.yml: addmingw-w64-x86_64-openh264to the MSYS2 install list.README.md: document the CPU-fallback encoder.What CI verifies here
The symbol-presence check fails the build if
libopenh264didn't compile in, and the transitive DLL-import audit fails if openh264 unexpectedly pulled in an unbundled DLL — so a green run confirms the encoder is present and the artifact is still fully self-contained. macOS is unchanged (VideoToolbox is always present there).🤖 Generated with Claude Code