
答え1
傾斜(ユーザーの選択を照会し、領域をstdoutとして印刷するアプリケーション)は、あなたの目的に最も簡単なツールのようです...なぜなら... ;-)
slopは3行のコードでビデオ録画スクリプトを作成します。
#!/bin/bash
slop=$(slop -f "%x %y %w %h %g %i") || exit 1
read -r X Y W H G ID <<< $slop
ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y -f alsa -i pulse ~/myfile.webm