How does cropping modify the file size ?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
jonas0_13
Posts: 4
Joined: Wed Dec 04, 2019 7:04 pm

How does cropping modify the file size ?

Post by jonas0_13 »

Hello !
I am a completely new user of handbrake, so I might ask naive and foolish question. Sorry for that :wink:
If I understand correctly how automatic cropping works, it should reduce file size, as it suppresses a part of pixels.
However it seems to be the opposite. When I disable automatic cropping (setting cropping to "custom" and "0") the output file is about 5% smaller than with automatic cropping.
Does anyone be kind to explain me why ?
Thanks :)

musicvid
Veteran User
Posts: 3456
Joined: Sat Jun 27, 2009 1:19 am

Re: How does cropping modify the file size ?

Post by musicvid »

CRF encoding does not use linear math, but bases output on the information it is given.
To see sizes "closer" to their relative resolution, choose ABR.

User avatar
JohnAStebbins
HandBrake Team
Posts: 5535
Joined: Sat Feb 09, 2008 7:21 pm

Re: How does cropping modify the file size ?

Post by JohnAStebbins »

Black borders can have unintuitive effects on encoding because the borders are going to skew some of the analysis that is done during encoding. The encoder makes sub-optimal decisions about how to encode the image because part of the image was very simple and easy to compress (the black border). The encoder can pretty much perfectly reproduce the black border in very few bits. The high quality of the encoded black border makes it think it can skimp on quality in other places (like the actual active video region). These poor decisions result in lower quality in the places that matter (and smaller file size) for the resulting output.

grandmastashi
Posts: 2
Joined: Thu Dec 05, 2019 9:09 am

Re: How does cropping modify the file size ?

Post by grandmastashi »

Very interesting to learn this as i'm just in the process of re-encoding my Blu-Rays so trying to land on my 'best' formula, and have gone back and forth on cropping the border.

So John if i've got what you're saying right, it's actually better to crop the border because its presence can negatively effect the quality of the final video file?

What's the recommended approach on sources where the aspect ratio changes ie The Dark Knight?

rollin_eng
Veteran User
Posts: 3297
Joined: Wed May 04, 2011 11:06 pm

Re: How does cropping modify the file size ?

Post by rollin_eng »

For sources that change aspect ratio you are stuck, it’s up to you.

grandmastashi
Posts: 2
Joined: Thu Dec 05, 2019 9:09 am

Re: How does cropping modify the file size ?

Post by grandmastashi »

rollin_eng wrote:
Thu Dec 05, 2019 5:29 pm
For sources that change aspect ratio you are stuck, it’s up to you.
I figured as much, thank you.

jonas0_13
Posts: 4
Joined: Wed Dec 04, 2019 7:04 pm

Re: How does cropping modify the file size ?

Post by jonas0_13 »

Thank you very much to all of you :)
Very clear answers !

Post Reply