(FFmpeg) How to Convert WebM to MP4?

As an open source alternative to HTML5 video (the successor of FLV), WebM is another multimedia container format that is currently being maintained by Google. WebM files are native to android devices but not iOS (or Safari), thus converting to MP4 is beneficial. Luckily, the conversion is simple because most WebM video codecs are H.264:


 $ ffmpeg -i input.webm output.mp4

There may be an issue on macOS with the previewer not working with this new MP4, one solution is to set the frame rate during the conversion, as seen below:


 $ ffmpeg -i input.webm -r 24 output.mp4 

-r

Indicates the frame rate (Hz value) or FPS

Tip: Instagram and Twitter do not support WebM video uploads.

Related Posts