Skip to content

Why does a narrow trim around my replacement fail an H.264 export even though it previews correctly?

Check whether the crop left an odd width or height in a common 4:2:0 delivery workflow. Round the working dimensions deliberately and check which edge loses the extra pixel.

PLAN AN EXTERNAL VIDEO REPAIRAISwapLab team · Editorial methodPublished 2 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file

Set up the edit

Write down the intended trim on each side. This example subtracts 31 by 17 pixels before rounding down to even dimensions. Inspect the final boundary next to hair or fingertips at full size.

shell
ffmpeg -i studio.mp4 -filter_complex "[0:v:0]crop=trunc((iw-31)/2)*2:trunc((ih-17)/2)*2:16:8[proof]" -map "[proof]" -fps_mode passthrough -c:v ffv1 inspection.mkv

Read the result

If only a single boundary pixel is affected, a one-pixel crop adjustment may be sufficient. If a chin or shoulder disappears, the framing decision is much larger than the encoder constraint.

With the original living-room dance, the local FFmpeg run decoded 150 video frames at 1248 × 702 pixels. Use the linked file to reproduce the example. This was an offline edit of the existing public clip.

If the first pass falls short

Keep the original framing and pad to an even size if losing the boundary is unacceptable. Retain a clean master with the original bounds.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example