bilibili / WebAV

WebAV is an SDK built on WebCodecs, designed for creating and editing video files on the web platform. WebAV 是基于 WebCodecs 构建的 SDK,用于在 Web 平台上创建/编辑视频文件。
https://bilibili.github.io/WebAV/
MIT License
989 stars 112 forks source link

Memory leak #5

Closed onthegit closed 1 year ago

onthegit commented 1 year ago

Hello, thanks for the project. After some testing I noticed that memory is increasing in chrome (without being gced). I suspect it is because releaseUsedSamples is not being called and all the the chunks stay in mp4boxjs. More info here: https://github.com/gpac/mp4box.js/wiki/Memory-managment-in-MP4Box.js

hughfenghen commented 1 year ago

Yeah, it's true that mp4 samples are not being actively released at the moment, and processing larger video files may have memory leak.

I expect to submit the memory optimization code next week.

hughfenghen commented 1 year ago

@onthegit The VRAM overload issue has been resolved and the js heap is currently increasing slowly but not significantly. I will close this issue and if it does not resolve the issue you are experiencing, please reopen the issue and provide the test file.