Ffmpeg.wasm not working in Chrome extension due to SharedArrayBuffer
See original GitHub issueDescribe the bug I can’t seem to be able to use ffmpeg.wasm in a chrome extension anymore.
To Reproduce
I simply used the example from https://github.com/ffmpegwasm/chrome-extension-app and loaded it into
my chrome as an extension, this now throws an Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined
error.
I’ve also attempted to run ffmpeg.wasm from the sanbox environment of a chrome extension, but it resulted in the
same error.
Expected behavior A working example of ffmpeg.wasm running inside of a chrome extension (preferably locally hosted).
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome & Brave
- Version: Chrome 92.0.4515.107 & Brave 1.27.109
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:5
Top Results From Across the Web
ffmpeg inside chrome extansion - Stack Overflow
I tried to use the example library for chrome extension but also got an error "Uncaught (in promise) ReferenceError: SharedArrayBuffer is not ...
Read more >FFmpeg for browser and Node, powered by WebAssembly
FFmpeg is licensed under LGPL which can (albeit carefully) work on the web, but libx264 is GPL. I think that alone makes this...
Read more >WebAssembly.Memory - MDN Web Docs
The WebAssembly.Memory object is a resizable ArrayBuffer or SharedArrayBuffer that holds the raw bytes of memory accessed by a WebAssembly.
Read more >Using WebAssembly threads from C, C++ and Rust - web.dev
WebAssembly threads is not a separate feature, but a combination of ... Instead, Chrome 68 (mid-2018) re-enabled SharedArrayBuffer again by ...
Read more >React Website Getting SharedArrayBuffer Error Due To COOP ...
Regarding the website and uploading a video; this isn't something that happens. This website uses FFmpeg-wasm, so the video is processed right on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I want to ask about the progress for single-thread
I went through the process of implementing FFmpeg.wasm in an extension… There are a few caveats, but it is possible.
An example extension with a possible implementation on Manifest V2 (both on Chrome and Firefox): https://github.com/brunoluiz/gifsane-extension Post explaining some of the implementation details: https://brunoluiz.net/blog/2022/jan/gif-sane-playback-control-ffmpegwasm/