From 7ef54e6c820de47e96cd735851473391ca8dda35 Mon Sep 17 00:00:00 2001 From: Jan Jastrow Date: Mon, 5 Feb 2024 12:47:55 +0100 Subject: [PATCH] Fix scaling conversion --- zsh/ffmpeg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/ffmpeg b/zsh/ffmpeg index 530ea12..afdb318 100644 --- a/zsh/ffmpeg +++ b/zsh/ffmpeg @@ -46,7 +46,7 @@ ff-recompress720p() { for input in *.mp4; do if [[ -f "$input" ]]; then tempfile="temp_${input%.mp4}" - ffmpeg -hide_banner -i "$input" -map 0 -c:v libx264 -crf 18 -vf scale=1280:-1 -preset slow -tune film -x264-params "ref=5:bframes=5:crf-max=25:qpmax=34:level=3.1:b-adapt=2:direct=auto:deblock=-1,-1:analyse=all:me=umh:subme=9:trellis=2:psy-rd=1,0.15:vbv-bufsize=17500:vbv-maxrate=17500:rc-lookahead=60" -c:a copy -movflags faststart "$tempfile.mp4" + ffmpeg -hide_banner -i "$input" -map 0 -c:v libx264 -crf 18 -vf scale=1280:-2 -preset slow -tune film -x264-params "ref=5:bframes=5:crf-max=25:qpmax=34:level=3.1:b-adapt=2:direct=auto:deblock=-1,-1:analyse=all:me=umh:subme=9:trellis=2:psy-rd=1,0.15:vbv-bufsize=17500:vbv-maxrate=17500:rc-lookahead=60" -c:a copy -movflags faststart "$tempfile.mp4" if [[ $? -eq 0 ]]; then mv "$input" "_$input" @@ -148,4 +148,4 @@ function ff-cutend { duration=`bc --expression=$duration-$time` mv "$1" "_$1" ffmpeg -ss 00:00:00 -to $duration -i "_$1" -map 0 -c copy -movflags faststart "$1" -} \ No newline at end of file +}