Communitygithub.com

photo-video

Turns a batch of photos into a 3–5 minute recap video (MP4): automatically sorted by capture time, split into chapters by day, with slow pans and zooms, crossfade transitions, captions, title and end credits, and background music. Supports landscape 16:9, portrait 9:16 (Reels/Stories), or square output. Use when someone says 'make a video from photos', 'event recap', 'graduation video', 'field trip video', 'edit my photos', 'make a Reel', or drops a photo folder wanting a video.

What is photo-video?

This skill automates the creation of recap videos from a folder of photos. It is designed for educators, event organizers, or anyone who needs to quickly produce a polished, emotional video montage from casual snapshots. The skill runs on macOS/Linux and requires Python/PIL, NumPy, and ffmpeg. It begins by scanning the photo folder, generating contact sheets and a JSON metadata file. It then creates a storyboard JSON that schedules each photo with duration, motion effects (Ken Burns), transitions, and captions. The storyboard can be manually tweaked. Finally, it renders a preview (540p) and a full HD (1080p) video. All operations are idempotent, and the skill remembers user preferences (e.g., subtitle size, music volume) in a `preferences.md` file, so it gets better over time. The skill outputs a standalone MP4 file; photos and videos are never committed to a git repository to protect student privacy.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/charyvalis/cuidu-video-skills/tree/HEAD/photo-video

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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.

Related Skills