ffmpeg.wasm
ffmpeg.wasm copied to clipboard
Shared array buffer is not defined
Describe the bug I am using the ffmpeg v0.9.7 but when it try to convert from webm to mp4 it gives me the error i.e. Share array buffer is not defined.
I have uploaded the images one is for my error and one image is to display the headers.
If someone know the solution kindly provide me the solution.
Thank you in advance.
Are you setting the COOP/COEP headers on the base document (the html file) too?
Are you setting the COOP/COEP headers on the base document (the html file) too?
No I don’t add these headers. Can you please help me how to add those headers into my index.html file?
It depends on how you serve your files. Just google "(your server, e.g. express) how to set headers" and set the required headers from here https://web.dev/coop-coep/
It depends on how you serve your files. Just google "(your server, e.g. express) how to set headers" and set the required headers from here https://web.dev/coop-coep/
I have already added these headers on my server. You can check in the image. I have also share the image of header
Hello, I had same problem. The easiest solution: Add this code to your index.html
<script> if (!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer; </script>
@SZtyro When i try this i get a BAD MEMORY error message.
@Zophiel I also get this error, but only the first time I use the plugin, the next time I use it works as normal. For now, this solution is fine for me, but please let me know if you find a better one.
It works for me if to add this block of code into the scripts/server.js file (after 12th row)
app.use(function(req, res, next) { res.header("Cross-Origin-Embedder-Policy", "require-corp"); res.header("Cross-Origin-Opener-Policy", "same-origin"); next(); });
Share array buffer is not defined.
Setting the COEP and COOP headers is one ingredient. The other is accessing the page via https. Are you doing that or are you accessing via http?