lgtm
This commit is contained in:
parent
a08b5d2ae0
commit
b98f0e3904
38 changed files with 3732 additions and 483 deletions
|
|
@ -18,6 +18,7 @@
|
|||
# ./render.sh --prod # prod (requires LOGIN_EMAIL/LOGIN_PASSWORD)
|
||||
# ./render.sh --target prod # same as --prod
|
||||
# ./render.sh --fresh-auth # force re-auth even if cache is fresh
|
||||
# ./render.sh --resume # preserve completed recordings and continue
|
||||
# ./render.sh --no-encode # stop at WebM, skip MP4 encode
|
||||
# ./render.sh --no-audio # skip Qwen3-TTS narration; silent MP4
|
||||
# FORCE_AUTH=1 ./render.sh # same as --fresh-auth
|
||||
|
|
@ -87,12 +88,14 @@ AUTH_TTL_HOURS="${AUTH_TTL_HOURS:-24}" # re-auth if cache older than this
|
|||
PUBLISH_DIR="${PUBLISH_DIR:-../frontend/public/video}"
|
||||
|
||||
FRESH_AUTH="${FORCE_AUTH:-0}"
|
||||
RESUME_RECORDINGS="${RESUME_RECORDINGS:-0}"
|
||||
DO_ENCODE=1
|
||||
DO_AUDIO=1
|
||||
for arg in "${@:-}"; do
|
||||
[ -z "$arg" ] && continue
|
||||
case "$arg" in
|
||||
--fresh-auth) FRESH_AUTH=1 ;;
|
||||
--resume) RESUME_RECORDINGS=1 ;;
|
||||
--no-encode) DO_ENCODE=0 ;;
|
||||
--no-audio) DO_AUDIO=0 ;;
|
||||
-h|--help)
|
||||
|
|
@ -230,13 +233,22 @@ poster_time_for() {
|
|||
|
||||
# -- per-storyboard wipe of leaking artefacts --------------------------------
|
||||
# output/<sb>/audio/ is preserved; tts/synth.py decides whether the cached
|
||||
# WAVs still match the script and skips generation when they do.
|
||||
# WAVs still match the script and skips generation when they do. In resume
|
||||
# mode, keep successful recording.webm + narration.json pairs and let record.ts
|
||||
# skip them, but still clear raw/intermediate files that may be left by a
|
||||
# failed Playwright save.
|
||||
for sb in "${STORYBOARDS[@]}"; do
|
||||
rm -f "output/$sb/recording.webm" "output/$sb/recording.mp4" \
|
||||
"output/$sb/page@"*.webm "output/$sb/page@"*.webm.untrimmed \
|
||||
"output/$sb/recording.raw.webm" "output/$sb/recording.raw.webm.untrimmed" \
|
||||
"output/$sb/recording.narrated.mp4" "output/$sb/poster.jpg" \
|
||||
"output/$sb/narration.json"
|
||||
if [ "$RESUME_RECORDINGS" = "1" ]; then
|
||||
rm -f "output/$sb/page@"*.webm "output/$sb/page@"*.webm.untrimmed \
|
||||
"output/$sb/recording.raw.webm" "output/$sb/recording.raw.webm.untrimmed" \
|
||||
"output/$sb/recording.narrated.mp4"
|
||||
else
|
||||
rm -f "output/$sb/recording.webm" "output/$sb/recording.mp4" \
|
||||
"output/$sb/page@"*.webm "output/$sb/page@"*.webm.untrimmed \
|
||||
"output/$sb/recording.raw.webm" "output/$sb/recording.raw.webm.untrimmed" \
|
||||
"output/$sb/recording.narrated.mp4" "output/$sb/poster.jpg" \
|
||||
"output/$sb/narration.json"
|
||||
fi
|
||||
done
|
||||
|
||||
# -- synth (Qwen3-TTS) -------------------------------------------------------
|
||||
|
|
@ -276,7 +288,7 @@ fi
|
|||
# recording.webm + narration.json. One Node invocation handles all of them
|
||||
# so we don't spin up Playwright + GPU/WebGL + auth more than necessary.
|
||||
say "Recording all storyboards"
|
||||
APP_URL="$APP_URL" node dist/record.js
|
||||
RESUME_RECORDINGS="$RESUME_RECORDINGS" APP_URL="$APP_URL" node dist/record.js
|
||||
|
||||
for sb in "${STORYBOARDS[@]}"; do
|
||||
if [ ! -s "output/$sb/recording.webm" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue