This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] Cropping doesn't work properly on latest version.
#1
Hi!

Win 11 26H2.
Latest version  2026.10.09.does not autodetect black bars for cropping at all and also latest experimental (2026.11.23.1) detects them wrong.

What to do to reproduce: 

1. load whatever video file that contains black bars
2. hit the auto crop button
3. result = black bars are either not detected properly or not at all

I can still set the values manually.

Please see attached images. 

Thank you.


Attached Files Thumbnail(s)
           
Reply
#2
Works fine here on

In your first screen shot the the right side is probably cropped too much tue to the luma value, depending on the characteristics of your source.
No clue for the second screenshot, my guess is that there is a frame where the full frame is active.

Can you share:
a. small clips that allow to reproduce the issue
b. a debug output of the crop analysis (first run not a later one, since that would take hit the cache)
if your sources black bars have a luma value > 24 you will need to adjust "Crop/Resize->Misc->Advanced Auto Crop Options"

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Here's the debug output.

I tried 3 different files, either crop is not detected at all or is wrong.


Attached Files
.zip   HybridDebugOutput.zip (Size: 45,55 KB / Downloads: 6)
Reply
#4
Hybrid does call:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -hide_banner -nostdin -skip_frame nokey -ss 580.893 -apply_cropping codec -i "E:\TEMP\Soylent Green (1973, Richard Fleischer) 1080p 1ch.mkv" -map 0:0 -an -sn -dn -vf cropdetect=24:2 -frames:v 12 -f null NUL
where "-vf cropdetect=24:2" means:
24 = max level detected as border
2 = adjust to modulo 2
the output is:
2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:2815 t:2.815000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 1/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:3774 t:3.774000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 2/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:4734 t:4.734000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 3/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:5735 t:5.735000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 4/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:6736 t:6.736000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 5/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:7695 t:7.695000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 6/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:8654 t:8.654000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 7/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:9614 t:9.614000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 8/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:10573 t:10.573000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 9/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:10781 t:10.781000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 10/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800. 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: CropDetection output: [Parsed_cropdetect_0 @ 00000164501d0300] x1:0 x2:1919 y1:139 y2:939 w:1920 h:800 x:0 y:140 pts:11782 t:11.782000 limit:24.000000 crop=1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: Crop info: 1920:800:0:140 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: AutoCrop scanned 11/108 frames. (current section 1 of 9) 2026.11.24 - 18:54:24_Windows 11 Version 26H2 (64bit)_2026.11.23.1 - level 9: -> Current crop resolution 1920x800.
Hybrids parsing seems to be correct (assuming the right side values have a luma value <= 24).

My guess is that there is some issue with the analysis in ffmpeg.
(can't reproduce this here, analysed 25 samples here, which all worked fine)


Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
So I installed FFmpeg 9.1, pointed the program at that executable.

That didn't do anything.

Then I set "Threshold/mod/count" to "16/2/500" and "Sections to scan" to 14.

That fixed cropping for 2 of the 3 files. 

Guess I'll try playing with those values some more.
Or wait for a new version  Big Grin
Reply
#6
A new version will not change the default behavior.
The 24 is used as a default to account for content where tv and pc scale got mixed up. Smile
The advanced auto crop options are exactly for the case where the defaults do not work well for a source.

For example here is a source where the borders use luma 27 and thus crop threshold would need to be raised to 28.

Cu Selur

Ps: got an idea for an autothreshold option, but would need test samples for it.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)