Skip to content

Instantly share code, notes, and snippets.

@radarsat1
Created August 26, 2016 19:01
Show Gist options
  • Save radarsat1/7809c8bf702385ceb3472d740a410617 to your computer and use it in GitHub Desktop.
Save radarsat1/7809c8bf702385ceb3472d740a410617 to your computer and use it in GitHub Desktop.
ffmpeg video tiling
#!/bin/bash
# tile four videos using ffmpeg
VID1="$1"
VID2="$2"
VID3="$3"
VID4="$4"
OUT="$5"
# ffmpeg's complex filter graph is powerful!
TILE="[0:v][1:v]hstack[top];[2:v][3:v]hstack[bot];[top][bot]vstack"
ffmpeg -i "$VID1" -i "$VID2" -i "$VID3" -i "$VID4" -filter_complex "$TILE" "$OUT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment