Repository navigation
build: optimize ffmpeg into a minimal per-platform decoder build - #23158
Conversation
|
Intent: Build a small audio-only ffmpeg for every desktop platform, with a manual workflow that can publish the binaries for the desktop bundle to pin. |
f35f3e1 to
1e6f6f7
Compare
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff changes build, packaging and decoder fetching only. It adds or changes no dashboard control, label or state, so having no screenshots leaves no evidence gap. [UX-REVIEWED] 4495baa Description read[DESCRIPTION-READ] 75344baa994ac0983873e27602a9a310ccfcb406dc8fe652423ccac062fc45d3 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. One flag on the new CLI has no caller outside tests. Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: ship a much smaller, audio-only ffmpeg in desktop bundles and in the source-install store. This is an ADDITION; the bundle and store switch was folded in at the maintainer's request.
[FIRST-PRINCIPLES-REVIEWED] 4495baa Description read[DESCRIPTION-READ] 6751644be55cab1ca589d6b8d4c89e349fe124eadb7743c42e65be786a97b7ce That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The audio-only build covers every demuxer, decoder, muxer and filter the runtime decode paths call, and the old store pins have a migration. Notes
[DESIGN-REVIEWED] 4495baa Description read[DESCRIPTION-READ] f2628ecbe35d671442c03d51a37e7e13d4e9bcebf5ee13e4c2120e905dc7cc5c That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] 4495baa Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
1e6f6f7 to
0042cda
Compare
|
span=6b1830b79398 disposition: fixed in 0042cda
|
|
span=1207bfa4adae disposition: fixed in 0042cda
|
|
span=6b1830b79398 disposition: fixed in 09aba47
|
09aba47 to
1721264
Compare
|
Retrospective (round 2, head 09aba47 -> 5411204), measured against the frozen intent.
|
5411204 to
c94b5e5
Compare
|
span=b79a0ae5b2e8 disposition: fixed in c94b5e5
|
|
span=6b1830b79398 disposition: fixed in 0f655d4
|
c94b5e5 to
0f655d4
Compare
d8af159 to
6964f64
Compare
|
Scope note (maintainer request): the desktop and source-install switch to the new decoder is now in this PR instead of a follow-up. The binaries are published as ffmpeg-decoder-7.1.1-r1 from workflow run 39881015516 and pinned in |
6964f64 to
525fe14
Compare
|
span=6b1830b79398 disposition: fixed in 525fe14
|
525fe14 to
d126637
Compare
|
span=2c3cb4397785 disposition: fixed in d126637
|
c4f8db5 to
cd0bbe1
Compare
|
span=374f067f6e45 disposition: fixed in cd0bbe1
|
2c56819 to
cb7db03
Compare
cb7db03 to
1065f67
Compare
Extend build-ffmpeg.sh to build the small audio-only ffmpeg for every desktop platform (Linux x64/arm64, macOS arm64/x64, Windows x64) and cover every input the speech path decodes. Add a manual workflow that builds and verifies all five and can publish them as one release.
1065f67 to
4495baa
Compare
|
span=0022253b0952 disposition: fixed in 4495baa
|
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved by Crew Captain on head 4495baa: Design, First Principles and UX PASS on this head, Opus and GPT no blocking findings, no merge conflict. Auto-merge waits for Coverage Combine and PR Readiness.
Problem / Motivation
Goal: Ship a small, audio-only ffmpeg on every desktop platform, sized to what the app actually uses.
The desktop app bundled the full
imageio-ffmpegexecutable (50–90 MB per platform) only to decode voice input, and the source-install decoder store fetched the same wheel. The speech path needs a handful of audio formats.Why it matters
Each desktop bundle carried tens of MB of ffmpeg it never runs, and the source-install store downloaded a ~30 MB wheel to extract one file.
Not a goal
What changed (motivation → approach → change)
scripts/build-ffmpeg.sh --targetbuilds a ~2–4 MB audio-only ffmpeg for Linux x64/arm64 (static), macOS arm64/x64 and Windows x64 (mingw), and checks its configuration and core decoders..github/workflows/build-ffmpeg-decoder.ymlbuilds all five, runs the Windows one, and can publish them with the source tarball andSHA256SUMS. It also runs on PRs that touch it.stt.decoder.ARTIFACTSpins each release asset by size and SHA-256, downloaded as itself (no wheel, no zip extraction). Newpython -m kiro_crew.stt.decoder --install-into DIR.build-desktop.shinstalls the decoder through that CLI intosite-packages/kirocrew_ffmpeg/bininstead ofpip install imageio-ffmpeg; the resolver looks there. Mac signer set and the Windows signing exemption use the new filenames.src/kiro_crew/transcribe_aws.py: the webm→ogg remux now passes-vn, so a Slackvideo/webmclip with a video track remuxes with the audio-only build (the old full build silently re-encoded video to theora).docs/system-specs/modules/stt-streaming.md,docs/build/desktop-app.md,docs/system-specs/modules/cli.md,docs/system-specs/modules/slack-gateway.md,docs/system-specs/modules/learn-cron-dashboard.md,docs/reference/kiro-cli/chat/voice.md,src/kiro_crew/docs/configuration.md, and thesrc/kiro_crew/transcribe.pymodule docstring.NOTICEandTHIRD-PARTY-NOTICESlist the bundled decoder.Backwards compatibility
Compatible: the runtime resolves and authenticates the decoder exactly as before; only the pinned bytes and bundle path change. A store decoder fetched under an older pin is no longer resolvable by name, so when nothing else resolves, the transcode path fetches the current pin once per process (
stt.decoder.migrate_retired_decoder) and removes the retired file.Reader: src/kiro_crew/transcribe_ffmpeg.py:_open_packaged_ffmpeg_resource -- release -- now reads kirocrew_ffmpeg/bin; test_transcribe_ffmpeg.py
Reader: src/kiro_crew/stt/decoder.py:DecoderStore.ensure -- app -- fetches the release asset; test_stt_decoder.py
Reader: src/kiro_crew/stt/decoder.py:RETIRED_FILENAMES -- chat/app -- a store with an old-pin file migrates on the first transcode; TestRetiredDecoderMigration
Reader: packaging/build-desktop.sh:install_desktop_decoder -- release -- test_build_desktop_decoder_requirement.py, packaging.test.js
Tests
test_stt_decoder.py: direct pinned download (install, progress, no.partleft, existing target kept on failure), store flows,main()exit codes.test_transcribe_ffmpeg.py: pins cover exactly the shipped platforms and match the release'sSHA256SUMS; resolver fixtures use the new bundle path.test_build_desktop_decoder_requirement.py: every backend but macOS Intel installs via the pin table into the resolved directory; noimageio-ffmpegleft in the build.test_ffmpeg_decoder_only_publish_can_write: workflow permissions.Manual verification
verify-windowsran the .exe on Windows.python -m kiro_crew.stt.decoder --install-intofetched and verified the Linux asset from the release.Related Issues
no linked issue: build-tooling change with no tracked issue
Checklist
Contribution License Agreement
Contributed under the project's Apache-2.0 license.