How target-size compression works
A hard file-size target becomes a bitrate budget. The finished file, not an estimate, decides whether the target was met.
Reviewed 2026-09-01
Start with bytes and duration
A target contains a fixed number of bits. Dividing usable bits by measured duration gives the average bitrate that the complete file can afford.
Convert first subtracts a configurable container allowance. If audio exists, it reserves a bounded audio bitrate. Video receives the remaining budget.
Match resolution to bitrate
The same video bitrate has to describe every pixel in every frame. A 1080p picture has more than twice as many pixels as 720p, so an extremely tight budget can look worse when resolution is preserved.
The planner walks a documented ladder without upscaling. It selects the highest even-dimension candidate with enough bits per pixel and frame for the chosen quality approach.
Use two passes for a hard target
The first video pass measures complexity across the full clip. The second spends more bits on difficult scenes and fewer on simple scenes while following the average bitrate budget.
Audio is written on the second pass. MP4 metadata, chapters, subtitles, attachments, and extra streams are not copied.
Verify and retry once
Container overhead and encoder behavior can still move the final size. Convert measures the file with the filesystem, re-probes its streams, and allows one bounded retry with a lower budget when needed.
If the retry remains over target, the job reports a target miss. It does not hide the difference or call the output successful.