Using the FFmpeg command
The generated filter first scales the video down to fit while preserving its aspect ratio, then pads it to the requested output dimensions and centers the active picture.
force_divisible_by=2 produces even scaled dimensions for common video encoders. As a result, FFmpeg bars can differ from the general pixel preview by one pixel in edge cases.
Method reference: FFmpeg scale filter and FFmpeg pad filter.
Important pixel aspect ratio note
The visual calculation assumes square pixels, which is standard for most modern web images and video. Older or anamorphic sources can store a sample aspect ratio other than 1:1, so their displayed shape may not equal width divided by height.
The generated command resets the scaled output to square pixels. A separate pixel aspect ratio calculator will cover storage, sample and display ratios later.