five82 / batchtranscode

GNU General Public License v2.0
2 stars 1 forks source link

Further improve automatic black bar crop detection #24

Closed five82 closed 4 years ago

five82 commented 5 years ago

Here's an example crop value from FFmpeg's cropdetect: "1920:800:0:144"

Right now we compare all four numbers across five different timestamps in a video. We only need to compare the second and fourth number. The first will always be the width of the video and the third will always be zero. So we can ignore discrepancies for the first and third if any are detected. These changes will reduce the number of bad crop values we see in darker videos.

five82 commented 5 years ago

This may break non-anamorphic letterboxed 4:3 video. But these videos are a small minority so that's acceptable in my opinion. Manual crop can handle edge cases.

I'll need to test "full screen" 4:3 anamorphic SDR video.

five82 commented 5 years ago

Pushed code to the cropimprove branch. Will test next.

five82 commented 4 years ago

Backed out most of these changes after they broke all 4:3 non-anamorphic video. I did increase the number of cropdetect scans from 5 to 9 to improve accuracy. Further improvements may be needed if we see enough comparison failures.