Skip to content

Instantly share code, notes, and snippets.

@u-r-w
Created July 31, 2024 03:25
Show Gist options
  • Save u-r-w/b075321951cb9954245317820a36816a to your computer and use it in GitHub Desktop.
Save u-r-w/b075321951cb9954245317820a36816a to your computer and use it in GitHub Desktop.
Ffmpeg capture screen with weebcam overlay and audio
ffmpeg -f x11grab -thread_queue_size 64 -video_size 1920x1080 -framerate 30 -i :0 \
-f v4l2 -thread_queue_size 64 -video_size 320x180 -framerate 30 -i /dev/video0 \
-f alsa -i default \
-filter_complex '[0:v][1:v]overlay=main_w-overlay_w:main_h-overlay_h:format=yuv444' \
-vcodec libx264 -preset ultrafast -qp 0 -pix_fmt yuv444p \
-c:a aac -b:a 192k \
video.mkv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment