Revisions
-
jpenalbae revised this gist
Jun 13, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,7 +41,7 @@ echo "Recording started. Press 'q' to stop recording." # run the ffmpeg command ffmpeg -f x11grab -loglevel quiet -s ${width}x${height} -i ${DISPLAY}+$x,$y \ -f alsa -i pulse -c:v libx264 -preset ultrafast -crf ${QUALITY} \ -tune zerolatency -pix_fmt yuv420p -f mp4 $filename # display message to user -
jpenalbae revised this gist
Jun 13, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,8 +41,8 @@ echo "Recording started. Press 'q' to stop recording." # run the ffmpeg command ffmpeg -f x11grab -loglevel quiet -s ${width}x${height} -i ${DISPLAY}+$x,$y \ -f alsa -i pulse -c:v libx264 -preset ultrafast -crf QUALITY \ -tune zerolatency -pix_fmt yuv420p -f mp4 $filename # display message to user echo "Recording stopped." -
jpenalbae created this gist
Jun 12, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ #!/bin/bash # Video Quality # The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default, # and 51 is worst quality possible. A lower value generally leads to higher # quality, and a subjectively sane range is 17–28 QUALITY=28 # check if slop command exists if ! command -v slop &> /dev/null then echo "slop command not found. Please install slop." exit 1 fi # check if an output filename was provided if [ -z "$1" ]; then echo "Usage: $0 <output.mp4>" exit 1 fi # set the output file name filename="$1" # get the selection coordinates using slop echo "Select the desktop area to record." coords=$(slop -f "%x %y %w %h") # extract the x, y, width, and height values from the coordinates x=$(echo $coords | awk '{print $1}') y=$(echo $coords | awk '{print $2}') width=$(echo $coords | awk '{print $3}') height=$(echo $coords | awk '{print $4}') # ensure that the height and width are divisible by 2 width=$((width / 2 * 2)) height=$((height / 2 * 2)) # display message to user echo "Recording started. Press 'q' to stop recording." # run the ffmpeg command ffmpeg -f x11grab -loglevel quiet -s ${width}x${height} -i ${DISPLAY}+$x,$y \ -f alsa -i pulse -c:v libx264 -preset ultrafast -crf 28 -tune zerolatency \ -pix_fmt yuv420p -f mp4 $filename # display message to user echo "Recording stopped."