r/ffmpeg • • 11h ago

What's your real size ceiling with ffmpeg.wasm before it OOMs?

2 Upvotes

Not looking for a fix — looking for numbers. I keep seeing OOM reports at wildly different file sizes and I want to know whether that's a code difference or just hardware.

What I've been assuming:

- wasm32 gives the module a 4GB address space, but the browser keeps its own copies on top, so the usable figure is lower than 4GB.

- The transient copies dominate, not the file itself: file → arrayBuffer → FS.writeFile into the heap → encoder buffers → output buffer → readFile → Blob. A 600MB input can transiently hold well over a gigabyte.

- Without COOP/COEP you silently lose multithreading — SharedArrayBuffer is just undefined, no error — and that roughly triples encode time, which then looks like a memory problem.

Where it actually falls over for me: around 1.5GB of input for a 1080p H.264 export in Chrome, lower in Safari. Deleting the input as soon as the output exists (await ffmpeg.deleteFile) bought back more headroom than anything else I tried.

So: what input size kills it for you, on which browser and how much RAM? And has anyone got 2GB+ working reliably single-threaded, or is that just wishful thinking?