Home

Resize A Video With FFmpeg

TL;DR

This is the FFmpeg command I use to resize videos:

NOTE: If audio doesn't copy try adding `-c:a copy``

It resizes the _in.mp4__ video to a 720 pixel wide version called _out.mp4__. The height is determined automatically.

Details

Resizing videos with FFmpeg by adding this to the command:

The WIDTH and HEIGHT can be set to arbitrary values. That includes values that don't match the original aspect ratio which would result in distorted output.

Using `-2`` on one of the dimensions automatically resizes it to fit the aspect ratio. For example, a 3840x2160 source video resized with this:

produces a video that's 1920x1080.

Putting the `-2`` on the HEIGHT works as well. For example, this also produces a 1920x1080 video from a 3840x2160 source.