feat: add Remotion project scaffolding and subtitle tools
Remotion project: - package.json with Remotion 4.0.522, React 19, Tailwind v4 - tsconfig.json (strict, ES2018, Bundler module resolution) - remotion.config.ts (rspack, jpeg image format) - ESLint flat config, Prettier config - Root component and MyComposition placeholder (1280x720, 30fps, 60 frames) Subtitle tools: - src/lrc2srt.ts — LRC to SRT converter (minimal, no dependencies) - ffmpeg.sh — helper for baking ASS subtitles or static-image+audio bypass
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
# ffmpeg helper — bake ASS subtitles into video, or bypass with static image + audio
|
||||
#
|
||||
# Usage:
|
||||
# ffmpeg.sh bake <video> <audio> <subtitles.ass> <output>
|
||||
# ffmpeg.sh bypass <image> <audio> <output>
|
||||
#
|
||||
# Prerequisites: ffmpeg must be on $PATH.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
echo "Usage:"
|
||||
echo " $0 bake <video> <audio> <subtitles.ass> <output>"
|
||||
echo " $0 bypass <image> <audio> <output>"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ $# -eq 4 ] || usage
|
||||
|
||||
MODE="$1"
|
||||
shift
|
||||
|
||||
case "$MODE" in
|
||||
bake)
|
||||
VIDEO="$1"
|
||||
AUDIO="$1"
|
||||
ASS="$1"
|
||||
OUTPUT="$1"
|
||||
|
||||
ffmpeg -y \
|
||||
-i "$VIDEO" \
|
||||
-i "$AUDIO" \
|
||||
-vf "ass=$ASS" \
|
||||
-c:v libx264 \
|
||||
-c:a aac \
|
||||
-shortest \
|
||||
"$OUTPUT"
|
||||
;;
|
||||
|
||||
bypass)
|
||||
IMAGE="$1"
|
||||
AUDIO="$1"
|
||||
OUTPUT="$1"
|
||||
|
||||
ffmpeg -y \
|
||||
-loop 1 \
|
||||
-i "$IMAGE" \
|
||||
-i "$AUDIO" \
|
||||
-c:v libx264 \
|
||||
-tune stillimage \
|
||||
-c:a aac \
|
||||
-shortest \
|
||||
"$OUTPUT"
|
||||
;;
|
||||
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user