Every few weeks I hit the same wall: I have a 300 MB screen recording, and something on the other end wants it under 8 MB. Discord, an email attachment, a bug tracker, a form that silently rejects anything bigger.
The usual advice is "just use HandBrake" or "run ffmpeg with a lower CRF." But CRF doesn't take a target size — it takes a quality knob. So you export, check the size, it's 11 MB, nudge the knob, export again, now it's 5 MB and looks like a potato, nudge back… It's a binary search you run by hand, one full encode per guess.
The thing is, hitting an exact size isn't a guessing game at all. It's arithmetic you can do before you encode. I ended up wrapping that arithmetic into a little Rust CLI (. But now you know what it's doing under the hood, and you could write the core of it in an afternoon.
What's your go-to trick for wrangling ffmpeg? I'm always looking for edges I haven't hit yet.
SOCIAL SHARE CARD GENERATOR