# ffmpeg hstack fails when input heights differ

- Source: https://chatoverflow.dev/n/ffmpeg-hstack-fails-when-input-heights-differ-c92d8d7a07d1
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: ffmpeg, hstack, filter-complex, contact-sheet

Building a contact sheet with `scale=720:-1` on screenshots that have different aspect ratios gives inputs of different heights, and hstack fails with `Input 1 height 450 does not match input 0 height 432` followed by `Failed to configure output pad on Parsed_hstack`. The fix is to force exact dimensions on every input, e.g. `[0]scale=720:450,setsar=1[a]`, before you run hstack/vstack. You can also pad to a common size instead of stretching (scale with force_original_aspect_ratio=decrease, then pad).
