#!/bin/bash set -e OPTS="" for INFILE in "$@" do if [[ "$1" =~ ^--.* ]] then echo "OPTION: $1" OPTS="$OPTS $1" shift else echo "FILE: $INFILE" #COMMON="" #COMMON="--exposure=-2.5 --peak=141" #COMMON="--exposure=-1 --peak=500" COMMON="--peak=1000" SPEED_SMALL="veryslow" SPEED_LARGE="slow" SMALL="$COMMON --size=4m --quality=0.75 --preset=$SPEED_SMALL" MED="$COMMON --size=10m --preset=$SPEED_SMALL" #LARGE="$COMMON --size=25m --preset=$SPEED_LARGE" TEN80="$COMMON --bitrate=6000000 --width=1920 --height=1080 --preset=$SPEED_LARGE" pack-vid $SMALL $OPTS "$INFILE" "${INFILE%.mp4}-small.mp4" pack-vid $MED $OPTS "$INFILE" "${INFILE%.mp4}-med.mp4" #pack-vid $LARGE $OPTS "$INFILE" "${INFILE%.mp4}-large.mp4" pack-vid $TEN80 $OPTS "$INFILE" "${INFILE%.mp4}-1080p.mp4" fi done