ITADN

Suggestion: Implementing intelligent auto-cropping

#746Closedrainman74 创建于 2025-12-14
R
rainman74commented
I wrote a test script (proof of concept) to implement intelligent auto-cropping, since even FFmpeg only supports a very rudimentary auto-crop function that simply determines the crop values, requiring manual selection and adjustment. The main problem, however, is the inability to specify standard formats. After all, you don't want your film collection in dozens of formats, but rather archived only in standardized cinema and streaming formats. The scripts are in German, but you can easily run them through AI and have the functionality explained in 10 seconds. While the intelligent auto-cropping works perfectly with this, it's not the best way to do it via a PowerShell and command script when you have a ready-made app like yours that allows you to control it simply via parameters. Perhaps this is an idea you'd like to implement. Such a feature is incredibly helpful if you have to convert a lot of films daily. Example of possible parameters: ``` --auto-crop --allowed-StandardResolutions 1920x800,1920x804,1920x808,1920x812,1920x816,1920x872,1920x960,1920x1012,1920x1024,1920x1036,1920x1040,1920x1080 --allowed-StandardWidths 1420,1440,1480,1500,1780,1788,1792,1800 ``` run_probe.cmd: https://pixeldrain.com/u/4kmR4wa2 test_call.cmd: https://pixeldrain.com/u/63VC4xrG test_encode.cmd: https://pixeldrain.com/u/SCpj9BJW Start with **test_call.cmd <video_file>** and you also need ffmpeg.exe and ffprobe.exe in same path. <img width="919" height="824" alt="Image" src="https://github.com/user-attachments/assets/625626a3-47d6-4a1d-831d-b9e9264e3f62" /> A crop of less than 10px is tolerated: <img width="884" height="818" alt="Image" src="https://github.com/user-attachments/assets/ea3c421b-40c0-4fcd-9f13-6ec24416f96d" /> Unequal horizontal or vertical cropping must of course be checked manually; this must be excluded by auto-crop: <img width="1010" height="381" alt="Image" src="https://github.com/user-attachments/assets/70bba1df-5589-407b-a0be-9dde619ad120" />
关闭于 2026-01-15 2 条评论