collab-project / videojs-record

video.js plugin for recording audio/video/image files
https://collab-project.github.io/videojs-record
MIT License
1.4k stars 315 forks source link

ffmpeg.wasm : Error: Could not load ffmpeg.wasm plugin #639

Closed diplesh123 closed 9 months ago

diplesh123 commented 2 years ago

Description

image

Steps to reproduce

with videojs we can record video with webm extension. While to convert video into mp4 in angular project with ffmpeg.wasm I got the above issue.

step-1 : npm install --save @ffmpeg/ffmpeg @ffmpeg/core step-2 : put this step-3 : Tried with this to import FFmpegWasmEngine from 'videojs-record/dist/plugins/videojs.record.ffmpeg-wasm.js'; at TS file & also tried without this step-4 : used record: { audio: true, video: true, maxLength: 20, debug: true, // enable ffmpeg.wasm plugin convertEngine: 'ffmpeg.wasm', convertWorkerURL: '../../node_modules/@ffmpeg/core/dist/ffmpeg-core.js', // convert recorded data to MP4 (and copy over audio data without encoding) convertOptions: ['-c:v', 'libx264', '-preset', 'slow', '-crf', '22', '-c:a', 'copy', '-f', 'mp4'], // specify output mime-type pluginLibraryOptions: { outputType: 'video/mp4' } }

Results

Get this error image

Expected

To open the camera & start recording & save in mp4 format

Actual

Getting error in deviceError event

Error output

Get this error image

Additional Information

Please include any additional information necessary here. Including the following:

versions

"videojs-record": "^4.4.0",

browsers

chrome

OSes

Linux

dionjwa commented 2 years ago

The underling issue is likely described here: https://web.dev/cross-origin-isolation-guide/

thijstriemstra commented 9 months ago

The ffmpeg.wasm plugin was updated to support v0.12.x, please try videojs-record 4.7.0 (or newer) once it's released.