Skip to main content

Turn a slide deck (reveal.js or pptx) plus an optional scripted app demo into a single narrated MP4.

Project description

democast

Turn a slide deck (reveal.js HTML or PowerPoint .pptx) plus an optional scripted app demo into a single narrated MP4. Amazon Polly does the voice; Playwright drives the demo; ffmpeg stitches everything together.

narrate     →  Polly synthesises one MP3 per slide and per demo step
record_deck →  Playwright records the reveal.js deck headed,
               or LibreOffice → ffmpeg builds a video from pptx slides
record_demo →  Playwright drives the app per the demo bundle (skipped if absent)
stitch      →  ffmpeg splices  pre-deck → demo → post-deck → final.mp4

Install

pipx install democast
democast setup     # one-time: download Playwright Chromium, audit tooling

pipx is the recommended way to install Python CLIs because each tool gets its own isolated venv. If you don't have pipx:

brew install pipx        # macOS
apt-get install pipx     # Linux
python -m pip install --user pipx

pip install democast also works (drop it into your venv of choice or use pip install --user democast), but pipx is the cleanest path.

System tooling democast needs

democast setup audits the rest of the toolchain. The full list:

What Required for Install (macOS) Install (Linux) Verify
Python ≥ 3.11 always brew install python@3.12 distro package or pyenv python3 --version
ffmpeg always brew install ffmpeg apt-get install ffmpeg ffmpeg -version
AWS creds with Polly access always aws configure same aws sts get-caller-identity
Playwright Chromium reveal-format decks and any project with a demo segment democast setup (or python -m playwright install chromium) same democast setup will tell you
LibreOffice only format: "pptx" decks brew install --cask libreoffice apt-get install libreoffice soffice --version
pdftoppm (poppler) optional speedup for format: "pptx" (PyMuPDF fallback) brew install poppler apt-get install poppler-utils pdftoppm -v

If pdftoppm isn't available, install democast with the pymupdf extra:

pipx install 'democast[pymupdf]'

Quick start

# In an empty project folder, anywhere on disk:
democast init

# Edit the scaffolded files (see democast-README.md for the full reference).
# At minimum, point deck.path in democast.config.json at your deck.

# Demo credentials (only if you keep the demo segment).
export DEMO_EMAIL=...
export DEMO_PASSWORD=...

# Build.
democast run

Output lands at ./final.mp4 by default. Change with output.dir and output.final_name in democast.config.json. All intermediates land in output.dir/democast-working-dir/, which is removed automatically on success. Pass --keep-intermediates to keep it for debugging.

CLI

democast setup                                        # one-time tooling check
democast init  [--here <dir>] [--force] [--no-check]  # scaffold config files
democast run   [--config <path>] [--keep-intermediates]

How it works

  1. Narrate. Reads the deck (HTML <aside class="notes"> per slide, or .pptx notes pane). Sends each slide's narration text to Amazon Polly. Writes per-slide MP3s and a slides manifest.
  2. Record deck. Either Playwright drives a reveal.js deck headed while the slide auto-advances, or LibreOffice + ffmpeg flatten the pptx into a video where each slide is held for its narration's duration.
  3. Record demo (optional). Playwright drives a live web app headless, following a JSON-defined sequence of clicks/types/waits.
  4. Stitch. ffmpeg cuts the deck around insert_after_slide, re-encodes each segment with its narration, and concats: pre-deck → demo → post-deck → final.mp4.

Configuration

democast init scaffolds three files plus a comprehensive democast-README.md reference:

File Purpose
democast.config.json Engine config (deck path, voice, viewport, output).
democast-macro.json Optional. Reusable engine for the demo: app URL, credentials, named actions (Playwright recipes), waits (JS predicates).
democast-sequence.json Optional. Storyboard for one video: where to splice the demo into the deck, ordered list of steps with narration.

Set "demo": false (or omit) in democast.config.json to skip the demo segment and get a deck-only video.

The scaffolded democast-README.md is a self-contained authoring guide covering the full schema, primitive reference, locator vocabulary, predicate cookbook, validation rules, and a worked end-to-end example. It's written so an LLM can read it once and populate the three config files for any project.

License

MIT. See LICENSE.

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

democast-0.2.1.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

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

democast-0.2.1-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file democast-0.2.1.tar.gz.

File metadata

  • Download URL: democast-0.2.1.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for democast-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cf707361bf1b2e4b2eb14d690111315dd682110def31c7b0d3109853ad193a3a
MD5 6e52ae06cc1d9fd7b3012ec4556bd09b
BLAKE2b-256 c03f33643334e85aac5adab4db02fb0c79f22fb78333d31eb5726af150c67bc1

See more details on using hashes here.

File details

Details for the file democast-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: democast-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for democast-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f118e48ae8dd2bba2dab4a933518a9cbc0ea4ca9c28f08b0d6dcbcf87dc7e2f8
MD5 32556f68cdc3aadf4676b1241f468475
BLAKE2b-256 1de6e92079029b8b5764c20c35a05dc5948062904b0793e3eded65f1909ae189

See more details on using hashes here.

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