Closed Richienb closed 4 years ago
Discovered a solution:
const ffmpeg = require("ffmpeg.js/ffmpeg-mp4")
module.exports = webmData => ffmpeg({
MEMFS: [{ name: "video.webm", data: Uint8Array.from(webmData) }],
arguments: ["-i", "video.webm", "-codec", "copy", "-strict", "-2", "output.mp4"]
}).MEMFS[0].data
As far as I can tell, to convert a buffer of webm data to mp4, I should do this:
However, in order for this code to work, I need to have imported the webm code and the mp4 code simultaneously. How do I fix this?
// @Kagami