|
| 1 | +#!/usr/bin/env bash |
| 2 | +set -euo pipefail |
| 3 | + |
| 4 | +SRC="/Users/jeff/Desktop/AABA" |
| 5 | +MAX_PARALLEL=2 |
| 6 | + |
| 7 | +# Each line: "filename|slug" |
| 8 | +ENTRIES=( |
| 9 | + "Dunes - Afternoon - small.mp4|aaba-lounge-dunes-afternoon" |
| 10 | + "Dunes - Midnight - small.mp4|aaba-lounge-dunes-midnight" |
| 11 | + "Dunes - Morning - small.mp4|aaba-lounge-dunes-morning" |
| 12 | + "Dunes - Sunrise - small.mp4|aaba-lounge-dunes-sunrise" |
| 13 | + "Dunes - Sunset - small.mp4|aaba-lounge-dunes-sunset" |
| 14 | + "Ferns - Afternoon - small.mp4|aaba-lounge-ferns-afternoon" |
| 15 | + "Ferns - Midnight - small.mp4|aaba-lounge-ferns-midnight" |
| 16 | + "Ferns - Morning - small.mp4|aaba-lounge-ferns-morning" |
| 17 | + "Ferns - Sunrise - small.mp4|aaba-lounge-ferns-sunrise" |
| 18 | + "Ferns - Sunset - small.mp4|aaba-lounge-ferns-sunset" |
| 19 | + "Garden - Afternoon - small.mp4|aaba-lounge-garden-afternoon" |
| 20 | + "Garden - Midnight - small.mp4|aaba-lounge-garden-midnight" |
| 21 | + "Garden - Morning - small.mp4|aaba-lounge-garden-morning" |
| 22 | + "Garden - Sunrise - small.mp4|aaba-lounge-garden-sunrise" |
| 23 | + "Garden - Sunset - small.mp4|aaba-lounge-garden-sunset" |
| 24 | + "Mountain - Afternoon - small.mp4|aaba-lounge-mountain-afternoon" |
| 25 | + "Mountain - Midnight - small.mp4|aaba-lounge-mountain-midnight" |
| 26 | + "Mountain - Morning - small.mp4|aaba-lounge-mountain-morning" |
| 27 | + "Mountain - Sunrise - small.mp4|aaba-lounge-mountain-sunrise" |
| 28 | + "Mountain - Sunset - small.mp4|aaba-lounge-mountain-sunset" |
| 29 | +) |
| 30 | + |
| 31 | +for ENTRY in "${ENTRIES[@]}"; do |
| 32 | + FILE="${ENTRY%%|*}" |
| 33 | + SLUG="${ENTRY##*|}" |
| 34 | + |
| 35 | + # Skip already-encoded |
| 36 | + if [ -f "processed/videos/$SLUG/index.m3u8" ]; then |
| 37 | + echo "Skipping (already done): $SLUG" |
| 38 | + continue |
| 39 | + fi |
| 40 | + |
| 41 | + echo "$SRC/$FILE|$SLUG" |
| 42 | +done | xargs -P "$MAX_PARALLEL" -I {} bash -c ' |
| 43 | + INPUT="${1%%|*}" |
| 44 | + SLUG="${1##*|}" |
| 45 | + echo "Starting: $SLUG" |
| 46 | + ./scripts/process-video.sh "$INPUT" "$SLUG" |
| 47 | + echo "Finished: $SLUG" |
| 48 | +' _ {} |
| 49 | + |
| 50 | +echo "All AABA videos encoded." |
0 commit comments