gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.92k stars 325 forks source link

Error loading/playing unfragmented MP4 in demo-player #315

Open Gundeck opened 1 year ago

Gundeck commented 1 year ago

First of all, thank you for the mp4boxjs project !

I used the demo player local on my PC. When I try to load an unfragmented, larger MP4 file, Firefox and Chrome produce the following errors:

Firefox 110.0: Uncaught DOMException: The quota has been exceeded.

Chrome 110.0.5481.178: Uncaught DOMException: Failed to execute 'appendBuffer' on 'SourceBuffer': The SourceBuffer is full, and cannot free space to append additional buffers.

I suspect that the memory is overflowing from the browser. Is there a solution to the problem ?

Good work and thanks !

hughfenghen commented 1 year ago

Try calling releaseUsedSamples

image https://gpac.github.io/mp4box.js/#appendbufferdata