Skip to content

CLI Reference

The Pellicule CLI is the primary way to render videos. It takes a Vue component and outputs an MP4 file.

Basic Usage

bash
npx pellicule <input.vue> [options]

The .vue extension is optional — Pellicule will add it automatically if the file isn't found:

bash
npx pellicule Video        # Looks for Video.vue
npx pellicule Video.vue    # Same result

Options

OptionShortDefaultDescription
--output-o./output.mp4Output file path
--duration-d90Duration in frames
--fps-f30Frames per second
--width-w1920Video width in pixels
--height-h1080Video height in pixels
--helpShow help message
--versionShow version number

Examples

Render with Defaults

bash
npx pellicule Video

Renders Video.vue to output.mp4 at 1920×1080, 30fps, for 90 frames (3 seconds).

Custom Output Path

bash
npx pellicule Video -o intro.mp4
npx pellicule Video --output ./renders/my-video.mp4

Duration

Duration is specified in frames, not seconds. To calculate frames:

frames = seconds × fps
bash
# 5 seconds at 30fps = 150 frames
npx pellicule Video -d 150

# 10 seconds at 60fps = 600 frames
npx pellicule Video -d 600 -f 60

Quick Reference

Seconds30fps60fps
1s3060
3s90180
5s150300
10s300600
30s9001800
60s18003600

Resolution

bash
# 720p
npx pellicule Video -w 1280 -h 720

# 1080p (default)
npx pellicule Video -w 1920 -h 1080

# 4K
npx pellicule Video -w 3840 -h 2160

# Square (Instagram)
npx pellicule Video -w 1080 -h 1080

# Vertical (TikTok/Reels)
npx pellicule Video -w 1080 -h 1920

Frame Rate

bash
# 24fps (cinematic)
npx pellicule Video -f 24

# 30fps (default, web standard)
npx pellicule Video -f 30

# 60fps (smooth motion)
npx pellicule Video -f 60

Combined Example

A 10-second 4K video at 60fps for YouTube:

bash
npx pellicule Video \
  -o youtube-intro.mp4 \
  -w 3840 \
  -h 2160 \
  -f 60 \
  -d 600

Progress Output

While rendering, Pellicule shows a progress bar:

  PELLICULE  v0.0.0

  Input      Video.vue
  Output     output.mp4
  Resolution 1920x1080
  Duration   90 frames @ 30fps (3.0s)

  █████████████████░░░░░░░░░░░░░ 57% (51/90 @ 28.3 fps)

Error Handling

File Not Found

bash
$ npx pellicule NotAFile

Error: File not found: NotAFile

Make sure the .vue file exists in your current directory.

FFmpeg Not Installed

bash
Error: ffmpeg exited with code 127

Hint: Make sure FFmpeg is installed and available in your PATH
Install: https://ffmpeg.org/download.html

Install FFmpeg before using Pellicule:

  • macOS: brew install ffmpeg
  • Ubuntu/Debian: sudo apt install ffmpeg
  • Windows: Download from ffmpeg.org

Invalid Vue Component

If your component has syntax errors or doesn't mount properly, you'll see the error in the output. Check your component renders correctly in a normal Vue app first.

Exit Codes

CodeMeaning
0Success
1Error (file not found, render failed, etc.)

Environment

Pellicule uses Playwright with Chromium for rendering. The first run may download the browser binary automatically.

All open source projects are released under the MIT License.