run_encodes.sh (1137B)
1 #!/bin/bash 2 # 3 # Copyright (c) 2016, Alliance for Open Media. All rights reserved. 4 # 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. 11 # 12 # Author: jimbankoski@google.com (Jim Bankoski) 13 14 if [[ $# -ne 4 ]]; then 15 echo Encodes all the y4m files in the directory at the bitrates specified by 16 echo the first 3 parameters and stores the results in a subdirectory named by 17 echo the 4th parameter: 18 echo 19 echo Usage: run_encodes.sh start-kbps end-kbps step-kbps output-directory 20 echo Example: run_encodes.sh 200 500 50 baseline 21 exit 22 fi 23 24 s=$1 25 e=$2 26 step=$3 27 newdir=$4 28 29 for i in ./*y4m; do 30 for (( b=$s; b<= $e; b+= $step )) 31 do 32 best_encode.sh $i $b 33 done 34 mv opsnr.stt $i.stt 35 done 36 37 mkdir $newdir 38 mv *.stt $newdir 39 mv *.webm $newdir