question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ffmpeg.wasm not working in Chrome extension due to SharedArrayBuffer

See original GitHub issue

Describe 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:open
  • Created 2 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

1reaction
jzwbcommented, Aug 11, 2021

Hello, I want to ask about the progress for single-thread

0reactions
brunoluizcommented, Jan 24, 2022

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/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found