diff options
| author | Adam T. Carpenter <atc@53hor.net> | 2020-09-10 12:19:06 -0400 | 
|---|---|---|
| committer | Adam T. Carpenter <atc@53hor.net> | 2020-09-10 12:19:06 -0400 | 
| commit | 74f909fedcbe354055a7f5a492735e09ba6d15da (patch) | |
| tree | eb209f321bee3240d2a8e83c47c5e187ecde8ff8 /toggle-screencast.sh | |
| parent | 8633c82378ab9b3a88b956def1a05cb76b4c11fd (diff) | |
| download | scripts-74f909fedcbe354055a7f5a492735e09ba6d15da.tar.xz scripts-74f909fedcbe354055a7f5a492735e09ba6d15da.zip | |
Moved i3 commands into scripts, fixed screencast and added webcam toggles
Diffstat (limited to 'toggle-screencast.sh')
| -rwxr-xr-x | toggle-screencast.sh | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/toggle-screencast.sh b/toggle-screencast.sh index 0a23d41..b8050da 100755 --- a/toggle-screencast.sh +++ b/toggle-screencast.sh @@ -2,7 +2,8 @@  ## Config  output_dir=~/videos/screencasts -sound_device=/dev/dsp5 +#sound_device=/dev/dsp4.0 +#-thread_queue_size 512 -f oss -i "$sound_device" \  ## Start recording @@ -14,7 +15,6 @@ start_recording() {  	ffmpeg -video_size 1920x1080 \  		-framerate 50 \  		-thread_queue_size 512 -f x11grab -i :0.0+0,0 \ -		-thread_queue_size 512 -f oss -i "$sound_device" \  		-vcodec libx264rgb -crf 0 -preset:v ultrafast \  		-acodec pcm_s16le \  		-af aresample=async=1:first_pts=0 \ @@ -26,10 +26,11 @@ start_recording() {  ## Stop recording  stop_recording() {  	pkill -2 ffmpeg -	output_file="$output_dir"/cast_"$(date '+%F-%H-%M-%S')".mkv -	mv /tmp/cast.mkv "$output_file" -	notify-send "Screencast saved" "$output_file" +	output_file="$output_dir"/cast_"$(date '+%F-%H-%M-%S')".mp4 +	notify-send "Screencast stopped, transcoding..." "$output_file" +	ffmpeg -i /tmp/cast.mkv "$output_file" && rm /tmp/cast.mkv  	pkill -76 i3blocks +	notify-send "Transcode done!" "$output_file"  	exit  } |