fix(engine): support current FFmpeg filter scripts#2324
Open
miguel-heygen wants to merge 1 commit into
Open
Conversation
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
Audio mixing now works on current FFmpeg nightlies without giving up compatibility with older stable installations or reintroducing Windows command-line overflow for large track counts.
Why
FFmpeg removed the deprecated
-filter_complex_scriptalias from nightly builds. HyperFrames therefore emitted a video-only fallback even though the same filter graph is valid through FFmpeg's replacement-/filter_complex <file>syntax. Older FFmpeg builds do not recognize that replacement, so switching unconditionally would break existing users.How
The mixer keeps the legacy file-valued option as its first attempt and retries with
-/filter_complexonly when stderr explicitly reports thatfilter_complex_scriptis unavailable. Both paths use the same temporary graph file, keeping 100+ track graphs off argv, and cleanup still runs after either attempt.Test plan
Unrecognized option 'filter_complex_script'on FFmpeg nightlyN-125551-/filter_complexsucceeds on the identical nightly graph-/filter_complex, exercising the backward-compatibility requirementbun run --cwd packages/engine test -- audioMixer.test.ts(12/12)bun run --cwd packages/engine typecheckbunx oxlintandbunx oxfmt --checkon changed files