Demo Video
MicrosoftOfficialPublished by Microsoft
- Skill
- Content generator
- Design and creative
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for creating narrated walkthrough videos by combining static frames or video clips with synchronized narration audio. It uses a YAML-based manifest to define the sequence, resolution, frame rate, and transition effects. The process leverages FFmpeg to normalize segments and mux the audio, resulting in a polished MP4 file. It is designed to integrate into existing media pipelines, such as those using Playwright for screen captures and Azure AI Speech for narration.
What it does
- Assembles ordered visual segments and narration into a single MP4 video.
- Supports both static image frames and existing video clips as visual sources.
- Applies synchronized scene transitions like crossfades between segments.
- Normalizes input segments to a consistent resolution and frame rate.
- Muxes narration WAV files directly into the final video output.
- Provides configurable output settings including resolution, FPS, and transition duration.
When to use it
- When you need to create consistent, narrated walkthroughs of software prototypes.
- When you have a collection of screen captures and generated audio files that need to be combined.
- When you want to automate the production of demo videos as part of a CI/CD pipeline.
- When you require a repeatable process for generating videos with specific transition effects.
Advantages
- Automates the tedious process of manual video editing for simple walkthroughs.
- Ensures consistent video quality and timing across multiple demo segments.
- Integrates seamlessly with other tools for screen capture and AI-generated narration.
- Supports programmatic control via manifest files for version-controlled video production.
Usage examples
- “Assemble a demo video using the segments defined in my segments.yml file.”
- The skill processes the manifest, renders the visual segments and narration into an MP4 file at the specified output path.
- “Create a 1080p demo video with crossfade transitions using the provided manifest.”
- The skill generates an MP4 video at 1920x1080 resolution, applying the requested crossfade effects between all segments.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/microsoft/demo-video/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip demo-video.zip -d .agents/skills
Documentation by Microsoft
Demo Video Assembly Skill
This skill assembles a narrated demo video from ordered visual segments and matching narration audio. It is designed for first-pass walkthrough videos that combine captured prototype frames or clips with per-segment voiceover WAV files.
Overview
The workflow takes a manifest that describes each segment, resolves the visual source, and uses FFmpeg to render each segment into a normalized video clip before assembling the final MP4. It supports hard cuts by default or optional synchronized video and audio fades. The narration track is muxed from WAV files so the output can be reviewed without a separate video-editing tool.
Manifest Schema
Use a segments.yml manifest with optional top-level output settings and an ordered list of segments. Each entry describes a visual source and the narration audio to combine for that portion of the video. All paths resolve relative to the manifest file.
output: ./output/demo.mp4 # optional; destination path for the assembled MP4
resolution: 1280x720 # optional; default 1280x720
fps: 24 # optional; default 24
transition: # optional; omit for hard cuts
type: crossfade
duration: 0.5
fade_in: true
fade_out: true
segments:
- type: frame
visual: ./frames/intro.png
narration: ./audio/intro.wav
duration: 4.5
- type: clip
clip: ./clips/interaction.mp4
narration: ./audio/interaction.wavTop-level fields
outputsets the destination path for the assembled MP4, resolved relative to the manifest; the--outputor-OutputPathargument overrides it when suppliedresolutioncontrols the output width and height inWIDTHxHEIGHTform (default1280x720); the--resolutionor-Resolutionargument overrides itfpssets the frame rate applied when rendering each segment (default24); the--fpsor-Fpsargument overrides ittransitionenables synchronized scene and narration fades; omit it or set it tononeto retain hard cuts
Transition fields
typeacceptscrossfadeorfade, which both select FFmpeg's fade cross-transitiondurationsets every opening, scene, audio, and closing fade in seconds (default0.5)fade_incontrols the opening video and audio fade (defaulttrue)fade_outcontrols the closing video and audio fade (defaulttrue)
The assembler adds silent handles around speech and holds the matching endpoint pictures. Crossfades overlap those handles, not adjacent spoken instructions; do not pre-pad narration to compensate. The normalized segments must exceed twice the transition duration. Output duration is the sum of unpadded narration durations plus one transition duration per scene boundary and per enabled opening/closing fade. With transitions disabled, no handles are added.
Segment fields
typeidentifies whether the segment is a still image (frame) or a motion clip (clip)visualpoints to an image file for a frame segmentclippoints to a motion clip file for a clip segmentnarrationpoints to the WAV file generated from narration text (the script also acceptsnarration_wavas an alias)durationis optional and overrides the inferred duration when you want a fixed segment length
Quick Start
Use the bash or PowerShell wrappers to invoke the assembler from the skill directory.
scripts/assemble-video.sh --manifest examples/segments.yml --output ./output/demo.mp4scripts/Invoke-AssembleVideo.ps1 -ManifestPath examples/segments.yml -OutputPath ./output/demo.mp4Parameters Reference
The assembly step accepts the following high-level controls:
--manifestor-ManifestPathselects the YAML manifest to process--outputor-OutputPathsets the destination MP4 path--fpsor-Fpscontrols the output frame rate for rendered segments--resolutionor-Resolutioncontrols the output width and height in the formWIDTHxHEIGHT--timeoutor-TimeoutSecondssets the maximum seconds for each ffprobe or ffmpeg invocation (1-86400, default 600); a timed-out step stops the run with an error that names the stepdurationper segment lets you override the inferred length when narration timing is known in advance
Failure Behavior
The assembled MP4 is written to a temporary file next to the destination and moved into place only after FFmpeg succeeds. A failed, timed-out, interrupted, or invalid transition run leaves no partial MP4 at the output path and keeps any existing file there unchanged. A successful run replaces an existing file at the output path. Temporary segment files are always removed.
Narration Quality
Narration quality is the single biggest driver of how polished the final video feels. Generate narration with neural voices from Azure AI Speech (part of Azure AI Foundry) through the tts-voiceover skill, for example en-US-Andrew:DragonHDLatestNeural or en-US-Jenny:DragonHDLatestNeural. These produce natural, presentation-grade narration.
This skill assembles video locally with FFmpeg and does not generate video with an AI model. When the narration is synthetic, tell viewers that the voice is AI-generated. HVE demo-material CI publishes silent videos; internal silent timing tracks are removed during finalization.
See the tts-voiceover skill for the neural voice catalog, --voice and --rate controls, and Azure authentication (Microsoft Entra ID recommended, or a key).
Reuse Bridge
This skill is intentionally designed to fit into the existing media workflow:
tts-voiceoverprovides the narration WAV files that this skill muxes into the final output; prefer its Azure AI Speech neural voices for production-quality narrationvscode-playwrightprovides the frame-capture source for prototype walkthroughs and screen-based demos
Prerequisites
FFmpeg and ffprobe must be available on your PATH.
Linux
sudo apt update && sudo apt install ffmpegmacOS
brew install ffmpegWindows
winget install FFmpeg.FFmpegFiles
- ATTRIBUTION.mdAdded by AutoGineer829 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md6.3 KiB
- examples/README.md1018 B
- examples/segments.yml341 B
- pyproject.toml491 B
- scripts/Invoke-AssembleVideo.ps1Script3.2 KiB
- scripts/assemble-video.shScript1.2 KiB
- scripts/assemble_video.pyScript24.8 KiB
- tests/Invoke-AssembleVideo.Tests.ps1Script1.7 KiB
- tests/corpus/empty-segments.yml13 B
- tests/corpus/unknown-key.yml73 B
- tests/corpus/valid-manifest.yml177 B
- tests/fuzz_harness.pyScript2.6 KiB
- tests/test_assemble_video.pyScript26.1 KiB
- tests/test_assemble_video_integrity.pyScript11.7 KiB
- uv.lock67.8 KiB
tests/test_assemble_video_integrity.py
# Copyright (c) 2026 Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
"""Subprocess, output-integrity, and cleanup tests for the demo-video assembler.
FFmpeg and ffprobe are replaced with an in-process fake for ``subprocess.run``;
inputs are byte stubs, so no media tools or media files are required.
"""
from __future__ import annotations
import subprocess
import sys
from pathlib import Path
import assemble_video
import pytest
def _write_inputs(base_dir: Path, *, duration: float | None = 1.0) -> Path:
"""Write a one-segment manifest with stub inputs and return its path."""
base_dir.mkdir(parents=True, exist_ok=True)
(base_dir / "intro.png").write_bytes(b"png")
(base_dir / "intro.wav").write_bytes(b"wav")
lines = [
"segments:",
" - type: frame",
" visual: intro.png",
" narration: intro.wav",
]
if duration is not None:
lines.append(f" duration: {duration}")
manifest_path = base_dir / "segments.yml"
manifest_path.write_text("\n".join(lines) + "\n", encoding="utf-8")
return manifest_path
class FakeFfmpeg:
"""Programmable stand-in for ``subprocess.run`` covering ffmpeg and ffprobe."""
def __init__(self) -> None:
self.calls: list[tuple[list[str], dict]] = []
self.concat_list: str | None = None
self.concat_returncode = 0
self.concat_partial_bytes: bytes | None = None
self.raise_on_call: BaseException | None = None
self.probe_stdout = "1.5"
def __call__(self, command, **kwargs):
self.calls.append((list(command), kwargs))
if self.raise_on_call is not None:
raise self.raise_on_call
if str(command[0]).endswith("ffprobe"):
return subprocess.CompletedProcess(command, 0, self.probe_stdout, "")
if "concat" in command:
list_path = Path(command[command.index("-i") + 1])
self.concat_list = list_path.read_text(encoding="utf-8")
if self.concat_partial_bytes is not None:
Path(command[-1]).write_bytes(self.concat_partial_bytes)
if self.concat_returncode != 0:
return subprocess.CompletedProcess(
command, self.concat_returncode, "", "Invalid data found"
)
Path(command[-1]).write_bytes(b"mp4")
return subprocess.CompletedProcess(command, 0, "", "")
@pytest.fixture()
def fake_ffmpeg(mocker):
fake = FakeFfmpeg()
mocker.patch.object(
assemble_video,
"_require_command",
side_effect=lambda command: f"/usr/bin/{command}",
)
mocker.patch("assemble_video.subprocess.run", side_effect=fake)
return fake
def _leftover_temp_dirs(directory: Path) -> list[Path]:
return [path for path in directory.glob("demo-video-*") if path.is_dir()]
class TestSubprocessTimeout:
"""Every external call is bounded by the configured timeout."""
def test_given_ffmpeg_times_out_when_assemble_video_then_raises_manifest_error(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
fake_ffmpeg.raise_on_call = subprocess.TimeoutExpired(["ffmpeg"], 5)
# Act / Assert
with pytest.raises(assemble_video.ManifestError, match="timed out after 5"):
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=tmp_path / "demo.mp4",
fps=None,
resolution=None,
timeout=5,
)
def test_given_ffprobe_times_out_when_probe_duration_then_raises_manifest_error(
self, tmp_path, fake_ffmpeg
):
# Arrange
audio_path = tmp_path / "intro.wav"
audio_path.write_bytes(b"wav")
fake_ffmpeg.raise_on_call = subprocess.TimeoutExpired(["ffprobe"], 3)
# Act / Assert
with pytest.raises(assemble_video.ManifestError, match="timed out after 3"):
assemble_video._probe_duration(audio_path, timeout=3)
def test_given_no_timeout_flag_when_parse_args_then_defaults_to_600(self):
# Act
args = assemble_video.create_parser().parse_args(["--manifest", "m.yml"])
# Assert
assert args.timeout == 600
@pytest.mark.parametrize("timeout", [0, 86401])
def test_given_out_of_range_timeout_when_assemble_video_then_raises(
self, tmp_path, fake_ffmpeg, timeout
):
# Arrange
manifest_path = _write_inputs(tmp_path)
# Act / Assert
with pytest.raises(assemble_video.ManifestError, match="Timeout"):
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=tmp_path / "demo.mp4",
fps=None,
resolution=None,
timeout=timeout,
)
def test_given_timeout_when_assemble_video_then_every_subprocess_receives_timeout(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path, duration=None)
# Act
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=tmp_path / "demo.mp4",
fps=None,
resolution=None,
timeout=5,
)
# Assert
assert fake_ffmpeg.calls
assert all(kwargs.get("timeout") == 5 for _, kwargs in fake_ffmpeg.calls)
class TestMalformedMedia:
"""Decoder and probe failures surface as typed manifest errors."""
def test_given_ffmpeg_rejects_input_when_assemble_video_then_raises_with_stderr(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
fake_ffmpeg.concat_returncode = 1
# Act / Assert
with pytest.raises(assemble_video.ManifestError, match="Invalid data found"):
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=tmp_path / "demo.mp4",
fps=None,
resolution=None,
)
@pytest.mark.parametrize(
("probe_stdout", "message"),
[("N/A", "Unable to parse"), ("0", "must be positive")],
)
def test_given_unusable_probe_output_when_probe_duration_then_raises(
self, tmp_path, fake_ffmpeg, probe_stdout, message
):
# Arrange
audio_path = tmp_path / "intro.wav"
audio_path.write_bytes(b"wav")
fake_ffmpeg.probe_stdout = probe_stdout
# Act / Assert
with pytest.raises(assemble_video.ManifestError, match=message):
assemble_video._probe_duration(audio_path)
class TestOutputIntegrity:
"""The final MP4 is published only after a successful concat."""
def test_given_concat_fails_after_partial_write_when_assemble_video_then_no_output(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
output_path = tmp_path / "out" / "demo.mp4"
fake_ffmpeg.concat_partial_bytes = b"partial"
fake_ffmpeg.concat_returncode = 1
# Act
with pytest.raises(assemble_video.ManifestError):
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=output_path,
fps=None,
resolution=None,
)
# Assert
assert not output_path.exists()
def test_given_existing_output_when_assemble_video_succeeds_then_output_replaced(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
output_path = tmp_path / "demo.mp4"
output_path.write_bytes(b"previous")
# Act
result = assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=output_path,
fps=None,
resolution=None,
)
# Assert
assert result.read_bytes() == b"mp4"
def test_given_existing_output_when_concat_fails_then_existing_output_unchanged(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
output_path = tmp_path / "demo.mp4"
output_path.write_bytes(b"previous")
fake_ffmpeg.concat_partial_bytes = b"partial"
fake_ffmpeg.concat_returncode = 1
# Act
with pytest.raises(assemble_video.ManifestError):
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=output_path,
fps=None,
resolution=None,
)
# Assert
assert output_path.read_bytes() == b"previous"
def test_given_quote_in_output_dir_when_assemble_video_then_concat_entries_escaped(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
output_path = tmp_path / "it's" / "demo.mp4"
# Act
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=output_path,
fps=None,
resolution=None,
)
# Assert
segment_path = Path(fake_ffmpeg.calls[0][0][-1])
escaped = segment_path.as_posix().replace("'", "'\\''")
assert fake_ffmpeg.concat_list.splitlines() == [f"file '{escaped}'"]
class TestCleanup:
"""Temporary segment directories never outlive the run."""
def test_given_interrupt_during_render_when_assemble_video_then_temp_dir_removed(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
fake_ffmpeg.raise_on_call = KeyboardInterrupt()
# Act
with pytest.raises(KeyboardInterrupt):
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=tmp_path / "demo.mp4",
fps=None,
resolution=None,
)
# Assert
assert _leftover_temp_dirs(tmp_path) == []
assert not (tmp_path / "demo.mp4").exists()
def test_given_interrupt_when_main_then_returns_130(self, monkeypatch, mocker):
# Arrange
monkeypatch.setattr(sys, "argv", ["assemble_video.py", "--manifest", "m.yml"])
mocker.patch.object(
assemble_video, "assemble_video", side_effect=KeyboardInterrupt()
)
# Act
exit_code = assemble_video.main()
# Assert
assert exit_code == 130
def test_given_successful_run_when_assemble_video_then_temp_dir_removed(
self, tmp_path, fake_ffmpeg
):
# Arrange
manifest_path = _write_inputs(tmp_path)
# Act
assemble_video.assemble_video(
manifest_path=manifest_path,
output_path=tmp_path / "demo.mp4",
fps=None,
resolution=None,
)
# Assert
assert _leftover_temp_dirs(tmp_path) == []
class TestValidationBounds:
"""Manifest validation bounds resolution and duration from below only."""
def test_given_extreme_resolution_and_duration_when_validate_manifest_then_accepted(
self,
):
# Arrange
data = {
"resolution": "100000x100000",
"segments": [
{"visual": "a.png", "narration": "a.wav", "duration": 1_000_000_000}
],
}
# Act
config, segments = assemble_video._validate_manifest(data)
# Assert
assert config["resolution"] == "100000x100000"
assert segments[0]["duration"] == 1_000_000_000
@pytest.mark.parametrize("resolution", ["1280by720", "0x720", "axb", "1280x-1"])
def test_given_malformed_resolution_when_validate_resolution_then_raises(
self, resolution
):
# Act / Assert
with pytest.raises(assemble_video.ManifestError):
assemble_video._validate_resolution(resolution)
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Python
The author says: Requires FFmpeg on PATH
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/hve-core · .github/skills/experimental/demo-video · commit f425e94
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download demo-video.zip