diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
| commit | 8cbadb61604667b407b53ee1258433994fa4765a (patch) | |
| tree | 97765fb29418fd6278fcb4cbb9760893afaf7a58 /local/bin/screencast | |
Diffstat (limited to 'local/bin/screencast')
| -rwxr-xr-x | local/bin/screencast | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/local/bin/screencast b/local/bin/screencast new file mode 100755 index 0000000..9ea3683 --- /dev/null +++ b/local/bin/screencast @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +printf "Title: " +read TITLE +printf "Sound device (ex: default, 1, 2): " +read SNDDEV + +TITLE="$(echo $TITLE | sed 's/ /_/g')" +DIRNAME="$TITLE-$(date '+%s')" +mkdir -p "$HOME/videos/screencasts/$DIRNAME" + +ffmpeg -loglevel fatal -video_size 1600x900 -framerate 30 -f x11grab -i :0.0 -c:v libx264 -preset veryfast "$HOME/videos/screencasts/$DIRNAME/video.mkv" & printf "Video recording started.\n" +aucat -f snd/$SNDDEV -o "$HOME/videos/screencasts/$DIRNAME/audio.wav" > /dev/null & printf "Audio recording started.\n\n" + +printf "Press enter to stop recording" +read lol +kill $(pgrep ffmpeg) +kill $(pgrep aucat) + +cd "$HOME/videos/screencasts/$DIRNAME" +ffmpeg -loglevel fatal -i video.mkv -i audio.wav -c copy final.mkv |
