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
Expected
To open the camera & start recording & save in mp4 format
Actual
Getting error in deviceError event
Error output
Get this error
Additional Information
Please include any additional information necessary here. Including the following:
Description
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
Expected
To open the camera & start recording & save in mp4 format
Actual
Getting error in deviceError event
Error output
Get this error
Additional Information
Please include any additional information necessary here. Including the following:
versions
"videojs-record": "^4.4.0",
browsers
chrome
OSes
Linux