Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP4Clip 大文件解析阶段内存优化 #129

Open
hughfenghen opened this issue Jun 7, 2024 · 0 comments · May be fixed by #291
Open

MP4Clip 大文件解析阶段内存优化 #129

hughfenghen opened this issue Jun 7, 2024 · 0 comments · May be fixed by #291

Comments

@hughfenghen
Copy link
Member

hughfenghen commented Jun 7, 2024

在 v0.9 中使用 opfs-tools 将视频文件临时写入 opfs,大幅降低了内存占用。

但加载非 segment mp4 资源时,因为是顺序读取二进制,且 moov 通常在文件末尾;
所以解析阶段,仍会将整个视频文件加载到内存,解析完成会自动释放内存,导致大文件解析阶段内存短暂、大幅增加。

解析 非 segment mp4 应该避免顺序读取二进制,而是优先加载解析 moov box。

@hughfenghen hughfenghen changed the title MP4Clip 内存优化 MP4Clip 大文件解析阶段内存优化 Jun 12, 2024
@8zf 8zf mentioned this issue Aug 26, 2024
@hughfenghen hughfenghen linked a pull request Oct 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant