Same presets, same version, different results when running from the CLI
I am trying to compress my personal videos using HandBrake. I've chosen the H.265 NVENC 1080p, only modified the quality factor and switched to the slowest preset.
The next step was to batch run this for all my videos inside nested folders. The GUI does not support this, and it seems like there are no plans to include this feature, so I've made a Bash script that does this for me. The core instruction is the following:
HandBrakeCLI --preset-import-gui -Z "H.265 NVENC 1080p (mine)" -i "$file" -o "./hb/$file"
This works well and the file is compressed,but to a lesser extent than the same settings on the GUI. A video from WhatsApp went from 8,1 MiB to 4,8 MiB (CLI) and 4,2 MiB (GUI), a 14% difference. This means a few extra GiB extra in my entire directory. It's not a huge deal, but it's a very odd behavior not mentioned anywhere on the open web.
The log seems identical to the one on the GUI. Both are running the latest version available on the Fedora 44 repositories, which I recognize are very old.
I've recompiled the latest version locally, the results are the exact same.
GUI:
Runtime environment: Native
Commit hash: e9ff2bdf1
Build date: 2024-06-21 00:00:00
GTK version: 4.22.4 (built against 4.22.4)
GLib version: 2.88.2 (built against 2.88.1)
Built with support for:
- Intel QuickSync
- Nvidia NVEnc
- fdk-aac
- x265
CLI:
HandBrake 20240621000000-e9ff2bd-unknown