Created
March 3, 2019 03:55
-
-
Save Fordi/94be5bff110e4b5a00815fde502b3451 to your computer and use it in GitHub Desktop.
Transcoding script for re-encoding video down to about 400-500 MB / hr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
INF="$1" | |
if [[ -n "$2" ]]; then | |
OUT="$2"; | |
else | |
OUT="${INF%.*}.out.mp4" | |
fi | |
HandBrakeCLI \ | |
-i "$INF" \ | |
-o "$OUT" \ | |
-E fdk_faac \ | |
-B 96k \ | |
-6 stereo \ | |
-R 44.1 \ | |
-e x264 \ | |
-q 27 \ | |
-x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment