From 87a1175a3ed45fbb8526a14b671f823d5ca9c105 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Jun 2024 20:43:41 +0300 Subject: [PATCH] Add video grab for wayland --- docs/progs/ffmpeg.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/progs/ffmpeg.md b/docs/progs/ffmpeg.md index 04dbff3..8d2e39c 100644 --- a/docs/progs/ffmpeg.md +++ b/docs/progs/ffmpeg.md @@ -8,5 +8,9 @@ ffi in.mov -vf "crop=720:520:0:280" -c:v libx264 -c:a copy -b:v 1200k out.mp4 ## Grab video from screen ```bash +# For X11 ffmpeg -s 1920x1080 -framerate 10 -f x11grab -i :0 -qscale 6 out.mkv + +# For Wayland +ffmpeg -y -f kmsgrab -i - -filter_complex 'hwmap=derive_device=vaapi,hwdownload,format=bgr0,crop=1540:940:380:100' out2.mkv ```