Brian Perondi … Ideas At Random

Using FFmpeg on a Macbook M3 to convert a .mov file to .mp4, lower the resolution and reduce file size

I needed to convert a screencast created using Mac’s native screen recorder that saves the file as a .mov file. It also was at a resolution and file size that I needed to reduce.

Installed ffmpeg and ran the conversion via the command-line.

Used the learnwithjason.dev post “Hardware Accelerated Video Encoding on Apple Silicon (M1 Max, etc.) With FFmpeg” and modified the example to produce an output file at 20 percent and converted to an .mp4 file.

Example Code:

ffmpeg -i “Screen Recording 2024-01-05 at 11.48.44 AM.mov” -acodec copy -c:v h264_videotoolbox -q:v 20 output-file.mp4

Code Notes:

-i # the file to convert
-acodec copy #don’t remove audio
-c:v h264_videotoolbox # use Apple Silicon hardware acceleration
-q:v 20 # quality for the output file is 0 to 100
output-file.mp4 # Name of the new output file