> video filters

Video filters are the `-vf` / `-filter_complex` transforms that reshape the picture itself: resizing, cropping, rotating, deinterlacing, and compositing text, watermarks, or blurred patches onto frames. Any of these forces a full decode-filter-re-encode pass, so they can't be combined with `-c copy` and always cost CPU and a generation of quality. This category covers the everyday geometry and overlay problems you hit when prepping footage for a specific resolution, aspect ratio, or platform.

// video filters

7 commands

// faq

How do I resize a video without stretching or distorting it?

Fix one dimension and let ffmpeg compute the other from the aspect ratio, e.g. `scale=-2:720` for 720p at any width. To hit an exact frame like 1280x720 without cropping, use `scale=1280:720:force_original_aspect_ratio=decrease` followed by `pad=1280:720:-1:-1` to letterbox with black bars.

Why does ffmpeg fail with 'width/height not divisible by 2'?

H.264 with the standard yuv420p pixel format requires even dimensions, and `scale=-1:720` can compute an odd width. Replace `-1` with `-2`, which rounds the auto-computed dimension to the nearest even number while preserving aspect ratio.

Do these filters re-encode the video, or can I use -c copy?

They always re-encode. `-vf` and `-filter_complex` decode every frame, apply the filter, and encode a new stream, so `-c copy` is incompatible and the pass is far slower than a stream copy. Set an explicit `-crf`/`-preset` to control the quality and speed of that re-encode.