View Full Version : Why does x264 waste bits on the borders?
kikker
8th September 2009, 05:17
Cropping a film from a BD with an AR of 2.35:1 results in a video-alone 1080p encode that is approximately 20% smaller in file size than one that isn't cropped (resolution of the cropped film is only 24% smaller). In fact, if the borders are cropped and Addborders() is used in the AVS script, the encode becomes actually slightly larger than the encode that wasn't cropped at all. Shouldn't the black border regions require very little bitrate?
Dark Shikari
8th September 2009, 05:21
The borders don't take any bits, the difference is that CRF's frame complexity metric takes into account the overall complexity of the frame--which is lower when you have large chunks of the frame that are completely black. Lower complexity ---> lower quantizer ---> higher bitrate.
kikker
8th September 2009, 05:33
Ah, so if I understand correctly, the reduced bitrate of the cropped version for a 1-pass encode (fixed crf) comes at the expense of the actual film. However, if I were to perform two 2-pass encodes, both at the same target file size, one with the cropped version and one with the uncropped version, the theoretical quality between the two would be almost identical. Correct?
Dark Shikari
8th September 2009, 05:41
Ah, so if I understand correctly, the reduced bitrate of the cropped version for a 1-pass encode (fixed crf) comes at the expense of the actual film. However, if I were to perform two 2-pass encodes, both at the same target file size, one with the cropped version and one with the uncropped version, the theoretical quality between the two would be almost identical. Correct?Correct, though the borders do take a small amount of bits for various reasons, so you should always crop if possible.
kikker
8th September 2009, 05:46
Yeah, but I bet we're going to find others that want BD or AVCHD device compatibility of the encode, and in order to do that, 1920x1080 is or will be a required resolution. Thanks for the help...
Sharc
8th September 2009, 19:30
The borders don't take any bits, the difference is that CRF's frame complexity metric takes into account the overall complexity of the frame--which is lower when you have large chunks of the frame that are completely black. Lower complexity ---> lower quantizer ---> higher bitrate.
Interesting to learn that black borders actually boost the quality (bitrate) of the encode for a fixed crf. I wasn't aware of this effect, but seems logical from your explanation.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.