From fc211a932c0a8b715e5082fc9020a21a3969d48a Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Tue, 9 Aug 2016 00:39:00 -0700 Subject: [PATCH] helper script --- scaleup-4x3-mts-to-1080p.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scaleup-4x3-mts-to-1080p.sh diff --git a/scaleup-4x3-mts-to-1080p.sh b/scaleup-4x3-mts-to-1080p.sh new file mode 100755 index 000000000..e189c3b93 --- /dev/null +++ b/scaleup-4x3-mts-to-1080p.sh @@ -0,0 +1,12 @@ +#!/bin/bash +src="$1" +dst="$1.1080p.mp4" + +fwidth=1440 +fheight=1080 +# 95% title safe area +swidth=$((($fwidth*90)/100)) +sheight=$((($fheight*90)/100)) + +ffmpeg -i "$src" -bsf:a aac_adtstoasc -acodec copy -vcodec libx264 -g 15 -bf 2 -vf "scale=$swidth:$sheight,pad=$fwidth:$fheight:(ow-iw)/2:(oh-ih)/2:black,setdar=4:3" -vb 15000000 -preset superfast -pix_fmt yuv420p -y -f mp4 "$dst" +