CLI

CLI Reference

Complete reference for the playwright-recast command-line interface.

Usage

npx playwright-recast --input <trace-dir-or-zip> [options]

The CLI provides a code-free way to convert Playwright traces into polished demo videos. Every feature available in the programmatic API has a corresponding CLI flag.

Input / Output

FlagShortDefaultDescription
--input-i(required)Trace directory or .zip file path
--output-o./recast-output.mp4Output file path
--formatmp4Output format: mp4 or webm
--resolution1080pOutput resolution: 720p or 1080p
--help-hShow help message

Speed processing

FlagDefaultDescription
--speed-idle3.0Speed multiplier for idle periods
--speed-action1.0Speed multiplier for user actions
--speed-network2.0Speed multiplier for network waits
--no-speedfalseDisable speed processing entirely

Subtitles

FlagDescription
--srtPath to an external SRT subtitle file
--burn-subsBurn subtitles into the video

When --srt is not provided, subtitles are auto-generated from trace step titles and doc strings.

Text processing

FlagDescription
--text-processingEnable built-in text sanitization for TTS
--text-processing-config <path>Load custom text processing rules from a JSON file

Text processing cleans subtitle text before sending to TTS providers (strips smart quotes, normalizes dashes, etc.) while keeping the original text for visual subtitles. See Text Processing for details.

TTS voiceover

FlagDefaultDescription
--providernoneTTS provider: openai, elevenlabs, polly, or none
--voice(provider default)Voice ID for the TTS provider
--model(provider default)Model ID for the TTS provider
--tts-speed1.0TTS speech speed multiplier

Click effects

FlagDescription
--click-effectEnable click highlighting with default settings
--click-effect-config <path>Load click effect configuration from a JSON file
--click-sound <path>Custom click sound audio file

Cursor overlay

FlagDescription
--cursor-overlayEnable animated cursor overlay with defaults
--cursor-overlay-config <path>Load cursor overlay configuration from a JSON file

Frame interpolation

FlagDefaultDescription
--interpolatefalseEnable frame interpolation
--interpolate-fps60Target frames per second
--interpolate-modemciMode: dup, blend, or mci
--interpolate-qualitybalancedQuality preset: fast, balanced, or quality
--interpolate-passes1Number of interpolation passes

Examples

Basic trace to video

npx playwright-recast -i ./test-results/trace.zip -o demo.mp4

Speed processing with subtitle burn-in

npx playwright-recast -i ./traces --speed-idle 4.0 --speed-action 1.0 --burn-subs

External SRT with OpenAI voiceover

npx playwright-recast -i ./traces --srt narration.srt --provider openai --voice nova

ElevenLabs voiceover

npx playwright-recast -i ./traces --srt narration.srt --provider elevenlabs --voice onwK4e9ZLuTAKqWW03F9

Amazon Polly voiceover

npx playwright-recast -i ./traces --srt narration.srt --provider polly --voice Joanna

Click effects with custom sound

npx playwright-recast -i ./traces --click-effect --click-sound click.mp3

Frame interpolation for smooth playback

npx playwright-recast -i ./traces --interpolate --interpolate-fps 30 --interpolate-mode blend

Full pipeline

npx playwright-recast -i ./traces \
  --srt narration.srt \
  --speed-idle 4.0 \
  --text-processing \
  --provider openai --voice nova --tts-speed 1.2 \
  --click-effect \
  --cursor-overlay \
  --interpolate \
  --burn-subs \
  -o demo.mp4

Disable speed processing

npx playwright-recast -i ./traces --no-speed -o raw.mp4

On this page