Communitygithub.com

photo-video

把一批照片做成 3~5 分鐘的回顧影片(MP4):自動依拍攝時間排序、按日期分章、緩慢推拉鏡頭、交叉淡化、字幕、片頭片尾、配樂,可出橫式 16:9、直式 9:16(Reels/限動)或方形。老師說「照片做成影片」「活動回顧影片」「畢業影片」「校外教學影片」「幫我剪照片」「做成 Reels」或丟一個照片資料夾要做影片時使用。

photo-video 是什么?

photo-video is a Claude Code agent skill that 把一批照片做成 3~5 分鐘的回顧影片(MP4):自動依拍攝時間排序、按日期分章、緩慢推拉鏡頭、交叉淡化、字幕、片頭片尾、配樂,可出橫式 16:9、直式 9:16(Reels/限動)或方形。老師說「照片做成影片」「活動回顧影片」「畢業影片」「校外教學影片」「幫我剪照片」「做成 Reels」或丟一個照片資料夾要做影片時使用。.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/charyvalis/cuidu-video-skills/tree/HEAD/photo-video

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Photos → Recap Video

Division of labor: The teacher takes photos and decides what to say; Claude picks the photos, arranges them, writes captions, and edits the video. The focus is not on the tools, but on remembering the teacher's preferred editing style—every time the teacher says "make the captions bigger" or "make the opening faster," record the change in preferences.md so it's applied automatically next time.

All responses are in Traditional Chinese. When there is any doubt about characters/pronunciations in captions, follow the Ministry of Education's Mandarin Chinese Dictionary (Simplified Edition) (see project CLAUDE.md).

