Changing video resolution with Handbrake - anamorphic and modulus parameter
If you want to just scale the video down to a specific size, then forget all about the anamorphic settings. Simply enter your desired width and height, or choose one parameter and tick the Keep Aspect Ratio checkbox to have the other one filled out for you automatically.
Of course, if you set width and height with the wrong aspect ratio, you will squish or stretch the picture. To avoid this when converting from 1920×1080 to 640×480, you will have to crop the video at the sides, or choose a lower resolution than 640×480 – which would be 640×360 for a 16:9 aspect ratio.
Or you go with letter-/pillarboxing, but this is something Handbrake can't do, and something you should never to. We're in the digital age, and there's no need to force black bars into a video these days.
If you're up for something a bit confusing, read on.
Anamorphic means encoding the video in a distorted way, and then stretching it while playing it back to fit the right display size. This is what was done on film so as to be able to squeeze a widescreen picture into a 35mm frame, and essentially is the same digitally. Here's a nice video that explains how aspect ratios have changed over time and what anamorphic means.
In Handbrake, there are four anamorphic modes, as explained in the Anamorphic Guide:
- None, where no anamorphic is used-
- Strict, where basically, the input is taken as is – you cannot change the picture size at all
- Loose, where you can set the width of the output, and the video will be scaled down and encoded with width and height divisible by 16 (or any other if you set the modulus option).
- Custom, where you can set all options manually.
When you take your 1080p video and scale it down, you run into problems. For example, to get your video to a height of 480 pixels, you'd have to use a width of 853. But this is a problem: The encoder can only create video with height and width divisible by 2. Or let's assume you want to stay at multiples of 16, then your width can only be 848 or 864, but not the required 853. The only option you have is to encode the video at 848×480, but then it will be squished horizontally when you play it back.
To compensate for the squished video, you change the aspect ratio of every pixel (the PAR). Usually it's a square (1:1), but if your original video is actually squished to 848×480, and you make each pixel wider (PAR being about 1:1.00589), then the result can be displayed at 853×480 again.
So, even while the actual dimensions of the video produce a squished or stretched result, the output will be displayed correctly when you use the right pixel aspect ratio.