What does Short Video Factory do?
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)
- Promotional numbers must come only from the summary card: These are written in the project's
project.jsonundernumber_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. - Banned words: Defined in
banned_words(extreme claims + words the client expressly forbids, e.g., "双节" (Double Festival)). - 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).
- 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_numbersaccordingly. - 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.
- Only modify the project directory and the repository; original footage is read-only.
- 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)
- Create a project directory and write
project.json(refer to the repo'sprojects/example/project.json): brand name, source footagesources, whitelist, banned words, dubbing, music, host speech clips. svf/ingest_mingbaika.py <summary_card.xlsx>→ List the numbers from the summary card, confirm with the user, then write the whitelist.svf/ingest_proxy.py→ Convert all footage to 1080x1920/60fps previews (with automatic HDR tone mapping).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).svf/ingest_transcribe.py→ Transcribe the host's speech, select usable original sentences, and write them intoproject.json'shost_clips.- 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/. - 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'sbatch.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.