Open streetsoul87 opened 1 year ago
Read the Browser section https://github.com/ffmpegwasm/ffmpeg.wasm#installation
Why does this project work without SharedArrayBuffer? https://github.com/bgrins/videoconverter.js
I faced this error when trying to multithread with this library if you are trying to do that, make sure you setup a server in backend and see the sample code provided in this repo for reference, take a look at it for solving your problem
https://github.com/ffmpegwasm/ffmpeg.wasm/tree/main/apps/vanilla-app
You can use https://github.com/gzuidhof/coi-serviceworker which fix the issue for me.
@gabrielstuff
Thanks for the share, coi-serviceworker
do help SharedArrayBuffer problem in latest chrome.
Old version chrome do support SharedArrayBuffer syntax js, but deprecated.
convert 10/fps mp4 is fast, h265 works also with ffmpeg.wasm,
trying to feed file via websocket, if ffmpeg.wasm could convert RTSP firectly.
RTSP -> websocket -> mp4 -> ffmpeg -> livePlay
Describe the bug SharedArrayBuffer error
To Reproduce Steps to reproduce the behavior: When perform load() function using ffmpeg, error is occured. (//cdn.jsdelivr.net/npm/@ffmpeg/ffmpeg@0.8.3/dist/ffmpeg.min.js)
Expected behavior Not error, working well.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context [ fileUpload.html ] <!DOCTYPE html>
[ fileHandler.js ] const startButton = document.getElementById('encodeButton'); startButton.addEventListener('click', async () => { const inputFile = document.getElementById('inputFile').files[0]; if (!inputFile) { return; }
const { createFFmpeg } = FFmpeg; const ffmpeg = createFFmpeg({ log: true });
// FFmpeg loading console.log("Before ffmpeg.load"); await ffmpeg.load(); console.log("After ffmpeg.load");
alert(inputFile.name); });