Shumiland/scripts/transcode-video.sh
Vadym Samoilenko 8c3e28e507 feat: transcode ShumiLand reels to web-optimized MP4+WebM for autoplay
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 13:06:43 +01:00

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"