3

As a result of the answer here: Recording cross-platform (H.264?) videos using WebRTC MediaRecorder

How can one go about using ffmpeg.js to efficiently unwrap a webm h.264 video and re-wrap it into an mp4 container?

I'm looking through the docs: https://github.com/Kagami/ffmpeg.js?files=1

However I don't see (or perhaps I'm looking for the wrong terminology) any examples for the above. This operation will be performed on the browser (chrome) prior to uploading as a Blob - I could use a web worker though hopefully rewrapping is a trivial enough operation to not require it.

SB2055
  • 12,272
  • 32
  • 97
  • 202
  • Are you sure the WebM files contain H.264 video? I would expect VP9 or VP8 video. – llogan Jul 31 '17 at 19:22
  • @LordNeckbeard per the answer in the linked question, Chrome can indeed record webm/h.264 – SB2055 Jul 31 '17 at 22:30
  • I've never encountered such a file, and ffmpeg does not allow muxing of H.264 into WebM, but if you think you have such a combination/abomination then perhaps ffmpeg will be willing to demux it and mux it into MP4. I know nothing of `ffmpeg.js`, but the ffmpeg command would be: `ffmpeg -i input.webm -c:v copy -c:a aac -movflags +faststart output.mp4` or similar. – llogan Aug 01 '17 at 01:12
  • @LordNeckbeard ha! thank you. I'm new to ffmpeg / video formats so it's good to know that's an odd pair. – SB2055 Aug 01 '17 at 12:13

0 Answers0