How to tile videos from the CLI


by

# Install dependencies
brew install ffmpeg

ffmpeg -i vid1.mp4 -i vid2.mp4 -filter_complex "\
    [0:v]scale=800:-1[v1];\
    [1:v]scale=800:-1[v2];\
    [v1][v2]hstack[v]" \
    -map [v] \
    comparison.mp4
  • scale: Resize each video to 800×_
    • Use 800:450 for manual dimensions
    • Default scale is 800:-1:flags=bicubic
  • hstack: Compare horizontally (1600×_)
    • Use vstack for horizontal stacking
  • map: Grab only video stream (drop audio)

Tiled videos

If you want to overlay text, use drawtext.