Convert MP4 to WebM Lossless on macOS

grayscale photography of two crouching men

To convert MP4 to WebM video on macOS, install FFmpeg using Homebrew.

  • Step 1: Install Homebrew.
  • Step 2: Install FFmpeg.
  • Step 3: Convert MP4 to WebM.

Step 1: Install Homebrew

Using the terminal app run the following.

/bin/bash -c "$(curl -fsSL"

Step 2: Install FFmpeg

Using the terminal app run the following.

brew install ffmpeg

Step 3: Convert MP4 to WebM

Next, to convert your MP4 video to WebM lossless, you need to use -crf 0 in the below commands. However, when converting an MP4 file of 8.5MB I got a WebM version that was 91.6MB – 10x larger! Instead, I recommend using -crf 30. This setting created a great-looking video, and my WebM video ended up being 3.4MB – perfect!

Here is how it works:

  1. Log your first pass.
  2. Then run two passes on the video file after the log is created.
ffmpeg  -i your-video-file.mp4  -b:v 0  -crf 30  -pass 1  -an -f webm -y /dev/null
ffmpeg  -i your-video-file.mp4  -b:v 0  -crf 30  -pass 2  output.webm

You can read more about the details of this approach here.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.