Re-encoding a movie to H.265 is easy. Any GPU will happily hand you a file half the size. The hard part is the question nobody asks: is it actually as good? A smaller file that looks worse is not a saving, it is a downgrade you will find out about halfway through a film.
Measure, then decide
Before converting a film, lombo-shrink encodes six 20-second samples spread across it at a few quality settings, and scores each against the original with VMAF (a perceptual quality metric; 95 is roughly “you can’t tell”). A setting passes only if the average is at least 95 and the worst 5% of frames still score at least 90. Averages hide the one ugly dark scene; the 5th percentile doesn’t.
On a high-bitrate 1080p film, the default setting produced a file 47% the size of the original at a VMAF of 98.1. On a low-bitrate source, the most aggressive setting produced a file bigger than the source. Which is why the next rule exists.
The swap rules
A converted file only replaces the original if all of this holds: it is at least 20% smaller, it has the same number of video frames, and it decodes cleanly from start to end. Anything else is rejected and the original stays. Nothing is ever written to the library directly: the output goes to a separate folder, and the swap is its own careful step.
The lesson
It is the same lesson as shipping a model: a metric you didn’t check is a guess. “Smaller” was never the goal. “Smaller and provably not worse” was.