diff options
-rwxr-xr-x | toggle-screencast.sh | 57 | ||||
-rwxr-xr-x | transcode-screencast.sh | 11 |
2 files changed, 0 insertions, 68 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 diff --git a/transcode-screencast.sh b/transcode-screencast.sh deleted file mode 100755 index 61a9306..0000000 --- a/transcode-screencast.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -INPUT_VIDEO=$1 -INPUT_AUDIO=$2 -OUTPUT=$3 -ffmpeg -i "$INPUT_VIDEO" \ - -i "$INPUT_AUDIO" \ - -vcodec libx264 \ - -pix_fmt yuv420p \ - -acodec aac \ - -b:a 320k \ - "$OUTPUT" |