Social Media Video Production
Turn a topic into a directly publishable multi-platform video. Covers four content types: travel culture, knowledge/educational, product promotion, and lifestyle/story. Supports three production lines: output prompt packages, generate visuals, or produce final MP4s.
Core Principles
First set specifications, then write content, then produce visuals. Getting the order wrong leads to rework: aspect ratio determines the script, the script determines visuals, and subtitle specifications follow the aspect ratio.
Consume on demand. Image and video generation consumes credits; before any visual generation, report the estimated cost and let the user confirm before proceeding.
Do not overstep. Do not automatically publish to any platform, do not read or write user account credentials, and do not delete user files.
Execution Flow
Step 1: Confirm Specifications
Extract the following information from user input. Fill in missing items using the table below. Only ask clarifying questions when a missing item would significantly affect the result, and ask at most one critical question at a time.
| Item | Default | Options |
|---|---|---|
| Aspect Ratio | 9:16 portrait | 9:16 portrait, 16:9 landscape, 1:1 square |
| Resolution | 1080P | 720P lightweight, 1080P HD |
| Duration | 45 seconds | 15s, 30s, 45s, 60s, 90s |
| Content Type | Infer from user description | Travel culture, knowledge/educational, product promotion, lifestyle/story, scenic compilation |
| Production Line | Infer from user phrasing | Prompt package, visuals, final MP4 |
Production line inference rules:
- User says "give me prompts", "I want to copy to Doubao/Jimeng/Kling", "just the copy" → Route A
- User says "generate visuals", "make a video", "I want images", "add visuals" → Route B
- User says "compose", "produce final", "I want an MP4", "final file" → Route C
- If nothing is explicit: start with Route A's prompt package, and at the end mention the option to upgrade to B or C
Resolution is fixed based on aspect ratio: 9:16 → 1080×1920, 16:9 → 1920×1080, 1:1 → 1080×1080.
Step 2: Write Script and Storyboard
Select the script structure based on the content type, and load references/script-templates.md.
Output as a Markdown table with columns: Shot Number, Time Range, Visual Content, Voiceover Copy, Subtitle Text, Asset Requirements.
Hard requirements:
- The first 3 seconds must contain a hook, type depending on content: question, contrast, suspense, benefit point, visual spectacle
- Each shot's voiceover should be 15 to 25 characters, spoken in no more than 6 seconds
- Total duration must exactly match the target duration; shot time intervals must be continuous with no gaps
- Subtitle text must match the voiceover copy exactly; do not write a separate version
- The last 3 seconds must have a clear call to action or a suspenseful closure
Step 3: Define Visual Style
Load references/visual-styles.md, and select a style based on content type and emotion.
For each shot, output a visual prompt in the format:
Subject + Action + Environment + Lighting + Camera Language + Style + Aspect Ratio
The prompt must include an aspect ratio keyword so that image and video generation models can recognize it.
Step 4: Output Subtitle Specifications
Load references/spec-sheet.md and output a subtitle parameters table.
Required fields: Font, Font Size, Color, Stroke Width, Stroke Color, Position, Background Style, Display Mode, Animation.
Auto-calculate font size based on aspect ratio: portrait: 60, 1:1 square: 54, landscape: 48.
Subtitle text must be broken into lines sentence by sentence; no single line exceeds 14 Chinese characters. Split if longer.
Step 5: Design Voiceover Plan
Load references/tts-domestic.md and output a TTS plan.
Recommend in order of priority: Free tier (Edge TTS), Advanced tier (SiliconFlow / Fish Audio), Cloning tier (VoxCPM).
Must provide: Voice name, Speed, Volume, Emotion annotation, Channels for audition.
Step 6: Produce the Output
Execute according to the production line.
Route A: Prompt Package – Output a complete Markdown document containing the script table, visual prompts, subtitle specifications, TTS parameters, and editing parameters. Can be directly copied to Doubao, Jimeng, Kling, or Jianying.
Route B: Visual Generation – First report the estimated credit cost. After user confirmation, call image and video generation capabilities shot by shot. Use the prompts from Step 3 when calling.
Route C: Final MP4 – Call the local toolchain to synthesize an MP4.
python scripts/make_video.py --spec spec_file.json --out output_directory
Step 7: Deliver and Self-Check
Check each item in the table below. Deliver only when all pass.
| Check Item | Pass Criteria |
|---|---|
| Duration | Actual duration within 1 second of target |
| Aspect Ratio | Resolution matches aspect ratio |
| Subtitles | No typos, no obscuring key visuals |
| Audio-Visual Sync | Subtitle timing aligned with voiceover |
| Assets | No obvious repeated clips |
| Copyright | Background music and asset sources are credited |
| Platform Compliance | No absolute claims, no false promises |
If any item fails, fix and re-render.
Differences Between the Three Production Lines
Route A: Prompt Package
The deliverable is a Markdown document. The user takes it and generates on their own platforms. No credits consumed, no local environment required.
Overseas asset libraries (Pexels, Pixabay, Coverr) are marked in the document as "proxy required"; domestic platforms are marked as no proxy needed.
Route B: Visual Generation
The deliverable is local image and video clip files. Credits consumed: ~5-10 credits per image, ~50-100 credits per 5-second video.
Before execution, report the estimated cost for that shot. The visual description for each shot must be specific enough to be used directly for generation; abstract descriptions lead to empty visuals.
Route C: Final MP4
The deliverable is a final MP4 file. Requires FFmpeg on the local machine.
Visual sources can be files from Route B's output or user-provided materials. When using local materials, first confirm the file path and duration.
Domestic Accessible Channels
Only use domestically accessible channels as the main line:
- TTS: Edge TTS (free, no key required), SiliconFlow, Fish Audio, MiniMax
- Copywriting: Doubao, Tongyi Qianwen, DeepSeek, Zhipu Qingyan, Kimi
- Visuals: Doubao, Jimeng, Kling, Tongyi Wanxiang
- Editing: Jianying
Overseas sources (Pexels, Pixabay, Coverr, ElevenLabs beyond Edge TTS) are only optional enhancements and must be marked as requiring a proxy when used.
Stop Conditions
Stop and explain if any of the following occur; do not force through:
- The combination of duration and aspect ratio requested by the user is not achievable with current video generation capabilities
- The visual prompt cannot support the narrative intent of that shot
- In the final MP4 route, FFmpeg is unavailable and the user does not accept degradation
- Involving unauthorized assets, portraits of others, or copyrighted content
- The user requests automatic publishing to a platform
Dependency Check
Run before execution:
python scripts/check_environment.py
If it returns ready, the environment is complete; proceed to the normal flow. If it returns partial, continue with available features and explain the limitations. If it returns needs_setup, show only the missing items for the current task. If it returns unavailable, provide recovery steps and a safe degradation plan.
Degradation Strategy
| Missing Item | Impact | Degradation |
|---|---|---|
| Video generation capability | Route B cannot output dynamic visuals | Output static images with Ken Burns easing, or switch to Route A |
| Image generation capability | Cannot generate first frame | Use text-to-video only, or switch to Route A |
| FFmpeg | Route C cannot synthesize | Switch to Route A, and output a subtitle file that Jianying can import directly |
| Font files | Subtitle rendering fails | Fall back to system black font; indicate that style may deviate |
| Background music | Final video has no music | Output a silent video and attach a music recommendation list |
After degradation, always mark the limitations and verification status. Stop if core correctness cannot be guaranteed; do not guess to fill in results.
Reference Files
references/script-templates.md– Script structures and hook patterns for the four content typesreferences/visual-styles.md– Style library, color schemes, camera movements, and visual prompt templatesreferences/spec-sheet.md– Full parameters for aspect ratio, resolution, subtitles, TTS, and editingreferences/tts-domestic.md– Domestic TTS channels, voice selection, and parameter configurationreferences/setup-guide.md– Dependency installation and account configurationassets/subtitle-presets.json– Subtitle style presets