From 43c6fda7d472e39e9f2f9802c0d20b9806b61650 Mon Sep 17 00:00:00 2001 From: Max Christoph Date: Mon, 25 Aug 2025 15:17:25 +0200 Subject: [PATCH] Allow webassembly to use up to 4GB of memory. --- build/ffmpeg-wasm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ffmpeg-wasm.sh b/build/ffmpeg-wasm.sh index faa2f725ca8..28d225b70c4 100755 --- a/build/ffmpeg-wasm.sh +++ b/build/ffmpeg-wasm.sh @@ -37,7 +37,7 @@ CONF_FLAGS=( -sMODULARIZE # modularized to use as a library ${FFMPEG_MT:+ -sINITIAL_MEMORY=1024MB} # ALLOW_MEMORY_GROWTH is not recommended when using threads, thus we use a large initial memory ${FFMPEG_MT:+ -sPTHREAD_POOL_SIZE=32} # use 32 threads - ${FFMPEG_ST:+ -sINITIAL_MEMORY=32MB -sALLOW_MEMORY_GROWTH} # Use just enough memory as memory usage can grow + ${FFMPEG_ST:+ -sINITIAL_MEMORY=32MB -sALLOW_MEMORY_GROWTH -sMAXIMUM_MEMORY=4GB} # Use just enough memory as memory usage can grow -sEXPORT_NAME="$EXPORT_NAME" # required in browser env, so that user can access this module from window object -sEXPORTED_FUNCTIONS=$(node src/bind/ffmpeg/export.js) # exported functions -sEXPORTED_RUNTIME_METHODS=$(node src/bind/ffmpeg/export-runtime.js) # exported built-in functions