ffmpegwasm / ffmpegwasm/ffmpeg.wasm

ERR_OUT_OF_MEMORY, when using "createFFmpeg" several times

Abierto
#200 6 comentarios 7 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
17.8k
Forks
1.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.