Before Starting: Read the Preferences

  1. Read preferences.md (the teacher's past editing preferences). Use those values as defaults — they override the defaults below.
  2. Verify the environment: ffmpeg -version, python3 -c "import PIL, numpy". If missing, help the teacher install (Mac: brew install ffmpeg python, pip3 install pillow numpy; for iPhone HEIC photos, also pip3 install pillow-heif).

Ask the Teacher (only what's missing, ask all at once)

ItemDefault if not specified
Purpose/Audience (parent-teacher meeting, graduation, class recap, social media)Class recap for parents
Duration4 minutes
Aspect ratioLandscape 16:9 (use 9:16 if they say Reels/Stories)
Title, subtitle (class, date)Inferred from folder name and capture date
MusicUse the supplied audio file; if none, use built-in royalty-free background music (warm)
CaptionsClaude writes them from the photos; teacher can edit

If the teacher says "you decide," just go ahead and do it, then show them the preview.

Workflow

Scripts are in scripts/ (let $SK represent the full path to this folder). All work files go into a 影片工作/ folder next to the photo folder — never write into the photo folder.

1. Look at the Photos

python3 $SK/contact_sheet.py 照片資料夾 影片工作/縮圖
  • Generates numbered thumbnail overviews sheet_01.jpg… and photos.json (capture time, orientation, blur/too dark/duplicate flags).
  • You must open each thumbnail overview with Read to actually look at the photos before picking photos and writing captions. For any single photo that is unclear, open the original.

2. Pick Photos & Define the Structure (Claude's Judgment)

Duration vs. number of photos (each photo ~5–7 seconds, transition ~1 sec):

DurationRecommended Photos
3 minutes28–40 photos
4 minutes38–50 photos
5 minutes48–60 photos
  • Too many photos: remove blurry, too dark, repetitive burst shots; keep only 1–3 best ones of the same scene; every student should appear (parents care most about this in class videos — if someone is missing, tell the teacher).
  • Too few photos: stretch each photo to 8–9 seconds, or suggest shortening the video — don't force it.
  • Narrative order: usually chronological; or group by theme ("Departure," "Challenges," "Lunch," "Group Photo"). Put the group photo at the end as a conclusion.
  • Pacing: first 3–4 photos with shorter duration (4–5 seconds) to grab attention; steady in the middle; important photos (group photo, award moment) get 8 seconds.

3. Generate the Storyboard File and Edit It

python3 $SK/make_video.py plan 照片資料夾 影片工作/storyboard.json --minutes 4 --title "片名" --sub "副標" [--aspect 9:16] [--no-chapters]

This sorts photos by capture time, automatically splits into chapters by day, and calculates durations. Then Claude directly edits storyboard.json:

  • Remove unwanted photos, adjust order, rename chapters to meaningful names.
  • Write captions caption: short, conversational, warm — ideally 8–18 characters per line, max two lines. Not every photo needs a caption — about half is most comfortable. For consecutive photos of the same scene, caption only the first. Don't caption what's already visible ("everyone is eating"), caption what's not ("the noodles we waited 40 minutes for").
  • For photos with faces, set focus to pan toward the face: "focus": [0.5, 0.3] (0–1, top-left is 0,0).
  • For group photos, set "motion": "out" or "none" — don't zoom in and cut people off.
  • Personal data: For visible student ID numbers or name tags in selfies or close-ups, use blur to mosaic them (see references/storyboard.md). Before output, arrange all photos with blur into a check image and review.

See references/storyboard.md for field descriptions.

4. Preview the Storyboard Overview Before Rendering

python3 $SK/make_video.py stills 影片工作/storyboard.json 影片工作/stills.jpg

Use Read to examine stills.jpg. Check: do captions cover faces? Are heads cut off? Are portrait-mode photos placed well? Is the total duration correct? If something's wrong, edit the storyboard and repeat.

5. Preview → Final Rendering

python3 $SK/make_video.py render 影片工作/storyboard.json 影片工作/預覽.mp4 --preview   # 540p, a few dozen seconds
python3 $SK/make_video.py render 影片工作/storyboard.json 成品_片名.mp4                # 1080p
  • Show the teacher the preview first; only render the final version after the teacher approves (a 4-minute 1080p render takes a few minutes).
  • After rendering, use ffprobe to verify there is both video and audio, and that the duration is correct. Then extract 3–4 frames (ffmpeg -ss seconds -i file -frames:v 1 x.jpg) and check them with Read.
  • Cloud environment: place the final file in the main working folder or scratchpad for the teacher to download — never commit the video or photos into the repo (student photos are personal data).

6. Verbal Edits → Record in Preferences

When the teacher asks for changes, apply them to "this video" and also "record them for future":

Teacher saysWhere to change
Captions bigger/smallerstyle.caption_size (1.0 → 1.2)
Captions on topstyle.caption_position: "top"
Faster pacing / faster openingstyle.photo_seconds or individual photo seconds
Transition too slowstyle.transition (1.0 → 0.6)
Don't move the frame so muchstyle.kenburns: 0.04 or 0
Music too loudmusic_volume (0.85 → 0.6)
More text, warmer feelCaption every photo, add quote text cards between sections
More varied transitionsSet transition per scene (see references/storyboard.md)
Switch to upbeat/quiet musicmusic_mood: bright/calm/warm/nostalgic, or supply an audio file

After editing, add general preferences (not just for this video) to preferences.md, noting the date and reason. This step is the most important.

The Teacher's Own Music

"music": "音樂檔.mp3" (path relative to the storyboard file). If the music is too short, it loops automatically; the end fades out automatically. Remind the teacher: for publicly uploaded videos, use licensed music (YouTube Audio Library, royalty-free music). The built-in synthetic soundtrack is copyright-free.

Advanced Features (only if the teacher asks)

  • Teacher voiceover: use the teacher-voice-tts skill to generate a voiceover audio file, then mix it in with ffmpeg (lower the music volume to 0.3 during voiceover).
  • Video clips: inserting short video clips between photos — currently the script processes only photos. If needed, pre-cut the video clips with ffmpeg and concatenate them with the final render.
  • AI-generated filler: when missing an opening scene, use an image generation tool to create a title background, and put it in the title's background field.

What NOT to Do

  • Do not write captions or pick photos without looking at the photos first.
  • Do not use flashy transitions like quick cuts, rotations, bounces (class recap videos should be gentle).
  • Do not put students' full names or seat numbers in captions unless the teacher asks.
  • Do not commit photos or videos into git.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

相关技能