Prefer a system FFmpeg on desktop platforms, verified compatible - #420
Merged
Conversation
The desktop app always downloaded its own FFmpeg on macOS and Windows, even when a working system install (Homebrew, apt, choco) was already on PATH. On macOS this could force-install a build that doesn't run on an older macOS than the pinned binary assumes, breaking the app outright even though the user's own FFmpeg would have worked fine (#414). Moves the "check PATH first" logic (previously Linux-only) into the shared entry point so it applies on every desktop platform, and strengthens verify_ffmpeg() to also confirm the binary has every encoder StemDeck's export pipeline needs (pcm_s16le, flac, libmp3lame, libvorbis, aac) -- not just that it launches, so a minimal/stripped system build isn't accepted only to fail later during an export. The macOS primary download source (shaka-project) now goes through this same check before being accepted over the evermeet.cx fallback, so an incompatible primary build no longer gets used just because its checksum matched. Docker is unaffected -- it installs FFmpeg via apt in the image and never runs this download path.
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.
Summary
ensure_ffmpeg) so it applies uniformly on macOS, Windows, and Linux.verify_ffmpeg()to confirm the binary both runs and has every encoder StemDeck's export pipeline actually calls for (pcm_s16le,flac,libmp3lame,libvorbis,aac) — not just that-versionsucceeds — so a minimal/stripped system build isn't accepted only to fail later during an export.aptin the image and never runs this download path.Test plan
cargo check/cargo clippy --all-targetsclean (no new warnings) via WSL, per the "PR CI doesn't build the Rust desktop app" notecargo test— all 37 tests pass, including a newmissing_required_encoders_flags_only_the_absent_onestestcargo fmt --checkclean for the touched linesCommand::new("ffmpeg")(bare, no.exe) resolves correctly on Windows by confirming this exact codebase already relies on the same pattern forcurl(ships ascurl.exeon Windows 10/11 by default) in the unguardeddownload_filepath