Skip to content

4GB memory support for large files #876

@825i

Description

@825i

I'm developing a browser extension that needs to be able to decode subtitle and audio data in videos. So far it works fine with user files that are under 2GB in size. As soon as the user wishes to use files above this limit, obviously I cannot use wasm anymore due to the limit.

It seems that 4GB has been possible since 2020, but this has never been updated. I realise it is asking for a huge degree of memory. However, this comes down to the fact that the user's own files will be up to this size. So it's really not my choice.

Describe the solution you'd like
I would like ffmpeg.wasm to support 4GB memory/files.

Describe alternatives you've considered
Compiling myself with the flags -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB but this adds another thing I must take care of.

Additional context
Currently 2GB is okay for 50-60% of users we are seeing, whereas 4GB will cover 95% of all series/episodes with any kind of modern compression (x265, mkv container etc). It won't cover huge movies but we aren't looking at supporting that anyway.

I would be honored if you would consider this.

Thank you. 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions