3 # Copyright (c) 2016, Alliance for Open Media. All rights reserved
5 # This source code is subject to the terms of the BSD 2 Clause License and
6 # the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
7 # was not distributed with this source code in the LICENSE file, you can
8 # obtain it at www.aomedia.org/license/software. If the Alliance for Open
9 # Media Patent License 1.0 was not distributed with this source code in the
10 # PATENTS file, you can obtain it at www.aomedia.org/license/patent.
12 # Author: jimbankoski@google.com (Jim Bankoski)
14 if [[ $# -ne 2 ]]; then
15 echo "Encodes a file using best known settings (slow!)"
16 echo " Usage: be [FILE] [BITRATE]"
17 echo " Example: be akiyo_cif.y4m 200"
21 f
=$1 # file is first parameter
22 b
=$2 # bitrate is second parameter
24 if [[ -e $f.fpf
]]; then
25 # First-pass file found, do second pass only
38 --maxsection-pct=800 \
48 --maxsection-pct=800 \
54 # No first-pass file found, do 2-pass encode
67 --maxsection-pct=800 \
88 --maxsection-pct=800 \
98 --maxsection-pct=800 \