Communitygithub.com

Joho6666/short-video-factory

批量剪辑竖屏促销短视频(抖音/视频号,30 秒左右):实拍素材 + 活动"明白卡" → 按爆款模板自动写文案、剪映 SAMI 配音、选镜头、渲染 60fps 成片、自动质检,一条命令出 N 条内容各不相同的成片。用户说"批量剪视频/复刻爆款/按模板出片/照着这个视频剪 N 条/商场活动短视频/量产短视频"时使用。代码仓库在 E:/short-video-factory(GUI: app.py)。

short-video-factory 是什么?

short-video-factory is a Claude Code agent skill that 批量剪辑竖屏促销短视频(抖音/视频号,30 秒左右):实拍素材 + 活动"明白卡" → 按爆款模板自动写文案、剪映 SAMI 配音、选镜头、渲染 60fps 成片、自动质检,一条命令出 N 条内容各不相同的成片。用户说"批量剪视频/复刻爆款/按模板出片/照着这个视频剪 N 条/商场活动短视频/量产短视频"时使用。代码仓库在 E:/short-video-factory(GUI: app.py)。.

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

在你喜欢的 AI 中提问

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

文档

Short Video Factory

Turn "a pile of raw footage + an event summary card + a reference trending video" into dozens of distinct, delivery-ready 30-second vertical promotional videos.

Repository: E:/short-video-factory (Python, standalone .venv). Project data resides in a separate project directory (as specified by config.json's project key); the codebase contains no customer content.

When to Use

  • User wants to "create N copies following a trending video", "batch produce videos", or "edit these clips into promotional shorts"
  • An existing project needs ongoing video output, script changes, style adjustments, or client feedback fixes

Hard Rules (Violations Lead to Delivery Failures)

  1. Promotional numbers must come only from the summary card: These are written in the project's project.json under number_whitelist. If any number outside the whitelist appears in a script, the generator will reject it—do not add numbers to the whitelist to bypass this; ask the user first.
  2. Banned words: Defined in banned_words (extreme claims + words the client expressly forbids, e.g., "双节" (Double Festival)).
  3. Avoid risky footage: Clips marked in the index (children's faces, bystanders' faces, celebrity likenesses, brand-owned discount signs, camera operator's fingers, blurred shots, signage for out-of-season events like Hamburg Festival).
  4. Spoken numbers: Dubbing text is automatically converted to Chinese characters (e.g., "450 group 500" becomes "四百五十团五百"), while subtitles display Arabic numerals. When adding new numbers, update spoken_numbers accordingly.
  5. No paid services: Dubbing uses Jianying's SAMI (via the jianying-editor skill), music uses Jianying's cloud library, and everything is rendered locally. Ask the user before using paid dubbing or generative services.
  6. Only modify the project directory and the repository; original footage is read-only.
  7. If you cannot see the visuals or hear the audio, base your conclusions on "frame extraction / transcription verification" and let the user judge the audio feel.

Standard Workflow

cd E:/short-video-factory
.venv/Scripts/python app.py                 # Graphical workbench at http://127.0.0.1:7860
# Or via command line:
.venv/Scripts/python svf/batch.py --n 6 --start 601 -j 3 --qc-sample 0.2   # Output 6 videos
.venv/Scripts/python svf/batch.py --n 70 --start 900 --dry                   # Preview script repetition only

Output: <project>/成片/批次_bXXX-bYYY/ (mp4 + frame extracts + report.md + manifest.csv). Each video also generates a Jianying draft (can be manually refined and exported from Jianying).

New Project Setup (One-Time)

  1. Create a project directory and write project.json (refer to the repo's projects/example/project.json): brand name, source footage sources, whitelist, banned words, dubbing, music, host speech clips.
  2. svf/ingest_mingbaika.py <summary_card.xlsx> → List the numbers from the summary card, confirm with the user, then write the whitelist.
  3. svf/ingest_proxy.py → Convert all footage to 1080x1920/60fps previews (with automatic HDR tone mapping).
  4. svf/ingest_sheets.py → Generate a contact sheet; Claude reviews the contact sheet, classifies each clip, and tags risk markers, writes 数据/素材索引.json (fields: filename/duration/category/content/markers/preview).
  5. svf/ingest_transcribe.py → Transcribe the host's speech, select usable original sentences, and write them into project.json's host_clips.
  6. Analyze the reference trending video: break it down frame by frame (clip duration, transition points, subtitle styles, text overlays), if needed, overlap frames with the material to reconstruct the editor's timeline; save results to templates/.
  7. Write 数据/文案池.json (5–10 variations per category). Verify in the GUI "文案池" (Script Pool) page before outputting videos.

Five Styles (Rotated)

S1: Informative Seeding · S2: Host Speech (original audio + lip-sync accelerated) · S3: Beat-Synced Montage (clips snap to music beats) · S4: List Style (N reasons) · S5: Ambiance Showcase (slow tempo)

Handling Client Feedback

  • Wording changes → Modify the script pool / banned words; do not manually edit a single script (generator will overwrite)
  • Speech speed → Adjust project.json's batch.speed (per style)
  • Shaky/choppy video → Default is 60fps + 1.5x pre-upscaling; if it persists, check the original clip
  • Misplaced subtitle breaks → Add the word to caption_words (it will not be split across lines)

Experience & Pitfalls

See the repository's docs/经验教训.md for details. Key points: Jianying 6.0+ drafts are encrypted and cannot be auto-exported from version 11.5; SAMI may pronounce 500 as "五零零"; full-length transcriptions may miss or duplicate sentences (work sentence by sentence); parallel rendering is CPU-bound; HDR footage without tone mapping will appear washed out.

相关技能