ffmpeg.js
ffmpeg.js copied to clipboard
Rewrap WebM/H.264 to MP4/H.264
Is it possible to increase performance by recording in H.264 codec, then simply rewrapping with ffmpeg.js?
I'm experimenting with the following setup:
- Recording video/webm;codecs=h264
recordVideo = RecordRTC(stream, { type: "video", mimeType: "video/webm;codecs=h264", }); - Copying codec, bypassing the transcoding overhead -c:v copy
worker.postMessage({ type: "command", arguments: "-i video.webm -c:v copy output.mp4".split(" "), files: [ { data: new Uint8Array(aab), name: "video.webm", }, ], });
Result: In theory it should work, but I'm getting a black screen s a result.
Thanks for any insight!
Can you share the ffmpeg logging output?
Is the black screen in browser or in e.g. Quicktime? At least for me h264 mp4s work fine in Chrome but not in the OS players