diff options
author | Adam T. Carpenter <atc@53hor.net> | 2023-04-11 22:22:54 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2023-04-11 22:22:54 -0400 |
commit | 4220c8b2c4a9aff34c1ffedaf90d092ce5329da7 (patch) | |
tree | 0d1384b129d82994d4a23183f967c4a4330929f7 /toggle-screencast.sh | |
parent | 1618f44c0c80414552663fb590859f65bd4bbffc (diff) | |
download | scripts-4220c8b2c4a9aff34c1ffedaf90d092ce5329da7.tar.xz scripts-4220c8b2c4a9aff34c1ffedaf90d092ce5329da7.zip |
chore: clean up unused ffmpeg scripts
Diffstat (limited to 'toggle-screencast.sh')
-rwxr-xr-x | toggle-screencast.sh | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/toggle-screencast.sh b/toggle-screencast.sh deleted file mode 100755 index d99b32e..0000000 --- a/toggle-screencast.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -output_dir=~/videos/screencasts -#sound_device=/dev/dsp4.0 -#-thread_queue_size 512 -f oss -i "$sound_device" \ - -prompt_transcode() { - choice=$(dmenu -p "Transcode now?" << EOF -no -yes -EOF - ) - output_file="$output_dir"/cast_"$(date '+%F-%H-%M-%S')" - if [ $choice == "yes" ] - then - transcode_now "$output_file".mp4 - else - transcode_later "$output_file".mkv - fi -} - -transcode_now() { - notify-send "Transcoding..." "$1" - ffmpeg -i /tmp/cast.mkv "$1" && rm /tmp/cast.mkv - notify-send "Transcode done!" "$1" -} - -transcode_later() { - mv /tmp/cast.mkv "$1" - notify-send "Screencast saved!" "$1" -} - -start_recording() { - touch /tmp/cast.mkv - notify-send -t 3000 "Starting screencast." "3...2...1..." - sleep 4 - pkill -76 i3blocks - ffmpeg -video_size 2560x1440 \ - -framerate 25 \ - -thread_queue_size 512 -f x11grab -i :0.0+0,0 \ - -vcodec libx264rgb -crf 0 -preset:v ultrafast \ - -acodec pcm_s16le \ - -af aresample=async=1:first_pts=0 \ - -y \ - /tmp/cast.mkv -} - -stop_recording() { - pkill -2 ffmpeg - notify-send "Screencast stopped." - prompt_transcode - pkill -76 i3blocks - exit -} - -# main -mkdir -p "$output_dir" -[ -f /tmp/cast.mkv ] && stop_recording || start_recording |