pack-vid/pack-set
2023-10-31 08:53:59 -07:00

29 lines
660 B
Bash
Executable file

#!/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"
LARGE="$COMMON --size=25m --preset=$SPEED_LARGE"
pack-vid $SMALL $OPTS "$INFILE" "${INFILE%.mp4}-small.mp4"
pack-vid $LARGE $OPTS "$INFILE" "${INFILE%.mp4}-large.mp4"
fi
done