Geometry contract
Some pixel formats and encoder paths impose chroma-alignment constraints. Meanwhile, a crop filter can align its result to the input's subsampling grid unless its behavior is controlled. These are different stages: a requested odd crop might already have been rounded before the encoder sees it. The task owns that narrow geometry pipeline, rather than repeating general portrait-versus-landscape advice. Keep the original source and write down whether the approved region may lose a pixel or must instead be padded.
Build the evidence
- 01
State the retained-pixel policy
Mark the exact source rectangle and the corner that must remain fixed. Decide whether a neutral extra row and column are acceptable. Padding preserves the retained image dimensions while expanding the canvas; cropping removes content; scaling resamples it. Those operations should not be interchangeable in the handoff. For two performers near opposite borders, even a small crop policy should be reviewed against hands, hair and reference placement.
- 02
Control the processing order
The example converts to 4:4:4 before requesting the odd crop, then pads up to even dimensions and finally converts to 4:2:0. It uses the upper-left origin so the added border lies on the right and bottom. This makes the geometry decision inspectable; it is not a universal color-fidelity prescription. Record the source format and compare a short test because pixel-format conversions can also alter chroma representation.
- 03
Verify geometry and picture separately
Read the exported width, height, sample aspect ratio and pixel format, then inspect the saved borders and important contours at native scale. A 320×240 output confirms canvas size, not that the correct 319×239 region survived. Check the chosen crop with known landmarks or a test pattern before using the recipe on actual performance media. Afterward confirm source duration, size and playback independently before uploading.
A bounded example
Local executed example: a synthetic 320×240 H.264 source was processed through the listed 4:4:4 crop, even-dimension padding and 4:2:0 encode under FFmpeg 7.1. The command completed and produced a 320×240 output. No human subject was used. This validates the geometry recipe's execution on that fixture, not the quality of a real face reference or the acceptability of an extra border for every publishing destination. Retain a marked screenshot of the approved rectangle so another editor can distinguish the intended added border from an accidental framing shift.
Local diagnostic commands
The FFmpeg recipe was executed successfully on a local synthetic 320×240 fixture with FFmpeg 7.1. The ffprobe verification command is a documentation example and was not executed locally. No paid generation was performed.
ffmpeg -n -i source.mp4 -map 0:V:0 -vf "format=yuv444p,crop=319:239:0:0,pad=ceil(iw/2)*2:ceil(ih/2)*2:0:0,format=yuv420p" -an -c:v libx264 geometry-safe.mp4
ffprobe -v error -select_streams V:0 -show_entries stream=width,height,pix_fmt,sample_aspect_ratio -of json geometry-safe.mp4Geometry contract
| Stage | Expected dimensions | Purpose |
|---|---|---|
| Approved retained crop | 319×239 | Exact selected rectangle |
| Padded canvas | 320×240 | Keep region without stretching |
| Encoded output | 320×240, yuv420p | Compatibility target, still visually checked |
Acceptance evidence
- The approved rectangle and padding origin are recorded explicitly.
- No accidental scale operation substitutes for the agreed crop or pad.
- The exported dimensions and pixel format match the compatibility target.
- Both performers and the added borders receive a visual check.
Stop condition
Stop if the destination forbids any border or the approved crop cannot preserve required detail. Return to composition planning instead of silently stretching faces. If color fidelity matters, have the conversion chain reviewed; a successful geometry fix should not conceal a separate chroma or color-management change.
