ffmpegwasm / ffmpegwasm/ffmpeg.wasm

ERR_OUT_OF_MEMORY, when using "createFFmpeg" several times

Đang mở
#200 6 bình luận 7 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
17.8k
Fork
1.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Describe the bug**
To see the memory usages and limitation of "ffmpeg.wasm", I tested it with a simple example.
I created "createFFmpeg" several times. The memory in the browser increased linearly. However it did not get backed to the original memory size, even though it was defined locally. And eventually, generated "ERR_OUT_OF_MEMORY" in the browser.

**To Reproduce**
1. Used the below code

const init_ffmpeg = async () => {
let ffmpeg = await createFFmpeg()
try {
await ffmpeg.load()
} catch (e) {
console.log(e)
}

ffmpeg = null
// ffmpeg.exit()
}

2. The above code called around 20 times
3. Then the error

**Expected behavior**
I thought "ffmpeg = null" or "ffmpeg.exit()" will be used for garbage collection in the browser.
I'd like to remove the "ffmpeg" perfectly, and recreate it again and again for other processes.

**Screenshots**
My memory started from around 500M. When reaching around 2GB (By calling the above code), it made the error.

![image](https://user-images.githubusercontent.com/17169166/119245969-839d5680-bb4b-11eb-84f1-94a34c800d9f.png)

**Desktop (please complete the following information):**
- OS: window
- Browser: chrome
- Version: 90
- @ffmpeg/ffmpeg version: 0.10.0

**Additional context**
Thank you very much for great library!
And hope to hear a good solution.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.