From 34d1a0ea042ea3c65ac189217e355bae4db8e9cc Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Thu, 2 Nov 2023 12:13:59 -0400 Subject: [PATCH] Allow normalize-volume script to run on videos with embedded subtitles --- dotfiles/bin/normalize-volume | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/bin/normalize-volume b/dotfiles/bin/normalize-volume index 38e1b88..339bc96 100644 --- a/dotfiles/bin/normalize-volume +++ b/dotfiles/bin/normalize-volume @@ -68,7 +68,7 @@ it=`grep \"input_thresh\" $temp_file | cut -d: -f2 | tr -cd [:digit:].-` to=`grep \"target_offset\" $temp_file | cut -d: -f2 | tr -cd [:digit:].-` # 2nd pass: -cmd="ffmpeg -y -stats -loglevel level+error -i \"$filename.$extension\" -c:v copy -pass 2 -filter:a loudnorm=linear=true:I=-16:LRA=11:tp=-1.5:measured_I=$ii:measured_LRA=$ilra:measured_tp=$itp:measured_thresh=$it:offset=$to:print_format=summary -map 0 \"$output\"" +cmd="ffmpeg -y -stats -loglevel level+error -i \"$filename.$extension\" -c:v copy -pass 2 -filter:a loudnorm=linear=true:I=-16:LRA=11:tp=-1.5:measured_I=$ii:measured_LRA=$ilra:measured_tp=$itp:measured_thresh=$it:offset=$to:print_format=summary \"$output\"" printf "${BOLD}Re-encoding audio:\n$cmd\n\n${NORMAL}" eval "$cmd"