Adjust 720p bitrate back down

This commit is contained in:
Neale Pickett 2023-03-01 09:40:20 -07:00
parent 94e1fdb609
commit 292f7f9ec6
1 changed files with 9 additions and 3 deletions

12
h264
View File

@ -12,6 +12,7 @@ Output will be written to \$SRC.h264.mp4
-1080p Rescale to no bigger than 1080p -1080p Rescale to no bigger than 1080p
-720p Rescale to no bigger than 720p -720p Rescale to no bigger than 720p
-480p Rescale to no bigger than 480p -480p Rescale to no bigger than 480p
-bitrate B Set average bitrate to B, overriding rescale setting
-swenc Software encode instead of hardware -swenc Software encode instead of hardware
EOD EOD
@ -21,8 +22,8 @@ bitrate="-b:v 2048k"
while true; do while true; do
case "$1" in case "$1" in
-height|--height) -height|--height)
height=$1 height=$2
shift shift 2
;; ;;
-1080p|--1080p) -1080p|--1080p)
height=1080 height=1080
@ -31,7 +32,7 @@ while true; do
;; ;;
-720p|--720p) -720p|--720p)
height=720 height=720
bitrate="-b:v 3000k" bitrate="-b:v 1200k"
shift shift
;; ;;
-480p|--480p) -480p|--480p)
@ -39,6 +40,10 @@ while true; do
bitrate="-b:v 512k" bitrate="-b:v 512k"
shift shift
;; ;;
-bitrate|--bitrate)
bitrateManual="-b:v $2"
shift 2
;;
-swenc|--swenc) -swenc|--swenc)
codec=h264 codec=h264
shift shift
@ -56,6 +61,7 @@ done
if [ "$codec" = "h264" ]; then if [ "$codec" = "h264" ]; then
bitrate="-crf 28" bitrate="-crf 28"
fi fi
bitrate=${bitrateManual:-$bitrate}
log () { log () {
echo "=== $*" echo "=== $*"