Unreliable automatic cropping

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
MiMoHo
Posts: 20
Joined: Sun Dec 25, 2016 10:38 pm

Unreliable automatic cropping

Post by MiMoHo »

Please describe the problem in as much detail as possible:
I'm experiencing the automatic cropping feature to be quiet unreliable as it often not only removes the black bars but real video content as well, especially when clips contain different formats which is widespread among older DVD bonus material. Let's say there is 4:3 and 16:9 footage mixed together, the program seems to rather choose to crop instead of scanning the largest frame all over the footage.

What are the steps to reproduce this problem:
Download this sample video https://we.tl/N8J7RFj2P6 and watch the preview in automatic cropping mode. HandBrake will make it a 16:9 image which would shrink the 4:3 upper and lower picture fields. This occurs randomly for mixed 16:9 and 21:9 footage as well.

What version of HandBrake you are running:
1.0.1 latest

What operating system and version are you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Mac OS X 10.11.6

If there was any exception or error displayed, please copy it and paste it here:

Please include the scan or encode log:

Code: Select all

 Paste your log here between the code brackets, or use a pastebin website. 
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Unreliable automatic cropping

Post by rollin_eng »

You can set the number of preview frames in the preferences, try changing that to see if it helps.
MiMoHo
Posts: 20
Joined: Sun Dec 25, 2016 10:38 pm

Re: Unreliable automatic cropping

Post by MiMoHo »

No, not at all
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Unreliable automatic cropping

Post by rollin_eng »

Could you please post your logs, instructions can be found here:

viewtopic.php?f=6&t=31236
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: Unreliable automatic cropping

Post by Woodstock »

Automatic takes a certain number of frames distributed throughout the video, and figures out where to crop based on that. As pointed out above, you can increase the number of samples taken, but it is still possible that NONE of the samples will include a frame that has the "correct" area to crop.

Changing the aspect ratio within a single file is an unusual.
Deleted User 11865

Re: Unreliable automatic cropping

Post by Deleted User 11865 »

Woodstock wrote:Changing the aspect ratio within a single file is an unusual.
Not necessarily that unusual -- in addition to the bonus DVD content mentioned by the OP, several IMAX titles alternate between widescreen and cinemascope on their DVD/Blu-ray releases.

But yes, autocrop never works with multiple aspect ratios, you'll always have to adjust cropping manually for such sources. It's designed to work with sources where the aspect ratio is the same throughout.

It could be modified to work with alternating ratios, but that would in turn make it unreliable for "standard" sources, because it would result in little to no crop in almost every case (for variable aspect ratios, setting crop to all zero is almost always the correct solution, BTW). Basically, our autocrop only works well when it's tuned to crop somewhat "aggressively", and making it work more reliably for all type of sources would require much more complex analysis, which means a lot of significant work.

As always, patches welcome!
Deleted User 39938

Re: Unreliable automatic cropping

Post by Deleted User 39938 »

I would like to add something I just noted (using HandBrake-20170115-a9b099a_x86_64-Win_GUI.exe)

Opened a file with 720x576, automatic cropping was enabled and correctly discovered black bars (12 top and 10 bottom). But surprisingly the height was set to 380. And even if I manually crop and set everything to 0 the height was 396 in the end instead of 576.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Unreliable automatic cropping

Post by rollin_eng »

wolfpac wrote:I would like to add something I just noted (using HandBrake-20170115-a9b099a_x86_64-Win_GUI.exe)

Opened a file with 720x576, automatic cropping was enabled and correctly discovered black bars (12 top and 10 bottom). But surprisingly the height was set to 380. And even if I manually crop and set everything to 0 the height was 396 in the end instead of 576.
Could you please post your logs, instructions can be found here:

viewtopic.php?f=6&t=31236
Deleted User 39938

Re: Unreliable automatic cropping

Post by Deleted User 39938 »

http://pastebin.com/YmkAj3KX

Relevant line should be 312 and 313. A test with full hd video didn't show the strange behavior.
Post Reply