summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2023-04-11 22:22:54 -0400
committerAdam T. Carpenter <atc@53hor.net>2023-04-11 22:22:54 -0400
commit4220c8b2c4a9aff34c1ffedaf90d092ce5329da7 (patch)
tree0d1384b129d82994d4a23183f967c4a4330929f7
parent1618f44c0c80414552663fb590859f65bd4bbffc (diff)
downloadscripts-4220c8b2c4a9aff34c1ffedaf90d092ce5329da7.tar.xz
scripts-4220c8b2c4a9aff34c1ffedaf90d092ce5329da7.zip
chore: clean up unused ffmpeg scripts
-rwxr-xr-xtoggle-screencast.sh57
-rwxr-xr-xtranscode-screencast.sh11
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"