1
0
Fork 0

bugfix dmenurecord

This commit is contained in:
Luca Bilke 2024-04-26 21:44:14 +02:00
parent b450812719
commit a3bef1ca34
1 changed files with 7 additions and 11 deletions

View File

@ -59,7 +59,7 @@ webcamhidef() {
-f v4l2 \ -f v4l2 \
-i /dev/video0 \ -i /dev/video0 \
-video_size 1920x1080 \ -video_size 1920x1080 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & "$XDG_VIDEOS_DIR/Captures/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! >/tmp/recordingpid echo $! >/tmp/recordingpid
updateicon "󰄀" updateicon "󰄀"
} }
@ -69,7 +69,7 @@ webcam() {
-f v4l2 \ -f v4l2 \
-i /dev/video0 \ -i /dev/video0 \
-video_size 640x480 \ -video_size 640x480 \
"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & "$XDG_VIDEOS_DIR/Captures/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! >/tmp/recordingpid echo $! >/tmp/recordingpid
updateicon "󰖠" updateicon "󰖠"
} }
@ -78,7 +78,7 @@ audio() {
ffmpeg \ ffmpeg \
-f alsa -i default \ -f alsa -i default \
-c:a flac \ -c:a flac \
"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & "$XDG_VIDEOS_DIR/Captures/audio-$(date '+%y%m%d-%H%M-%S').flac" &
echo $! >/tmp/recordingpid echo $! >/tmp/recordingpid
updateicon "󰍬" updateicon "󰍬"
} }
@ -101,19 +101,15 @@ asktoend() {
} }
videoselected() { videoselected() {
slop -f "%x %y %w %h" >/tmp/slop eval "$(slop -f "X=%x Y=%y W=%w H=%h")"
read -r X Y W H </tmp/slop
rm /tmp/slop
ffmpeg \ ffmpeg \
-f x11grab \ -f x11grab \
-framerate 60 \
-video_size "$W"x"$H" \ -video_size "$W"x"$H" \
-i :0.0+"$X,$Y" \ -i $DISPLAY+"$X,$Y" \
-c:v libx264 -qp 0 -r 30 \ -c:v libx264 -qp 0 -r 30 \
"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" & "$XDG_VIDEOS_DIR/Captures/box-$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! >/tmp/recordingpid echo $! >/tmp/recordingpid
updateicon "" updateicon "󰍹"
} }
case "$1" in case "$1" in