feat: 이번주 코디 영상 스크립트·템플릿·모델 사진과 명령 파일 추가, 클립 동작은 후보에서 무작위로 고름 (손가락 모양 동작 제외), .sh·.py·.mjs 는 LF 로 받음
This commit is contained in:
1 parent
1ec87a82c1
commit
56f71cdfbe
54 files changed
+1576
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# usage: clips.sh <작업 폴더> [woman_a woman_b man_a man_b 중 다시 만들 것]
|
||||
# 작업 폴더에 woman_photo.png·man_photo.png(코디 사진)와 woman_a.txt·woman_b.txt·man_a.txt·man_b.txt(동작 설명)를 두면
|
||||
# 4초 클립 4개(woman_a.mp4 …)를 만든다. 이미 있는 클립은 건너뛰고, 이름을 주면 그 클립만 지우고 다시 만든다.
|
||||
set -euo pipefail
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
WORK=$(cd "$1" && pwd); shift
|
||||
cd "$WORK"
|
||||
for name in "$@"; do rm -f "$name.mp4" "$name.workflow.json"; done
|
||||
trap '"$HERE/server.sh" down' EXIT
|
||||
negative=$(cat "$HERE/../templates/negative.txt")
|
||||
for who in woman man; do
|
||||
[ -s ${who}_first.png ] || ffmpeg -hide_banner -loglevel error -y -i ${who}_photo.png \
|
||||
-vf "scale=1088:1920:force_original_aspect_ratio=increase:flags=lanczos,crop=1088:1920" -frames:v 1 ${who}_first.png
|
||||
done
|
||||
for name in woman_a woman_b man_a man_b; do
|
||||
[ -s "$name.mp4" ] && { echo "$name 이미 있음"; continue; }
|
||||
echo "== $name 시작 $(date +%H:%M:%S)"
|
||||
python3 "$HERE/generate.py" --image "${name%_*}_first.png" --prompt-file "$name.txt" --negative "$negative" \
|
||||
--duration 4 --seed $((RANDOM % 9000 + 100)) --anchor-end --keep-running --output "$name.mp4"
|
||||
echo "== $name 완료 $(date +%H:%M:%S)"
|
||||
done
|
||||
Reference in new issue
Block a user