allow pass-through of any --param

This commit is contained in:
Brooke Vibber 2023-06-17 19:56:21 -07:00
parent f772f4a618
commit da1c67fad3

View file

@ -1,24 +1,26 @@
#!/bin/sh #!/bin/sh
OPTS="" OPTS=""
if [ "$1" == "--no-audio" ]
then
OPTS="--no-audio"
shift
fi
for INFILE in "$@" for INFILE in "$@"
do do
echo "$INFILE" if [[ "$1" =~ ^--.* ]]
then
echo "OPTION: $1"
OPTS="$OPTS $1"
shift
else
echo "FILE: $INFILE"
#COMMON="$OPTS --exposure=-2.5 --peak=141" #COMMON="$OPTS --exposure=-2.5 --peak=141"
COMMON="$OPTS" COMMON="$OPTS"
SPEED_SMALL="slow" SPEED_SMALL="slow"
SPEED_LARGE="slow" SPEED_LARGE="slow"
SMALL="$COMMON --size=4m --preset=$SPEED_SMALL" SMALL="$COMMON --size=4m --preset=$SPEED_SMALL"
LARGE="$COMMON --size=25m --preset=$SPEED_LARGE" LARGE="$COMMON --size=25m --preset=$SPEED_LARGE"
pack-vid $SMALL "$INFILE" "${INFILE%.mp4}-small.mp4" pack-vid $SMALL "$INFILE" "${INFILE%.mp4}-small.mp4"
pack-vid $LARGE "$INFILE" "${INFILE%.mp4}-large.mp4" pack-vid $LARGE "$INFILE" "${INFILE%.mp4}-large.mp4"
fi
done done