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

Android WebAssembly.Memory() #133

Open
Quackdoc opened this issue Dec 17, 2020 · 9 comments
Open

Android WebAssembly.Memory() #133

Quackdoc opened this issue Dec 17, 2020 · 9 comments

Comments

@Quackdoc
Copy link

Describe the bug
using chrome 88 for android we get an memory issue

To Reproduce
Steps to reproduce the behavior:

  1. enable cross origin isolated in flags
  2. Navigate to https://ffmpegwasm.et.r.appspot.com/
  3. run script using 3s clip

Smartphone (please complete the following information):

  • Device: Samsung S9
  • OS: Android 10
  • Browser Chrome beta
  • Version 88

Additional context
as of chrome 88 Shared Array Buffers are to be enabled as default (See https://www.chromestatus.com/feature/5171863141482496 https://www.chromestatus.com/feature/4570991992766464)

[Error]

a842de40-97a2-4a2b-927e-0cac9b769fc3:22 Uncaught (in promise) RangeError: WebAssembly.Memory(): could not allocate memory
    at a842de40-97a2-4a2b-927e-0cac9b769fc3:22
    at createFFmpeg.js:64
    at u (runtime.js:63)
    at Generator._invoke (runtime.js:293)
    at Generator.next (runtime.js:118)
    at n (asyncToGenerator.js:3)
    at o (asyncToGenerator.js:25)
@ivanburlakov
Copy link

I believe that headers should be set in your node.js server, not in browser. But I may be wrong. See - #102 (comment)

@ivanburlakov
Copy link

ivanburlakov commented Feb 8, 2021

+1
https://ffmpegwasm.et.r.appspot.com/ works ok for me in Chrome Mobile 88, but when making my own app, even tho I set headers both in React App index.html and in express server, I get the same error!
@jeromewu , we want to know the secret you used to make https://ffmpegwasm.et.r.appspot.com/ work on Chrome Mobile 88+ 😄

@EstebanFuentealba
Copy link

@ivanburlakov you need enable "cross-origin isolated" for SharedArrayBuffer feature https://web.dev/why-coop-coep/

@ivanburlakov
Copy link

@ivanburlakov you need enable "cross-origin isolated" for SharedArrayBuffer feature https://web.dev/why-coop-coep/

isn't it what I mentioned above? Or am I missing something?

@EstebanFuentealba
Copy link

jajaj disculpas, no leí el codigo. A mi me daba error en android igualmente y supuse que era por la memoria que se le daba a la variable INITIAL_MEMORY al hacer el build de ffmpeg, testié dando solo 250mb (aprox) y funciona en android con chrome 88.0.4324.152 en mi fork está el artifact para poder descargarlo https://github.com/EstebanFuentealba/ffmpeg.wasm-core/blob/06786fe3d4a746c03beecbc463a22415733c8632/wasm/build-scripts/build-ffmpeg.sh#L24 Saludos!

@ivanburlakov
Copy link

ivanburlakov commented Feb 17, 2021

jajaj disculpas, no leí el codigo. A mi me daba error en android igualmente y supuse que era por la memoria que se le daba a la variable INITIAL_MEMORY al hacer el build de ffmpeg, testié dando solo 250mb (aprox) y funciona en android con chrome 88.0.4324.152 en mi fork está el artifact para poder descargarlo https://github.com/EstebanFuentealba/ffmpeg.wasm-core/blob/06786fe3d4a746c03beecbc463a22415733c8632/wasm/build-scripts/build-ffmpeg.sh#L24 Saludos!

If understood right - it works if you build ffmpeg.wasm with less allocated memory?

@PaulGrizzly
Copy link

Did you succeed, @ivanburlakov ?

@ivanburlakov
Copy link

Did you succeed, @ivanburlakov ?

I did not work with ffmpegwasm for a while.

@Manitej66
Copy link

Guyssss! FFMPEG started working on chrome android from version 11.4 !!!
update version to @ffmpeg/ffmpeg": "^0.11.4

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

No branches or pull requests

5 participants