Repository navigation
Tell SIMD-less devices why the converter cannot run (2.3.7) - #77
Merged
Merged
Conversation
@ffmpeg/core 0.12.x ships a SIMD (v128) wasm, so a browser on a CPU without SSE4.1 fails to compile the core before it ever reads the user's files. Those users saw "Could not load the converter. Try again, or try a different browser", which is wrong twice over: retrying never works and no browser helps. PostHog confirms it is terminal, not transient. Every Chrome 109 and Firefox 115 session (the last versions supported on Windows 7/8.1) failed at the load stage and none ever succeeded: 11 sessions, 0% success. Two more Chrome 150 sessions report the same CompileError. Together they are most of the sessions that never converted anything. Probe for v128 support before loading and fail immediately with a message that says what is actually wrong, which also avoids a ~10MB core download that cannot possibly be used. Keep a message check on the load error too, in case an engine validates the probe but still refuses the real core. Split the failure out of `load_failed` as `simd_unsupported` so a permanent hardware limit stops hiding among retryable load errors.
prettier --check failed CI on wasmFeatures.ts. Switch the probe from Uint8Array.of(...) to an array literal so prettier keeps it compact rather than one byte per line, annotate each wasm section so the bytes are readable, and link the specs and references that explain what SIMD, v128 and SSE4.1 are.
FfmpegCommand was gated to status idle/done, so the users who had just failed were the only ones who never saw the local fallback. That is backwards, and for a device without Wasm SIMD it hid the only thing that would work: native ffmpeg has no wasm engine involved, so the same conversion runs fine on the very PC that cannot load the core. Render it on error too, and expand it automatically for the SIMD case so it is not buried behind a collapsed "Prefer the command line?" summary. Opened via a ref rather than an `open` prop, which React would treat as controlled and snap shut again on the next render. Point the SIMD message at the command instead of dead-ending on "use a newer computer".
This was referenced Aug 1, 2026
liladas
added a commit
that referenced
this pull request
Aug 1, 2026
docs/ has been collecting drafts since #77: five posts landed there, and two more went in with the WebCodecs work. None of them are documentation. They carry editor notes, numbers flagged for rechecking before publication, and copy that has not been through review. Matched by pattern rather than by name so the next draft is covered without anyone remembering to add it. Nothing links to them, and every file stays on disk.
liladas
added a commit
that referenced
this pull request
Aug 1, 2026
* Keep the unpublished blog draft out of the repo It was committed by accident: a `git add` of the whole docs/ directory swept it in with the credits work. It is a draft awaiting a blog to publish to, not documentation, and it carries editor notes that are not meant to ship. Gitignored so the same mistake cannot repeat, and the file stays on disk where it was. * Ignore the second blog draft too * Untrack every unpublished blog and social draft docs/ has been collecting drafts since #77: five posts landed there, and two more went in with the WebCodecs work. None of them are documentation. They carry editor notes, numbers flagged for rechecking before publication, and copy that has not been through review. Matched by pattern rather than by name so the next draft is covered without anyone remembering to add it. Nothing links to them, and every file stays on disk.
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
@ffmpeg/core0.12.x ships a wasm binary built with SIMD enabled. A browser running on a CPU without SSE4.1 disables Wasm SIMD in its engine, so the core fails to compile before it ever reads the user's files:These users were shown "Could not load the converter. Try again, or try a different browser." Both suggestions are dead ends on this hardware.
What all of this actually means
WebAssembly.validate()on a 31-byte module that returns av128. If the engine will not even validate that, it will never run the 10MB core. This is the standard probe, lifted from wasm-feature-detect.Evidence
Triggered by a Tally submission (
input_type=zip,result=failure, build200d62c) with the user's file attached. The file is fine: 187s.cdg+ 188s.mp3, and the app's exact ffmpeg command produces a correct 189s MP4 locally. The failure is atstage=load, before the files are touched.PostHog, all history, failures by browser:
Chrome 109 and Firefox 115 are the terminal versions on Windows 7/8.1, i.e. pre-SSE4.1 era machines: 11 sessions, 0% success rate. Of 136 conversion sessions overall, 16 never succeeded, so this is the majority of total failure. Confirmed SIMD messages only start Jul 17 because that is when
be7a79bbegan attachingerror_message.Changes
src/lib/wasmFeatures.ts:hasWasmSimd()(memoizedWebAssembly.validateprobe),isSimdCompileError(), and the shared user-facing message. The docblock carries the same reference links as above.convertCdgToMp4beforeloadFFmpeg(). Fails immediately with an accurate message and skips a ~10MB core download that could never be used.classifyError: newsimd_unsupportedreason, split fromload_failed, so a permanent hardware limit stops hiding among retryable load errors.FfmpegCommandnow renders on error. It was gated tostatus === "idle" || "done", so the users who had just failed were the only ones who never saw the local fallback. Native ffmpeg involves no wasm engine, so the same conversion runs fine on the very PC that cannot load the core: it is a real workaround, not a consolation. Auto-expanded for the SIMD case (via a ref, since anopenprop would be controlled and snap shut on re-render), and the SIMD message now points at it.Not a fix for the affected users, who still cannot convert. Scoping a non-SIMD core fallback separately.
Test
npm run typecheck,lint,format,test(96 passing, 15 new/updated) ande2e(5 passing) andbuildall clean locally. New coverage: probe true/false/throws/memoized, both production error strings, preflight skips the fetch, no stuckbusyflag after preflight rejection, the validate-passes-but-core-refuses path, and the command disclosure appearing on failure / expanding only for SIMD.