-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
"Array buffer allocation failed" when finalizing with FileSystemWritableFileStreamTargetWriter #78
Comments
Thanks for reporting this! Looking at my code, the method simply allocates a 16 MB buffer, so that alone cannot be the issue. Perhaps something can't get garbage collected and you're simply running out of memory for the large file, which is of course not something that should happen. Does this error occur for small files too? Do you think you can provide me with a demo that creates such a large file or should I simply mess around and come up with something myself? |
For smaller files it works like a charm. While you might be correct about
something else leaking in my app, this error occurs way too consistently
when rendering large files.
I will see if I get a chance to extract this in an isolated piece of code..
And please let me know if you think I could try some sort of a workaround..
Thanks!
…On Tue, Nov 26, 2024, 11:09 AM Vanilagy ***@***.***> wrote:
Thanks for reporting this! Looking at my code, the method simply allocates
a 16 MB buffer, so that alone cannot be the issue. Perhaps something can't
get garbage collected and you're simply running out of memory for the large
file, which is of course not something that should happen. Does this error
occur for small files too?
Do you think you can provide me with a demo that creates such a large file
or should I simply mess around and come up with something myself?
—
Reply to this email directly, view it on GitHub
<#78 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQ4ZOPYVW23O32V5RNK3A32CRCG5AVCNFSM6AAAAABSODC44WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBQGE4TKNJWG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You could try using the regular new StreamTarget({
onData: (data, position) => stream.write({
type: 'write',
data,
position
})
}) where |
I has the same issue. |
What is the error specifically? |
I guess this is an out of memory error. I can't help you without further detail |
I have a similar issue when muxing large files (~2GB, 1h video) with ArrayBufferTarget I have this error : I have plenty of free ram on my computer and chrome is at around 3.5GB when the error occurs. |
Yes that is to be expected, a tab cannot use all your system memory. Don't use ArrayBufferTarget for such a large file!! |
Yes. there seem to be a limit of 4GB with chrome, for security reasons. |
Maybe you can try hacking something together using IndexedDB, but may be hacky. Or something with OPFS? |
yes, I've implemented indexedDB and it's working fine, even with gigabytes of files stored. Another option is to use localstorage, but it requires base64 encoding/decoding. |
Hi,
So I'm trying to export a large file (around 1.5GB), and using FileSystemWritableFileStreamTargetWriter, but it crashes right upon trying to call muxer.finalize().
Using the latest version 5.1.5, but it did the same in 3.x that I had in my proejct previously.
If this helps this is how I initialize the muxer:
It works well while I keep adding the frames, but crashes upon "finalize". It works fine for smaller files.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: