Browser video tool sped up by fixing thread pin, not ffmpeg.wasm upgrade
A developer running Utilorax, a suite of free browser-based video tools powered by ffmpeg.wasm, spent a week diagnosing why encodes were running at just 0.09× real time on a 1080p60 clip. The root cause turned out to be a hardcoded single-thread flag in the encoder, not the suspected bug in ffmpeg.wasm 0.11, though removing it on 0.11 triggered a separate threading crash that made the upgrade to 0.12 necessary. Migrating to 0.12 required an API compatibility adapter and exposed hidden issues, including a missing worker chunk causing silent load failures and a Cross-Origin-Embedder-Policy header requirement for worker scripts that the older blob-based approach had bypassed automatically. A service worker was also found to be caching stale headers, masking the real source of COEP errors. Once the thread pin was removed and the correct headers were applied, multi-core encoding became available and performance improved significantly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in