DSL-driven automated product demo video generator
Project description
DemoDSL
DSL-driven automated product demo video generator.
Define your product demos in YAML or JSON — DemoDSL handles browser automation, voice narration, visual effects, video editing, and final export.
Features
- YAML & JSON DSL — Declarative scenario definitions with steps, effects, and narration
- Browser Automation — Playwright-powered capture (Chrome, Firefox, WebKit)
- Voice Narration — ElevenLabs TTS with automatic sync to video
- 18 Visual Effects — Spotlight, confetti, glitch, neon glow, and more
- Video Composition — Intro/outro, transitions, watermarks via MoviePy
- Audio Mixing — Background music with smart ducking during narration
- Multi-format Export — MP4, WebM, GIF + social media presets (YouTube, Instagram, Twitter)
Installation
pip install demodsl
Then install Playwright browsers:
playwright install chromium
Quick Start
1. Generate a template:
demodsl init
2. Edit demo.yaml:
metadata:
title: "My Product Demo"
scenarios:
- name: "Main Demo"
url: "https://myapp.com"
steps:
- action: "navigate"
url: "https://myapp.com"
narration: "Welcome to our product!"
effects:
- type: "spotlight"
duration: 2.0
pipeline:
- generate_narration: {}
- edit_video: {}
- mix_audio: {}
- optimize:
format: "mp4"
3. Run:
demodsl run demo.yaml
4. Validate without executing:
demodsl validate demo.yaml
CLI Commands
| Command | Description |
|---|---|
demodsl run <config> |
Execute the full pipeline |
demodsl validate <config> |
Validate config without executing |
demodsl init |
Generate a minimal template |
demodsl init -o demo.json |
Generate a JSON template |
Options
--output-dir, -o— Output directory (default:output/)--dry-run— Log all steps without executing--skip-voice— Skip TTS generation (dev mode)--verbose, -v— Debug logging
Architecture
DemoDSL uses a modular architecture with 5 design patterns:
| Component | Pattern | Purpose |
|---|---|---|
| Providers | Abstract Factory | Voice, Browser, Render provider instantiation |
| Browser Actions | Command | Navigate, Click, Type, Scroll, WaitFor, Screenshot |
| Pipeline | Chain of Responsibility | 8 stages with critical/optional error handling |
| Visual Effects | Registry + Strategy | 18 effects in 2 registries (browser JS + post-processing) |
| Video Composition | Builder | Progressive intro → segments → watermark → outro assembly |
Pipeline Stages
| Stage | Critical | Description |
|---|---|---|
restore_audio |
Optional | Denoise + normalize audio |
restore_video |
Optional | Stabilize + sharpen video |
apply_effects |
Optional | Post-processing visual effects |
generate_narration |
Critical | TTS generation + video sync |
render_device_mockup |
Optional | Device frame overlay |
edit_video |
Critical | Intro, outro, transitions, watermark |
mix_audio |
Critical | Voice + background music ducking |
optimize |
Critical | Final encoding + compression |
Environment Variables
| Variable | Description |
|---|---|
ELEVENLABS_API_KEY |
ElevenLabs TTS API key |
OPENAI_API_KEY |
OpenAI API key (tts-1-hd) |
GOOGLE_APPLICATION_CREDENTIALS |
Path to Google Cloud service account JSON |
AZURE_SPEECH_KEY |
Azure Cognitive Services Speech key |
AZURE_SPEECH_REGION |
Azure region (default: eastus) |
AWS_ACCESS_KEY_ID |
AWS access key for Polly |
AWS_SECRET_ACCESS_KEY |
AWS secret key for Polly |
AWS_DEFAULT_REGION |
AWS region (default: us-east-1) |
COSYVOICE_API_URL |
CosyVoice API server URL (default: http://localhost:50000) |
COQUI_MODEL |
Coqui TTS model name (default: xtts_v2) |
COQUI_LANGUAGE |
Language code for Coqui TTS (default: en) |
PIPER_BIN |
Path to piper binary (default: piper) |
PIPER_MODEL |
Path to Piper .onnx voice model (required for piper engine) |
LOCAL_TTS_URL |
OpenAI-compatible local TTS server URL (default: http://localhost:8000) |
LOCAL_TTS_API_KEY |
API key for local TTS server (default: not-needed) |
LOCAL_TTS_MODEL |
Model name for local TTS server (default: tts-1) |
ESPEAK_BIN |
Path to eSpeak-NG binary (default: espeak-ng) |
Without the required credentials, DemoDSL falls back to a silent dummy provider for development.
Vintage / debug providers:
espeakandgttsneed no API key — ideal pour le prototypage rapide.espeakdonne un son robotique rétro,gttsutilise Google Translate (nécessite internet +pip install gtts).
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file demodsl-2.0.0.tar.gz.
File metadata
- Download URL: demodsl-2.0.0.tar.gz
- Upload date:
- Size: 59.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b49151281cbfebeb3805a3fd0e5d57cd32734c0a9032573c2b4ebc70fe4fd00d
|
|
| MD5 |
1321c950457eef5bfbd6bd38e327cbe9
|
|
| BLAKE2b-256 |
4a5fe61b138fac89bfc869cec0d943e19323529878c86a0ef5eb641ca78731b4
|
Provenance
The following attestation bundles were made for demodsl-2.0.0.tar.gz:
Publisher:
publish.yml on Fran-cois/demodsl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
demodsl-2.0.0.tar.gz -
Subject digest:
b49151281cbfebeb3805a3fd0e5d57cd32734c0a9032573c2b4ebc70fe4fd00d - Sigstore transparency entry: 1188975150
- Sigstore integration time:
-
Permalink:
Fran-cois/demodsl@1e7ba543c54709a43ffe8b7065893afec4ddb2a4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/Fran-cois
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e7ba543c54709a43ffe8b7065893afec4ddb2a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file demodsl-2.0.0-py3-none-any.whl.
File metadata
- Download URL: demodsl-2.0.0-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e992ac4cb4554d47c6cead48fb6b28ec09a2806e0ba4bb17a08001329ada130a
|
|
| MD5 |
be1ae69e6e5e6e55aaf351a93eb58f8b
|
|
| BLAKE2b-256 |
7eece1da3bf1d51e6a5ef1824c0377e7ec94bf8ddbfbe1fe38cef029c29bd54f
|
Provenance
The following attestation bundles were made for demodsl-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on Fran-cois/demodsl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
demodsl-2.0.0-py3-none-any.whl -
Subject digest:
e992ac4cb4554d47c6cead48fb6b28ec09a2806e0ba4bb17a08001329ada130a - Sigstore transparency entry: 1188975152
- Sigstore integration time:
-
Permalink:
Fran-cois/demodsl@1e7ba543c54709a43ffe8b7065893afec4ddb2a4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/Fran-cois
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e7ba543c54709a43ffe8b7065893afec4ddb2a4 -
Trigger Event:
release
-
Statement type: