From 4220c8b2c4a9aff34c1ffedaf90d092ce5329da7 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Tue, 11 Apr 2023 22:22:54 -0400 Subject: chore: clean up unused ffmpeg scripts --- toggle-screencast.sh | 57 ---------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100755 toggle-screencast.sh (limited to 'toggle-screencast.sh') 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 -- cgit v1.2.3