pack-vid/prep-set
2024-03-04 12:04:19 -08:00

31 lines
860 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"
MAPPED="prep-set-${INFILE%.mp4}.2160p.sdr.h264.mp4"
prep-vid $OPTS "$INFILE" "$MAPPED"
prep-vid $OPTS "$MAPPED" "${INFILE%.mp4}.360p.sdr.thumb.jpg"
prep-vid $OPTS "$INFILE" "${INFILE%.mp4}.360p.hdr.thumb.avif"
prep-vid $OPTS "$MAPPED" "${INFILE%.mp4}.720p.sdr.h264.mp4"
prep-vid $OPTS "$INFILE" "${INFILE%.mp4}.720p.hdr.hevc.mp4"
prep-vid $OPTS "$MAPPED" "${INFILE%.mp4}.1080p.sdr.av1.webm"
prep-vid $OPTS "$INFILE" "${INFILE%.mp4}.1080p.hdr.av1.webm"
prep-vid $OPTS "$MAPPED" "${INFILE%.mp4}.2160p.sdr.av1.webm"
prep-vid $OPTS "$INFILE" "${INFILE%.mp4}.2160p.hdr.av1.webm"
fi
done