ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Initial memory reduction in 0.11 causing OOM from 0.10

Ouverte
#451 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
17.8k
Forks
1.1k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**Describe the bug**
Upgraded from 0.10 to 0.11 and started seeing OOM issues.

To fix the issue, I applied the following patch to the wasm-core repo and rebuilt it:

```diff
diff --git a/wasm/build-scripts/build-ffmpeg.sh b/wasm/build-scripts/build-ffmpeg.sh
index f533292816..c34ad55528 100755
--- a/wasm/build-scripts/build-ffmpeg.sh
+++ b/wasm/build-scripts/build-ffmpeg.sh
@@ -11,7 +11,7 @@ if [[ "$FFMPEG_ST" != "yes" ]]; then
-s USE_PTHREADS=1 # enable pthreads support
-s PROXY_TO_PTHREAD=1 # detach main() from browser/UI main thread
-o wasm/packages/core/dist/ffmpeg-core.js
- -s INITIAL_MEMORY=1073741824 # 1GB
+ -s INITIAL_MEMORY=2146435072 # 2GB
)
else
mkdir -p wasm/packages/core-st/dist
```

Looks like the initial memory was changed from 2GB to 1GB in the upgrade to 0.11 (https://github.com/ffmpegwasm/ffmpeg.wasm-core/commit/3ea42134df885c35a011715225d3996dc35abdeb & https://github.com/ffmpegwasm/ffmpeg.wasm-core/commit/19f90cf797e70b87f02d967577989d1548cbbf21)

Is restoring the initial memory to 2GB a good solution?

Or should it keep with 1GB and then use `ALLOW_MEMORY_GROWTH=1`?

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.