Skip to main content

DSL-driven automated product demo video generator

Project description

DemoDSL

Tests Coverage Perf Python 3.11 | 3.12 License: MIT

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.

Demo

This video was generated automatically by DemoDSL — running demodsl run demo_site.yaml against its own documentation site.

DemoDSL Demo Video
▶ Click the image to watch the full demo video
YAML config used
metadata:
  title: "DemoDSL Documentation Site Tour"

voice:
  engine: "gtts"
  voice_id: "en"

subtitle:
  enabled: true
  style: "classic"

scenarios:
  - name: "Landing Page Tour"
    url: "https://fran-cois.github.io/demodsl/"
    browser: "webkit"
    viewport: { width: 1280, height: 720 }
    avatar:
      enabled: true
      provider: "animated"
      style: "clippy"
    steps:
      - action: "navigate"
        url: "https://fran-cois.github.io/demodsl/"
        narration: "Welcome to DemoDSL..."
      - action: "scroll"
        direction: "down"
        pixels: 600
        narration: "Discover the Quick Start section..."

pipeline:
  - generate_narration: {}
  - edit_video: {}
  - mix_audio: {}
  - burn_subtitles: {}
  - composite_avatar: {}
  - optimize: { format: "mp4" }

Features

  • YAML & JSON DSL — Declarative scenario definitions with steps, effects, and narration
  • Browser Automation — Playwright-powered capture (Chrome, Firefox, WebKit)
  • 12 Voice Providers — ElevenLabs, OpenAI, Azure, Google, AWS Polly, CosyVoice, Coqui, Piper, eSpeak, gTTS, local OpenAI-compatible, custom
  • 63 Visual Effects — 33 browser JS effects + 30 post-processing effects (camera, cinematic, retro, transitions, overlays)
  • Animated Avatars — 61 built-in styles with 4 providers (animated, D-ID, HeyGen, SadTalker)
  • Subtitles — 6 styles (classic, TikTok, color, word-by-word, typewriter, karaoke) with Word-level timing
  • Cursor Overlay — Smooth animated cursor with click effects (ripple, pulse)
  • Popup Cards — Glass/dark/light/gradient cards with progressive item reveal
  • Video Composition — Intro/outro, transitions, watermarks via MoviePy
  • Audio Mixing — Background music with smart ducking during narration
  • 11 Pipeline Stages — Chain of Responsibility with critical/optional error handling
  • Remotion Renderer — React-based video composition alternative
  • Cloud Deploy — S3, GCS, Azure Blob, Cloudflare R2, custom S3-compatible
  • 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 11 stages with critical/optional error handling
Visual Effects Registry + Strategy 63 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 (afftdn) + normalize (loudnorm) audio via ffmpeg
restore_video Optional Stabilize (vidstab) + sharpen (unsharp) video via ffmpeg
apply_effects Optional Post-processing visual effects (ordering stage)
generate_narration Critical TTS generation + video sync (ordering stage)
render_device_mockup Optional Device frame overlay via ffmpeg composite
edit_video Critical Intro, outro, transitions, watermark (ordering stage)
mix_audio Critical Voice + background music ducking
optimize Critical Final encoding with CRF or target bitrate
composite_avatar Optional Avatar overlay compositing (ordering stage)
burn_subtitles Optional Subtitle rendering (ordering stage)
deploy Optional Cloud deployment (ordering stage)

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: espeak and gtts need no API key — ideal pour le prototypage rapide. espeak donne un son robotique rétro, gtts utilise Google Translate (nécessite internet + pip install gtts).

License

MIT — see LICENSE.

Contributing

See CONTRIBUTING.md for development setup, testing, and contribution guidelines. 🇫🇷 Version française

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

demodsl-2.4.0.tar.gz (35.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

demodsl-2.4.0-py3-none-any.whl (175.3 kB view details)

Uploaded Python 3

File details

Details for the file demodsl-2.4.0.tar.gz.

File metadata

  • Download URL: demodsl-2.4.0.tar.gz
  • Upload date:
  • Size: 35.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for demodsl-2.4.0.tar.gz
Algorithm Hash digest
SHA256 d3466e1b8457cd5994dee00950c02a4e2f4209b50605f43c83ae179f55ebac64
MD5 5c866d5a837793ce941ea738c9ef685a
BLAKE2b-256 412be386cce7e07f6f8a7e995eb8dd066d1aca6a24f4733cf21c4da0119d0d81

See more details on using hashes here.

Provenance

The following attestation bundles were made for demodsl-2.4.0.tar.gz:

Publisher: publish.yml on Fran-cois/demodsl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file demodsl-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: demodsl-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 175.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for demodsl-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b36371ae945c933c494bc4a5941c2e70bd7d73c0f69545fe5908ae0b36d42fe6
MD5 5a4b98830f98e4ed78bbe0543d73352c
BLAKE2b-256 722c5fb4b35b8920ae5330a4e715e9c9b90ef62d3f35e774badadfceb73f7d5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for demodsl-2.4.0-py3-none-any.whl:

Publisher: publish.yml on Fran-cois/demodsl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page