You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: compress with an odd maxWidth fails with a libx264 "not divisible by 2" error #239
maxWidth: 637 is a value an agent might pick, and it fails with a cryptic encoder error and no output. #47 fixed odd dimensions in the other re-encode tools, but compress was missed.
Evidence
src/utils/media.ts:505: args.push("-vf", scale='min(${opts.maxWidth},iw)':-2). maxWidth is only validated as a positive integer.
Repro: maxWidth: 637 → libx264 "width not divisible by 2 (637x358)".
Suggested approach
Use scale='trunc(min(N,iw)/2)*2':-2 (always even, never upscales), or reject odd values with validateEvenDimension like the other tools.
Done when
A unit test asserts the filter for odd maxWidth, and an ffmpeg-backed test produces a file.
Hi! I'd like to fix this issue and submit a PR so compress handles odd maxWidth values cleanly without failing with a libx264 width-not-divisible-by-2 error.
Activity
CG-5228 commentedon Oct 25, 2026
Hi! I'd like to fix this issue and submit a PR so
compresshandles oddmaxWidthvalues cleanly without failing with alibx264width-not-divisible-by-2 error.fix: full-target capture, % in output paths, odd compress width, exac…