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: [email protected] (Jim Bankoski) 13 14if [[ $# -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 22fi 23 24s=$1 25e=$2 26step=$3 27newdir=$4 28 29for 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 35done 36 37mkdir $newdir 38mv *.stt $newdir 39mv *.webm $newdir 40