pack-vid/pack-set

34 lines
938 B
Text
Raw Permalink Normal View History

2023-10-31 15:53:59 +00:00
#!/bin/bash
set -e
2023-04-24 02:28:30 +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"
2024-12-18 21:18:25 +00:00
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"
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"
2024-12-18 21:18:25 +00:00
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"
2023-06-18 02:56:21 +00:00
fi
2023-04-24 02:28:30 +00:00
done