Script B-roll Video Maker
Version: v0.3.0
Status: MVP Validated / Limited Production Handoff
Use this skill to turn a confirmed article, document, script, or uploaded narration audio into a narrated mixed-footage video. The MVP has been validated on:
- text/document input with exact narration, local TTS, reference-video cuts, free-resource key assets, SRT, burned subtitles, and final MP4 export.
- audio-only input with ASR transcript generation, original-audio narration, semantic timeline splitting, reference-video cuts, free-resource key assets, SRT, burned subtitles, and final MP4 export.
- YouTube-cookie preflight where a reference video must be downloaded, probed, and visually validated before the render starts.
v0.3.0 focuses on making the workflow portable: stable input/output schemas, clear provider boundaries, deterministic local tests, GitHub-safe packaging, and explicit risk notes for parent agents.
Responsibilities
This skill is responsible for:
- Accepting one primary content input:
document_path, script_text, or audio_path.
- Preserving document/script text exactly for narration; no rewriting, summarizing, translating, or polishing.
- Transcribing audio-only input through ASR and marking transcript text as ASR-derived.
- Generating narration audio with local Windows SAPI TTS or a replaceable command TTS provider.
- Splitting narration into semantic/timed segments.
- Detecting key segments from keywords, manual segment ids, or automatic scoring.
- Building visual search queries for each segment.
- Downloading or using reference videos for broad B-roll texture.
- Calling
free-resource/Pexels/Pixabay for authorized key-segment footage when configured.
- Cutting reference videos into short clips, preferring 5-8 seconds and capping every clip at 15 seconds.
- Shuffling reference clips before selection so the output does not follow the source video's chronology.
- Creating one-line SRT subtitles with 10-16 Chinese characters as the target and 20 displayed characters as the hard limit.
- Rendering
final.mp4 and optional final_burned.mp4.
- Writing manifests, reports, logs, and structured success/failure responses for parent agents.
Boundaries
This skill is not responsible for:
- Legal clearance for YouTube, X, or other third-party reference footage.
- Guaranteeing that downloaded reference footage is commercially safe.
- Solving YouTube login, cookie, bot-check, throttling, or account restrictions.
- Rewriting the user's article or making editorial changes.
- Guaranteeing perfect ASR accuracy without human transcript review.
- Building a full DAM/licensing platform.
- Providing advanced motion-graphics subtitle design; the MVP uses FFmpeg/libass burn-in and can hand off to a dedicated subtitle renderer later.
- Producing multiple aspect ratios in one batch run; run one aspect ratio per job until batching is added.
Hard Rules
- Do not modify source text before TTS.
- For audio-only jobs, do not claim ASR text is the user's original script.
- Treat YouTube/X/reference footage as high-risk unless the user provides rights.
- Prefer authorized stock assets for key production claims.
- Validate YouTube downloads before rendering: the file must probe successfully, contain a video stream, extract frames, and not be blank/placeholder.
- Avoid placeholder/static visuals in final acceptance;
placeholder_count must be zero for production handoff.
- Keep subtitles single-line; never render two subtitle lines at once.
- Return structured failure JSON whenever possible.
Inputs And Outputs
Use input_schema.json and output_schema.json as the stable contract.
Required input is one of:
document_path: .txt, .md, .docx, or .pdf.
script_text: inline confirmed script.
audio_path: uploaded narration audio; use ASR or provide transcript_path.
Important optional fields:
voice_config: local or command TTS settings.
asr_config: faster-whisper, command, or test-only mock.
source_policy.reference_video_paths: deterministic local reference footage.
source_policy.reference_urls / reference_search_query: YouTube/reference download inputs.
source_policy.free_resource_*: configured free-resource path, command, config, or pre-downloaded root.
cookies_path: optional exported Netscape cookies file for yt-dlp.
scene: scene detection and clip-duration policy.
render.burn_subtitles: whether to create final_burned.mp4.
Stable output artifacts:
render/final.mp4
render/final_burned.mp4
subtitles/final.srt
audio/narration.wav
text/segments.json
text/asr_transcript.json for audio-only jobs
timeline/timeline.json
timeline/asset_plan.json
render/result.json
render/verification.json
render/agent-response.json
Execution
From the skill root:
powershell -NoProfile -ExecutionPolicy Bypass -File .\run.ps1 `
-RequestPath .\job_config.example.json `
-Workspace "C:\path\to\workspace" `
-ResponsePath "projects\demo\render\agent-response.json"
On hosts with PowerShell 7:
./run.sh ./job_config.example.json /path/to/workspace projects/demo/render/agent-response.json
For deterministic CI and GitHub tests, use local reference video paths and the bundled mock providers. Do not make YouTube cookies a required test dependency.
Workflow
Read workflow.md when implementing or debugging the full pipeline:
document/script -> exact TTS -> semantic timeline -> key segments -> visual queries -> reference/authorized assets -> cutting -> shuffling -> stitching -> subtitles -> export -> verification
Audio-only path:
audio -> ASR transcript -> original-audio segment cuts -> semantic timeline -> key segments -> visuals -> subtitles -> export -> verification
Acceptance Criteria
A job can be accepted when:
- Response
status is completed.
- Final video exists and has video plus audio.
- Burned video exists when requested.
- SRT cues are single-line and max 20 displayed Chinese characters.
asset_plan.json has a selected visual for every segment.
placeholder_count is zero.
- Reference clips follow the 5-8 second preferred / 15 second hard-cap policy.
- Reference clip selection is shuffled rather than source-order.
- Free-resource/Pexels/Pixabay assets are used for configured key segments when available.
- YouTube/reference downloads have passed preflight before render.
verification.status is passed.
- Risk notes are preserved for parent-agent review.
Migration
Read migration_guide.md before moving this skill into another agent platform. Keep the schema contract, provider interfaces, executable entrypoints, output directory structure, and risk notes stable.
Compliance
Read compliance_policy.md before using third-party footage. For commercial publishing, replace high-risk reference clips with authorized footage or store explicit approval/licensing evidence.
1---2name: script-broll-video-maker3description: Build a complete narrated B-roll/mixed-footage video from an uploaded article, document, inline script, or narration audio. Use when the user needs exact-text TTS, ASR from audio-only input, semantic timeline splitting, key sentence detection, YouTube/reference-video cuts, free-resource/Pexels/Pixabay B-roll, one-line subtitles, FFmpeg rendering, structured manifests, and a workflow that can be migrated into another agent system or GitHub project.4---56# Script B-roll Video Maker78Version: `v0.3.0`910Status: `MVP Validated / Limited Production Handoff`1112Use this skill to turn a confirmed article, document, script, or uploaded narration audio into a narrated mixed-footage video. The MVP has been validated on:1314- text/document input with exact narration, local TTS, reference-video cuts, free-resource key assets, SRT, burned subtitles, and final MP4 export.15- audio-only input with ASR transcript generation, original-audio narration, semantic timeline splitting, reference-video cuts, free-resource key assets, SRT, burned subtitles, and final MP4 export.16- YouTube-cookie preflight where a reference video must be downloaded, probed, and visually validated before the render starts.1718`v0.3.0` focuses on making the workflow portable: stable input/output schemas, clear provider boundaries, deterministic local tests, GitHub-safe packaging, and explicit risk notes for parent agents.1920## Responsibilities2122This skill is responsible for:2324- Accepting one primary content input: `document_path`, `script_text`, or `audio_path`.25- Preserving document/script text exactly for narration; no rewriting, summarizing, translating, or polishing.26- Transcribing audio-only input through ASR and marking transcript text as ASR-derived.27- Generating narration audio with local Windows SAPI TTS or a replaceable command TTS provider.28- Splitting narration into semantic/timed segments.29- Detecting key segments from keywords, manual segment ids, or automatic scoring.30- Building visual search queries for each segment.31- Downloading or using reference videos for broad B-roll texture.32- Calling `free-resource`/Pexels/Pixabay for authorized key-segment footage when configured.33- Cutting reference videos into short clips, preferring 5-8 seconds and capping every clip at 15 seconds.34- Shuffling reference clips before selection so the output does not follow the source video's chronology.35- Creating one-line SRT subtitles with 10-16 Chinese characters as the target and 20 displayed characters as the hard limit.36- Rendering `final.mp4` and optional `final_burned.mp4`.37- Writing manifests, reports, logs, and structured success/failure responses for parent agents.3839## Boundaries4041This skill is not responsible for:4243- Legal clearance for YouTube, X, or other third-party reference footage.44- Guaranteeing that downloaded reference footage is commercially safe.45- Solving YouTube login, cookie, bot-check, throttling, or account restrictions.46- Rewriting the user's article or making editorial changes.47- Guaranteeing perfect ASR accuracy without human transcript review.48- Building a full DAM/licensing platform.49- Providing advanced motion-graphics subtitle design; the MVP uses FFmpeg/libass burn-in and can hand off to a dedicated subtitle renderer later.50- Producing multiple aspect ratios in one batch run; run one aspect ratio per job until batching is added.5152## Hard Rules5354- Do not modify source text before TTS.55- For audio-only jobs, do not claim ASR text is the user's original script.56- Treat YouTube/X/reference footage as high-risk unless the user provides rights.57- Prefer authorized stock assets for key production claims.58- Validate YouTube downloads before rendering: the file must probe successfully, contain a video stream, extract frames, and not be blank/placeholder.59- Avoid placeholder/static visuals in final acceptance; `placeholder_count` must be zero for production handoff.60- Keep subtitles single-line; never render two subtitle lines at once.61- Return structured failure JSON whenever possible.6263## Inputs And Outputs6465Use [input_schema.json](input_schema.json) and [output_schema.json](output_schema.json) as the stable contract.6667Required input is one of:6869- `document_path`: `.txt`, `.md`, `.docx`, or `.pdf`.70- `script_text`: inline confirmed script.71- `audio_path`: uploaded narration audio; use ASR or provide `transcript_path`.7273Important optional fields:7475- `voice_config`: local or command TTS settings.76- `asr_config`: `faster-whisper`, `command`, or test-only `mock`.77- `source_policy.reference_video_paths`: deterministic local reference footage.78- `source_policy.reference_urls` / `reference_search_query`: YouTube/reference download inputs.79- `source_policy.free_resource_*`: configured `free-resource` path, command, config, or pre-downloaded root.80- `cookies_path`: optional exported Netscape cookies file for yt-dlp.81- `scene`: scene detection and clip-duration policy.82- `render.burn_subtitles`: whether to create `final_burned.mp4`.8384Stable output artifacts:8586- `render/final.mp4`87- `render/final_burned.mp4`88- `subtitles/final.srt`89- `audio/narration.wav`90- `text/segments.json`91- `text/asr_transcript.json` for audio-only jobs92- `timeline/timeline.json`93- `timeline/asset_plan.json`94- `render/result.json`95- `render/verification.json`96- `render/agent-response.json`9798## Execution99100From the skill root:101102```powershell103powershell -NoProfile -ExecutionPolicy Bypass -File .\run.ps1 `104 -RequestPath .\job_config.example.json `105 -Workspace "C:\path\to\workspace" `106 -ResponsePath "projects\demo\render\agent-response.json"107```108109On hosts with PowerShell 7:110111```bash112./run.sh ./job_config.example.json /path/to/workspace projects/demo/render/agent-response.json113```114115For deterministic CI and GitHub tests, use local reference video paths and the bundled mock providers. Do not make YouTube cookies a required test dependency.116117## Workflow118119Read [workflow.md](workflow.md) when implementing or debugging the full pipeline:120121`document/script -> exact TTS -> semantic timeline -> key segments -> visual queries -> reference/authorized assets -> cutting -> shuffling -> stitching -> subtitles -> export -> verification`122123Audio-only path:124125`audio -> ASR transcript -> original-audio segment cuts -> semantic timeline -> key segments -> visuals -> subtitles -> export -> verification`126127## Acceptance Criteria128129A job can be accepted when:130131- Response `status` is `completed`.132- Final video exists and has video plus audio.133- Burned video exists when requested.134- SRT cues are single-line and max 20 displayed Chinese characters.135- `asset_plan.json` has a selected visual for every segment.136- `placeholder_count` is zero.137- Reference clips follow the 5-8 second preferred / 15 second hard-cap policy.138- Reference clip selection is shuffled rather than source-order.139- Free-resource/Pexels/Pixabay assets are used for configured key segments when available.140- YouTube/reference downloads have passed preflight before render.141- `verification.status` is `passed`.142- Risk notes are preserved for parent-agent review.143144## Migration145146Read [migration_guide.md](migration_guide.md) before moving this skill into another agent platform. Keep the schema contract, provider interfaces, executable entrypoints, output directory structure, and risk notes stable.147148## Compliance149150Read [compliance_policy.md](compliance_policy.md) before using third-party footage. For commercial publishing, replace high-risk reference clips with authorized footage or store explicit approval/licensing evidence.