Tool

Video Resize Calculator

When you shrink 4K to 1080p or fit horizontal video into a vertical frame, this calculates the numbers that satisfy the aspect ratio and the even-size or multiple conditions at the same time. For a source that is not 16:9, such as 4096×2160 (DCI), the result depends on whether you choose ‘black bars’ or ‘center crop,’ so compare the final size and the filter for both methods side by side. The values you enter are processed only inside your browser.

1. Source size (width and height from ffprobe, as displayed after rotation)

Aspect ratio 1.896 · 8,847,360 pixels

2. Target box (the largest size the result may reach)

When the aspect ratios differ

Round width and height to a multiple of

Even sizes are required when you make H.264 or HEVC in yuv420p. Pick a multiple of 4, 8 or 16 only when a particular device, editor or encoder setting asks for it. If the box is not a multiple, the box is rounded down to one.

3. Result

Output resolution 1920×1080

Aspect ratio 16:9 (1.778) · pixel count is 23.4% of the source

  • The inner video of 1920×1012 is placed at (0, 34) and the remaining 6.3% is filled with black.

fps for the H.264 level check

H.264 treats 1920×1080 as 1920×1088 (rounded up to multiples of 16, 8,160 macroblocks), and the lowest level that holds 30 fps is 4 (maximum fps at this level: 30). See the level calculator for the full table.

ffmpeg filter (the value to put after -vf)

scale=1920:1012,pad=1920:1080:0:34:black

Full ffmpeg command example (CRF 20 is an example value)

ffmpeg -i input.mp4 -vf "scale=1920:1012,pad=1920:1080:0:34:black" -c:v libx264 -crf 20 -preset medium -pix_fmt yuv420p -c:a copy output.mp4

Because the numbers are calculated in advance, you get the same result on any ffmpeg without -2 or force_divisible_by. The command was not verified by running it.

HandBrake values (Dimensions tab)

Filling with black bars may not exist in some HandBrake versions (not verified), so no values are given. If you need bars, use the ffmpeg filter above. To keep the aspect ratio without bars, choose “Keep aspect ratio.”

Menu names can differ between versions, and they were not verified.

All calculations happen only inside this browser, and nothing is sent anywhere.

How does the tool calculate this?

  1. Keep aspect ratio: it finds the largest size that fits inside the box. It multiplies the source by the smaller of the horizontal scale (box width ÷ source width) and the vertical scale, and rounds to the multiple you chose (even, 4, 8 or 16). If the result goes over the box, it rounds down. If the resulting aspect ratio is slightly off from the source, it tells you the error (%).
  2. pad: it places the aspect-preserving smaller video in the center of the box and fills the rest with black. The inner video gets an even size and an even position (because the color information in yuv420p works in 2×2-pixel units).
  3. crop: it cuts an area with the same aspect ratio as the box from the center of the source and fits it to the box size. It also shows the share of the picture that is thrown away.
  4. H.264 level: it rounds the output size up to multiples of 16 (macroblocks) and finds the lowest level that can hold the fps you chose, from the same spec table as the level calculator. 1080 is not a multiple of 16 (16×67.5), so 1920×1080 is calculated internally as 1920×1088.
  5. Bits per pixel (bpp): the bitrate ÷ (width × height × fps). It appears only when you enter a bitrate. Whether the value is enough is not decided by this calculator but on the measured curve of the bits-per-pixel judge.

Every number in this tool is arithmetic on your input plus values from the spec table. It does not calculate quality (VMAF) or file size. How much quality is left after you shrink a video and scale it back up is in the measurement article and the 4K to 1080p guide (Korean).

Where people get stuck

  • The ‘width not divisible by 2’ error: if you leave one side on automatic (-1), as in scale=1280:-1, the calculated result can be odd, and H.264 and HEVC encoders that encode to yuv420p usually reject it. Using -2 instead of -1 is known to make it round to an even number. This tool calculates the numbers in advance and puts them in.
  • DCI 4096×2160: its aspect ratio is 256:135 (about 1.896), wider than 16:9 (about 1.778). Fitting it as-is into a 1920×1080 box leaves black bars at the top and bottom (pad), and filling the box means cutting off the left and right (crop). Compare the results of the tool’s two methods.
  • Vertical video: a vertical phone video is sometimes stored as horizontal in the file with only rotation metadata attached. Enter the size as it appears after rotation is applied. You can see the rotation metadata with the rotation flag checker. Putting vertical video into 1920×1080 leaves large margins on the left and right, and putting horizontal video into a vertical frame (1080×1920) leaves them on the top and bottom.
  • Multiples of 16: in the usual case of yuv420p, even is enough. Choosing a multiple of 16 lowers 1080 to 1072, so you get a note that the box shrank. Which devices or software require a multiple was not checked by this site.
  • Enlarging: if you pick a box larger than the source, a warning appears. Adding pixels does not add information. The fake upscale detector deals with the same problem from the other side.

How do I use the result?

  • Copy the filter: paste the ffmpeg filter straight after -vf, or chain it with other filters (subtitles, crop and so on) using commas. If the video already has black bars, it is better to crop them first with the black bar crop detector.
  • Finish the command: the -crf 20 in the full command is an example. Choose the value with the CRF recommender and the option combination in the ffmpeg command builder.
  • Choosing a bitrate: if you reduce the resolution, the bits per pixel go up at the same bitrate. Enter only the source bitrate in the tool’s bpp field and it shows that value right away.

Limits worth knowing

  • It assumes square pixels (SAR 1:1). For video whose pixel aspect ratio is not 1:1 (some camcorders and DVD-type sources), the display size and the stored size differ, so this calculation may not be right.
  • The commands and HandBrake values were not verified by running them. The filters used are scale, pad and crop, and the options follow the notation in the ffmpeg documentation. HandBrake menus differ by version, so only the values are given, and since support for filling with black bars could not be confirmed, no values are generated for it.
  • It does not let you choose the downscaling filter algorithm (bicubic, lanczos and so on). The quality difference between choices was not measured in this tool; see the guide above.
  • The H.264 level looks only at the frame size and the macroblocks-per-second limit. It does not judge the bitrate limit, the profile, or what a playback device actually supports.