dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c8f7a19f5a1fe63747a40f8303de5046ae30e2c3
parent cd6a02cce8a1580151f566320d521a43d781c193
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat,  1 Dec 2018 10:12:02 -0500

ALSA junk cleanup

Diffstat:
M.scripts/i3cmds/dmenurecord | 56++++++++++++++++++++++++++++----------------------------
1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/.scripts/i3cmds/dmenurecord b/.scripts/i3cmds/dmenurecord @@ -27,7 +27,7 @@ killrecording() { exit } -screencastpulse() { \ +screencast() { \ ffmpeg -y \ -f x11grab \ -framerate 60 \ @@ -41,19 +41,6 @@ screencastpulse() { \ updateicon "⏺️🎙️" } -screencastalsa() { \ - ffmpeg -y \ - -f x11grab \ - -s $(xdpyinfo | grep dimensions | awk '{print $2;}') \ - -i :0.0 \ - -thread_queue_size 1024 \ - -f alsa -ar 44100 -i hw:1 \ - -c:v libx264 -r 30 -c:a flac \ - "$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mkv" & - echo $! > ~/.recordingpid - updateicon "⏺️" - } - video() { ffmpeg \ -f x11grab \ -s $(xdpyinfo | grep dimensions | awk '{print $2;}') \ @@ -64,29 +51,42 @@ video() { ffmpeg \ updateicon "⏺️" } -audiopulse() { \ - ffmpeg \ - -f alsa -i default \ - -c:a flac \ - "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & +webcamhidef() { ffmpeg \ + -f v412 \ + -i /dev/video0 \ + -video_size 1920x1080 \ + "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & echo $! > ~/.recordingpid - updateicon "🎙️" + updateicon "🎥" } -audioalsa() { \ - ffmpeg -y \ - -f alsa -ar 44100 -i hw:1 \ +webcam() { ffmpeg \ + -f v412 \ + -i /dev/video0 \ + -video_size 640x480 \ + "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > ~/.recordingpid + updateicon "🎥" + } + + +audio() { \ + ffmpeg \ + -f alsa -i default \ + -c:a flac \ "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & echo $! > ~/.recordingpid updateicon "🎙️" } askrecording() { \ - choice=$(printf "screencast\\nvideo\\naudio" | dmenu -i -p "Select recording style:") + choice=$(printf "screencast\\nvideo\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:") case "$choice" in - screencast) screencastpulse;; - audio) audiopulse;; + screencast) screencast;; + audio) audio;; video) video;; + webcam) webcamrecord;; + "webcam (hi-def)") webcamrecord;; esac } @@ -97,8 +97,8 @@ asktoend() { \ case "$1" in - screencast) screencastpulse;; - audio) audiopulse;; + screencast) screencast;; + audio) audio;; video) video;; kill) killrecording;; *) ([ -f ~/.recordingpid ] && asktoend && exit) || askrecording;;