Mr-funny/hbg-classical-poem-silk-video / skill/classical-poem-silk-video
classical-poem-silk-video
VerifiedTurn Chinese classical poems and ci into coherent vertical Chinese-art videos with poem-driven scene grouping, GPT ImageGen stills, Docker-only Gemini I2V, retained model-generated ambience, Gemini sparkle-watermark cleanup, brush-calligraphy captions revealed character by character, optional local BGM mixing, stitching, and final-frame QA. Supports verse-driven variation across ink landscape, gongbi bird-and-flower, colored figure-and-horse painting, blue-green landscape, xuan paper, silk, and related Chinese visual languages. Use when users ask for 古诗词动态视频、诗词逐句或两句一景、国风视频、毛笔字逐字出现、整首诗拼接成片,or want the established 月落乌啼霜满天 workflow applied to another poem.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.5 KB |
| agents/openai.yaml | config | 275 B |
| assets/MaShanZheng-Regular.ttf | binary | 5.6 MB |
| assets/OFL.txt | markdown | 4.2 KB |
| references/runtime-contract.md | markdown | 1.9 KB |
| references/style-and-scene-mapping.md | markdown | 6.2 KB |
| scripts/check_prerequisites.shexecutable | script | 1.5 KB |
| scripts/clean_star_watermark.shexecutable | script | 861 B |
| scripts/concat_poem.shexecutable | script | 1.3 KB |
| scripts/concat_poem_crossfade.shexecutable | script | 2.0 KB |
| scripts/docker_gemini_i2v.pyexecutable | script | 2.7 KB |
| scripts/docker_gemini_i2v.shexecutable | script | 970 B |
| scripts/final_media_qa.shexecutable | script | 3.6 KB |
| scripts/make_scene_ass.pyexecutable | script | 2.7 KB |
| scripts/render_scene.shexecutable | script | 1.8 KB |
scripts/concat_poem_crossfade.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
if [ "$#" -lt 5 ]; then
echo "Usage: $0 <output.mp4> <bgm-or-none> <transition-seconds> <scene1.mp4> <scene2.mp4> [...]" >&2
exit 2
fi
output="$1"
bgm="$2"
transition="$3"
bgm_gain="${POEM_BGM_GAIN:-0.08}"
shift 3
scenes=("$@")
count="${#scenes[@]}"
inputs=()
durations=()
filter=""
for ((i=0; i<count; i++)); do
scene="${scenes[$i]}"
inputs+=( -i "$scene" )
duration="$(ffprobe -v error -show_entries format=duration -of default=nw=1:nk=1 "$scene")"
durations+=( "$duration" )
filter+="[$i:v]settb=AVTB,setpts=PTS-STARTPTS,fps=30,format=yuv420p[vsrc$i];"
filter+="[$i:a]asetpts=PTS-STARTPTS[asrc$i];"
done
video_label="[vsrc0]"
audio_label="[asrc0]"
elapsed="${durations[0]}"
for ((i=1; i<count; i++)); do
offset="$(awk -v e="$elapsed" -v t="$transition" 'BEGIN { printf "%.3f", e - t }')"
filter+="$video_label[vsrc$i]xfade=transition=fade:duration=$transition:offset=$offset[vx$i];"
filter+="$audio_label[asrc$i]acrossfade=d=$transition:c1=tri:c2=tri[ax$i];"
video_label="[vx$i]"
audio_label="[ax$i]"
elapsed="$(awk -v e="$elapsed" -v d="${durations[$i]}" -v t="$transition" 'BEGIN { printf "%.3f", e + d - t }')"
done
if [ "$bgm" = "none" ]; then
filter+="$video_label format=yuv420p[vout];$audio_label alimiter=limit=0.95[aout]"
else
bgm_index="$count"
inputs+=( -stream_loop -1 -i "$bgm" )
fade_out="$(awk -v d="$elapsed" 'BEGIN { printf "%.3f", d - 1.2 }')"
filter+="[$bgm_index:a]atrim=start=0:end=$elapsed,asetpts=N/SR/TB,volume=$bgm_gain,afade=t=in:st=0:d=1.0,afade=t=out:st=$fade_out:d=1.2[music];"
filter+="$video_label format=yuv420p[vout];$audio_label[music]amix=inputs=2:duration=first:dropout_transition=2:normalize=0,alimiter=limit=0.95[aout]"
fi
mkdir -p "$(dirname "$output")"
ffmpeg -y \
"${inputs[@]}" \
-filter_complex "$filter" \
-map '[vout]' -map '[aout]' \
-r 30 \
-c:v libx264 -preset slow -crf 18 -profile:v high -level 4.1 \
-c:a aac -b:a 192k -ar 44100 -ac 2 \
-movflags +faststart \
"$output"
echo "$output"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |