Skip to content

Commit

Permalink
πŸ”§ Make resize-video use the same default for crf as ffmpeg
Browse files Browse the repository at this point in the history
From https://trac.ffmpeg.org/wiki/Encode/H.264#a1.ChooseaCRFvalue

 " The range of the CRF scale is 0–51, where 0 is lossless
   (for 8 bit only, for 10 bit use -qp 0), 23 is the default... "
  • Loading branch information
alrra committed Dec 1, 2024
1 parent 09d372e commit 3f92028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shell/bash_functions
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ resize-image() {
# $1: Path to the original video file.
# $2: Resolution (default is '1920:1080').
# $3: Start time (default is '00:00:00').
# $4: Constant Rate Factor (default is '25').
# $4: Constant Rate Factor (default is '23').
#
# Usage examples:
#
Expand Down Expand Up @@ -322,7 +322,7 @@ resize-video() {
declare filePath="$(dirname "${1%/}")"
declare scale="${2:-1920:1080}"
declare startTime=${3:-00:00:00}
declare crf=${4:-25}
declare crf=${4:-23}

declare outputFileName="$filePath/_${fileName%.*}.mp4"

Expand Down

0 comments on commit 3f92028

Please sign in to comment.