Skip to content

Instantly share code, notes, and snippets.

@derchrisuk
Created February 12, 2018 11:25
Show Gist options
  • Save derchrisuk/3bf6cd7acd1d55ae881b8e99a3471a3a to your computer and use it in GitHub Desktop.
Save derchrisuk/3bf6cd7acd1d55ae881b8e99a3471a3a to your computer and use it in GitHub Desktop.
ffmpeg -i $video1 -i $video2 -i $video3 -i $video4 -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, scale=960x540 [a0]; [1:v] setpts=PTS-STARTPTS, scale=960x540 [a1]; [2:v] setpts=PTS-STARTPTS, scale=960x540 [a2]; [3:v] setpts=PTS-STARTPTS, scale=960x540 [a3]; [base][a0] overlay=shortest=0 [tmp0]; [tmp0][a1] overlay=shortest=0:x=960:y=0 [tmp1]; [tmp1][a2] overlay=shortest=0:x=0:y=540 [tmp2]; [tmp2][a3] overlay=shortest=0:x=960:y=540" -f matroska pipe:1 | ffplay -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment