marp-slides
v0.3.0-beta.1
Published
Export Marp presentations to PNG images and videos with full animation support
Maintainers
Readme
marp-slides
Export Marp presentations to PNG images and videos with full animation support.
Quick Start
# Try now (no install required)
npx marp-slides image presentation.md
# Install globally
npm install -g marp-slidesRunning the CLI
These scripts can be run with any JavaScript runtime:
Bun (Recommended)
# Run image export
bun run cli.ts image presentation.md
# Run video export
bun run cli.ts video presentation.md --slide 1 --duration 5Deno
# Run directly from JSR
deno run jsr:@davinci/marp-slides/cli.ts image presentation.md
deno run jsr:@davinci/marp-slides/cli.ts video presentation.md --slide 1 --duration 5Node.js / npm
# Via npx (no install)
npx marp-slides image presentation.md
npx marp-slides video presentation.md --slide 1 --duration 5
# Install globally
npm install -g marp-slides
marp-slides image presentation.md
marp-slides video presentation.md --slide 1 --duration 5Commands
marp-slides image
Export slides as PNG images with batch processing and parallel execution.
# Single file
marp-slides image presentation.md
# Multiple files with glob pattern
marp-slides image "*.md"
# With resolution (hd, fhd, 2k, 4k, 5k)
marp-slides image presentation.md 4k
# Override existing output
marp-slides image "*.md" --overridemarp-slides video
Create videos from slides with full animation support. Records HTML animations including:
- Fragments - Step-by-step bullet points and content
- Transitions - Slide-to-slide animations (fade, slide, zoom, etc.)
- CSS effects - Any custom animations in your slides
# Record slide 2 for 5 seconds
marp-slides video presentation.md --slide 2 --duration 5
# Custom resolution and FPS
marp-slides video presentation.md --slide 2 --duration 10 --resolution fhd --fps 30
# Interactive slide selection
marp-slides video presentation.md --duration 5Installation
See docs/installation.md for detailed setup instructions.
Quick setup with Mise:
mise use -g bun ffmpegManual:
Options
image
| Option | Description | Default |
|--------|-------------|---------|
| resolution | Output resolution: hd, fhd, 2k, 4k, 5k | 2k or interactive |
| --override | Overwrite existing output folders | false |
| --output-dir <path> | Custom output directory | Same as .md location |
| --format <fmt> | Image format: png, webp, jpg | png |
| --quiet | Suppress progress output | false |
| --dry-run | Preview without creating files | false |
video
| Option | Description | Default |
|--------|-------------|---------|
| --slide <n> | Slide number to record | Interactive |
| --duration <sec> | Recording duration | Required |
| --resolution <res> | Video resolution: hd, fhd, 2k, 4k, 5k | 2k |
| --fps <n> | Frames per second | 30 |
| --output <path> | Output video path | Auto-generated |
Examples
# Export all slides at 2K resolution
marp-slides image "presentations/*.md" 2k
# Preview what would be created
marp-slides image "*.md" --dry-run
# Create video from slide 3
marp-slides video presentation.md --slide 3 --duration 5
# Video with custom output path
marp-slides video presentation.md --slide 2 --duration 10 --output intro.mp4How It Works
presentation.md
│
▼
┌─────────────────────────────────────┐
│ Marp CLI │
└─────────────────────────────────────┘
│
├──► PNG images ──────────────────► (image)
│
└──► HTML + Transitions ──► Browser ──► Frames ──► MP4
(video)Documentation
- Installation Guide - Detailed setup for all dependencies
License
MIT © chris-cadev
