ffmpeg Tools Français

Convert WebM to MP4

WebM is the video format of the web: you find it in screen recordings made from a browser and in many downloaded videos. Some editing programs, iPhones and TVs handle it poorly. Converting to H.264 MP4 solves the problem.

Updated on

The lower the number, the better the picture and the larger the file.

WebM screen recordings often have a variable frame rate, which editing software handles poorly.

  

How to use it

  1. Install ffmpeg if you haven't already.
  2. Open a terminal in the folder containing your file.
  3. Copy the generated command, adjust the file names if needed, then run it.
  4. Open the resulting file to check the result.

When should you force a constant frame rate?

A screen recording only produces a frame when the screen changes, so the frame rate is variable. Players cope with this, but editing software can put the audio out of sync or show the wrong duration. Forcing a constant 30 frames per second avoids these problems, at the cost of a slightly larger file.

The audio

The audio in WebM files is Opus or Vorbis. The command converts it to AAC at 160 kbps, the format expected in an MP4 and played everywhere.

Frequently asked questions

Why does my WebM video have no duration or won't let me skip ahead?

Recordings made in a browser are often written without an index or duration. Converting to MP4 rebuilds this information: the resulting video has a correct duration and lets you seek normally.

Can I convert without re-encoding?

Technically, MP4 can hold VP9 and Opus, but many players can't play them in that container. Re-encoding to H.264 and AAC is the reliable solution.

The conversion is slow. Is that normal?

Yes: decoding VP9 or AV1 and then encoding to H.264 takes a lot of computing. To go faster at the cost of a slightly larger file, replace "-preset medium" with "-preset fast".

More tools