20 lines
517 B
Bash
Executable file
20 lines
517 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
SRC="${1:-/Users/ai_leed/Downloads/ShumiLand_Reels_.mp4}"
|
|
DEST_DIR="public/videos"
|
|
mkdir -p "$DEST_DIR"
|
|
|
|
echo "Transcoding H.264..."
|
|
ffmpeg -y -i "$SRC" \
|
|
-vcodec libx264 -crf 28 -preset slow -movflags +faststart \
|
|
-vf "scale='min(720,iw)':-2" -an \
|
|
"$DEST_DIR/shumiland-reels.mp4"
|
|
|
|
echo "Transcoding VP9..."
|
|
ffmpeg -y -i "$SRC" \
|
|
-c:v libvpx-vp9 -crf 34 -b:v 0 -row-mt 1 \
|
|
-vf "scale='min(720,iw)':-2" -an \
|
|
"$DEST_DIR/shumiland-reels.webm"
|
|
|
|
echo "Done:"
|
|
ls -lh "$DEST_DIR"
|