Repository navigation
Fix desktop 1080p/original export via growable ffmpeg core - #101
Merged
Merged
Conversation
The multi-threaded @ffmpeg/core-mt hard-commits a fixed 1 GiB shared heap, which is what made high-res export fail in the desktop app (Discord: "ffmpeg not starting") after PR #92 stopped the hang. Ship @ffmpeg/core for export (growable to 2 GiB), keep MT for audio extraction with ST fallback, and drop the transcription worker once ASR finishes so its ORT heaps are not still competing for memory. Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
If the multi-threaded core fails mid-load, drop its class worker before retrying the growable single-threaded core so the failed attempt does not keep its allocation. Co-authored-by: Wassim Gharbi <wassgha@gmail.com>
This branch was successfully deployed
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
Discord reports (yerhss / Jandev): 1080p and original video export fail in the desktop app with something about “ffmpeg not starting”, while the same export works in the browser. Jandev linked #92 — that PR correctly stopped the hang, but left the underlying 1 GiB ceiling for a follow-up.
Root cause
@ffmpeg/core-mtinstantiates a fixed 1 GiBWebAssembly.Memory(initial === maximum, shared). Under Electron memory pressure after ASR (ORT heaps still resident), that buffer often fails to allocate on export re-init — or the encode OOMs mid-filtergraph for 1080p/original. System RAM (e.g. M4 Pro 48 GB) does not help; this is the wasm heap limit.Fix
@ffmpeg/core(single-threaded, growable 32 MiB → 2 GiB) to/vendor/ffmpeg-st/completeso ORT heaps are released before the user exports (everytranscribe()already starts a fresh worker)Evidence
ffmpeg-core-tests.log
ffmpeg-memory-limits.log
Tests
npm run test:ffmpeg— watchdog + new core-selection / asset presence checksnpm run test:timeline,npm run test:i18nnpm run typecheck:electron