Created
February 2, 2019 02:33
-
-
Save lisamelton/faf0fc60932fdcce8338bad7e909788f to your computer and use it in GitHub Desktop.
A wrapper script for `transcode-video` with an experimental average variable bitrate (AVBR) ratecontrol system for the x264 encoder.
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 | |
# | |
# experimental-x264-avbr-transcode-video.sh | |
# | |
# Copyright (c) 2013-2019 Don Melton | |
# | |
die() { | |
echo "$(basename "$0"): $1" >&2 | |
exit ${2:-1} | |
} | |
args=() | |
while [ "$1" ]; do | |
case $1 in | |
--encoder|--abr|--simple) | |
die "unsupported argument: $1" | |
;; | |
*) | |
args=("${args[@]}" "$1") | |
;; | |
esac | |
shift | |
done | |
transcode-video \ | |
--abr \ | |
--encoder-option '_vbv-maxrate' \ | |
--encoder-option '_vbv-bufsize' \ | |
--encoder-option '_nal-hrd' \ | |
--encoder-option 'ratetol=inf' \ | |
--encoder-option 'mbtree=0' \ | |
"${args[@]}" | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment