Skip to content

Instantly share code, notes, and snippets.

@akx
Created March 4, 2020 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akx/61cf0365d3d440e402be39f599942154 to your computer and use it in GitHub Desktop.
Save akx/61cf0365d3d440e402be39f599942154 to your computer and use it in GitHub Desktop.
ffmpeg \
-video_size 1200x400 \
-framerate 30 \
-f x11grab \
-i :0.0+0,0 \
-pix_fmt yuv420p \
-filter_complex "
color=size=800x800:c=black [base];
[0:v] setpts=PTS-STARTPTS, crop=w=800:h=400:x=0:y=0 [row1];
[0:v] setpts=PTS-STARTPTS, crop=w=400:h=400:x=800:y=0 [row2];
[base][row1] overlay=shortest=1:x=0:y=0 [tmp1];
[tmp1][row2] overlay=shortest=1:x=0:y=400
" \
-f sdl "SDL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment