2023-10-31 15:53:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2023-04-24 02:28:30 +00:00
|
|
|
|
2023-05-16 23:54:36 +00:00
|
|
|
OPTS=""
|
|
|
|
|
2023-04-24 02:28:30 +00:00
|
|
|
for INFILE in "$@"
|
|
|
|
do
|
2023-06-18 02:56:21 +00:00
|
|
|
if [[ "$1" =~ ^--.* ]]
|
|
|
|
then
|
|
|
|
echo "OPTION: $1"
|
|
|
|
OPTS="$OPTS $1"
|
|
|
|
shift
|
|
|
|
else
|
|
|
|
echo "FILE: $INFILE"
|
2023-04-24 02:28:30 +00:00
|
|
|
|
2023-10-26 18:10:59 +00:00
|
|
|
#COMMON=""
|
|
|
|
#COMMON="--exposure=-2.5 --peak=141"
|
|
|
|
#COMMON="--exposure=-1 --peak=500"
|
|
|
|
COMMON="--peak=1000"
|
2023-07-06 03:31:19 +00:00
|
|
|
SPEED_SMALL="veryslow"
|
2023-06-18 02:56:21 +00:00
|
|
|
SPEED_LARGE="slow"
|
2023-04-24 02:28:30 +00:00
|
|
|
|
2023-07-06 03:31:19 +00:00
|
|
|
SMALL="$COMMON --size=4m --quality=0.75 --preset=$SPEED_SMALL"
|
2023-06-18 02:56:21 +00:00
|
|
|
LARGE="$COMMON --size=25m --preset=$SPEED_LARGE"
|
2023-04-24 02:28:30 +00:00
|
|
|
|
2023-10-26 18:10:59 +00:00
|
|
|
pack-vid $SMALL $OPTS "$INFILE" "${INFILE%.mp4}-small.mp4"
|
|
|
|
pack-vid $LARGE $OPTS "$INFILE" "${INFILE%.mp4}-large.mp4"
|
2023-06-18 02:56:21 +00:00
|
|
|
fi
|
2023-04-24 02:28:30 +00:00
|
|
|
done
|