ffmpegwasm / ffmpegwasm/ffmpeg.wasm

Initial memory reduction in 0.11 causing OOM from 0.10

オープン
#451 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
C
スター
17.8k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

**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`?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。