Skip to content

ecompress 2.2.0

Choose a tag to compare

@priyadip priyadip released this 17 Aug 19:57
· 5 commits to main since this release
pip install --upgrade ecompress

Fixed

A size floor is now reachable even at source resolution.

2.0.1 taught the search to climb when the encoder could not spend its budget, and 2.1.0 made the opening guess accurate. Both worked through -b:v, an average bitrate target - and libx264 will not pad a stream with bits the content does not call for. On very compressible video it undershoots whatever number it is given, so once the climb reached the source resolution there was nowhere left to go and the result still fell short of the floor.

The search now switches to -crf, which fixes a quality level rather than an average rate, so lowering it always produces more bits. Measured on static but detailed 4K:

ABR 400 kbps  ->  280 kbps   (saturated, will not spend more)
CRF 24        ->  564 kbps
CRF 16        ->  786 kbps   (2.8x)

A clip that previously stopped at 752 KB against a 1.01 MB floor now lands at 1.18 MB, still at full 3840x2160.

Changed

When saturation is detected the climb jumps straight to the source resolution instead of stepping one rung at a time. For content that cannot absorb bits the source is both the largest file and the best quality, so the intermediate rungs cannot help - and skipping them saves several encodes on large sources.

424 tests, 86% coverage, verified on Linux, macOS and Windows across Python 3.10-3.13.