CLI & REST API Reference

Overview

The pme CLI lets you transcode, probe media files, manage presets, and run a headless encoding server — all from the terminal. It ships inside the application bundle.

Installation

Install the CLI from within the app: Parallel Media Encoder → Install CLI Tool… in the menu bar. This creates the symlink automatically. See the Getting Started guide for details.

Or create the symlink manually:

ln -s "/Applications/Parallel Media Encoder.app/Contents/MacOS/pme" /usr/local/bin/pme

License requirement

The transcode, service, and watch commands require an active Pro license. The probe and inspect commands are free for everyone.

Quick check

Check version
pme --version
Show help
pme --help

pme transcode

Transcode one or more media files. Requires a Pro license.

Multiple inputs encode in parallel using the same scheduler as the app — up to the hardware session limit (or --concurrency), with RAW formats held to their per-format isolation caps. Invalid flag values are rejected up front with exit code 2; they are never silently ignored.

Flags

Flag Description
inputs (positional)Input file path(s)
-o, --outputOutput file or directory
--codecOutput codec (see Available Codecs)
--qualityQuality 0.0 – 1.0 (automatic mode)
--bitrateTarget bitrate in Kbps (manual mode)
--presetApply a saved preset by name
--resolutionOutput resolution, e.g. 1920x1080, or source
--resize-modeResize mode when aspect ratio differs: stretch, fit, or fill (default: stretch)
--rotateRotate video: cw90, 180, or ccw90 (alias cw270)
--audio-codecaac, alac, or pcm. CLI has no separate track selector flag.
--audio-channelssource, mono, or stereo. Mono/stereo downmix multichannel audio (e.g. 5.1 → stereo). Default: source
--audio-passthroughPass audio through unchanged (default)
--copy-audioCopy audio-only sources byte-for-byte instead of transcoding them to .m4a. Still images and camera-raw stills are always copied.
--lutPath to a .cube LUT file
--proresraw-colorProRes RAW color mode: flat (V-Log for grading) or rec709 (V-Log + Rec.709 LUT for delivery). Default: flat
--arri-colorARRI RAW color target: rec709, rec2020pq, rec2020sdr, rec2020hlg, p3d65, logc3 (AWG3/LogC3), logc4 (AWG4/LogC4), or native-logc (flat pass-through). Default: native-logc
--canon-colorCanon Cinema RAW (.CRM) color as gamma:colorspace. Gamma: rec709, canonlog2, canonlog3, widedr, pq, hlg, cmtpq, cmthlg, cmtdci, cmt709, canon709. Color space: rec709, cinemagamut, bt2020, dcip3. Default: canonlog2:cinemagamut (flat log, matches Premiere Pro); use canonlog2:rec709 for a baked Rec.709 look matching DaVinci Resolve
--raw-exposure-evRAW exposure adjustment in EV stops, -3.0 to 3.0 (BRAW and R3D sources). Default: 0
--hdrHDR source handling: passthrough (keep HDR when the output codec supports it; default) or tonemap (convert to SDR)
--inIn-point timecode (HH:MM:SS:FF). Encoding starts at this frame. Default: start of file
--outOut-point timecode (HH:MM:SS:FF). Encoding ends at this frame. Default: end of file
--timecode-burninBurn in source timecode overlay
--watermarkPath to a transparent PNG to use as watermark (always centered)
--watermark-scaleWatermark scale as percentage of source PNG size (1–400, default 100)
--interlacedEncode DNxHD as interlaced (TFF) for broadcast server ingest
--jsonMachine-readable NDJSON output
--overwriteOverwrite existing output files
--concurrencyMax parallel encodes for multi-file batches, 1 up to the hardware session limit. Default: auto (hardware limit). RAW formats keep their own tighter isolation caps.
--allow-oversize-encodeBypass the app-side resolution gate so the hardware encoder can attempt resolutions above Apple's documented limits (capped at 12288×6480)
--segment-parallelSplit a single long encode into time-range segments that run in parallel, then re-mux (experimental). Forces the feature on for this run.
--max-segmentsUpper bound on parallel segments per job with --segment-parallel (1–8). Default: auto (chip-tier + codec caps)

Examples

Basic transcode
pme transcode input.mxf -o output.mov --codec hevc --quality 0.8
Using a preset
pme transcode input.mxf -o output.mov --preset "YouTube 4K H.265"
ProRes with LUT
pme transcode input.mxf -o output.mov --codec prores422hq --lut /path/to/look.cube
ProRes RAW with Rec.709 color
pme transcode input.braw -o output.mov --codec prores422hq --proresraw-color rec709
Canon Cinema RAW Light → ProRes (Canon Log 2 / Cinema Gamut)
pme transcode A001C001.CRM -o output.mov --codec prores422hq --canon-color canonlog2:cinemagamut
ARRIRAW → ProRes 4444 (LogC4)
pme transcode shot.mxf -o output.mov --codec prores4444 --arri-color logc4
Batch folder
pme transcode *.mxf -o /output/folder/
JSON progress
pme transcode input.mxf -o output.mov --json
Rotate 90° clockwise (vertical video)
pme transcode input.braw -o output.mov --codec hevc --rotate cw90
Rotate counter-clockwise with custom resolution
pme transcode input.R3D -o output.mov --codec prores422hq --rotate ccw90 --resolution 1080x1920
Fit to resolution (letterbox/pillarbox)
pme transcode input.mov -o output.mov --resolution 1920x1080 --resize-mode fit
Rotate + fill (combined)
pme transcode input.mxf -o output.mov --rotate cw90 --resolution 1080x1920 --resize-mode fill
Trim to in/out range
pme transcode input.mov -o clip.mov --in 00:01:30:00 --out 00:02:15:00 --codec hevc
Trim from in-point to end of file
pme transcode input.mov -o clip.mov --in 00:05:00:00
Centered watermark at 50% of native PNG size
pme transcode input.mov -o output.mov --watermark /path/to/logo.png --watermark-scale 50
Export as animated GIF
pme transcode input.mov -o output.gif --codec gif
Extract a short GIF clip
pme transcode input.mov -o clip.gif --codec gif --in 00:00:10:00 --out 00:00:13:00

pme probe

Inspect a media file and print its metadata. Works without a Pro license.

Human-readable output
pme probe /path/to/video.mxf
JSON output
pme probe --json /path/to/video.mxf

Example JSON response:

pme probe --json output
{
  "videoCodec": "H.264",
  "width": 3840,
  "height": 2160,
  "frameRate": 59.94,
  "duration": 60.5,
  "container": "MXF",
  "audioTracks": [
    {
      "index": 0,
      "codec": "PCM",
      "channels": 1,
      "sampleRate": 48000,
      "bitDepth": 24
    },
    {
      "index": 1,
      "codec": "PCM",
      "channels": 1,
      "sampleRate": 48000,
      "bitDepth": 24
    }
  ],
  "fileSize": 1073741824
}

pme inspect

Display full metadata for a media file — codec, resolution, bit depth, chroma subsampling, timecode, HDR info, and more. Works without a Pro license.

This is a deeper analysis than pme probe. Use probe for fast scripting; use inspect for detailed human inspection.

Human-readable metadata
pme inspect /path/to/video.mxf
JSON output
pme inspect --json /path/to/video.braw

Flags

Flag Description
input (positional)Path to the media file to inspect
--jsonOutput metadata as JSON

pme presets

Manage encoding presets. Presets are shared with the app — a preset created via the CLI appears in the GUI and vice versa. Built-in presets cannot be modified or deleted.

List

Human-readable list
pme presets list
JSON array
pme presets list --json

Create

Creates a custom preset, starting from an existing preset's settings when --base is given, otherwise from app defaults. --codec is required unless --base is given. Requires a Pro license.

Flag Description
name (positional)Name for the new preset
--baseExisting preset (built-in or custom) to copy settings from
--codecOutput codec (see Available Codecs)
--qualityQuality 0.0–1.0 (automatic mode)
--bitrateAverage video bitrate in kbps (manual mode)
--resolutionWIDTHxHEIGHT or source
--resize-modestretch, fit, or fill
--frame-rateOutput frame rate (e.g. 23.976, 25). Omit to keep the source rate
--audio-codecaac, alac, pcm, or passthrough
--audio-bitrateAudio bitrate in kbps (AAC)
--audio-channelssource, mono, or stereo
--folderFolder to file the preset under in the preset list
Create from scratch
pme presets create "Proxy 1080p" --codec prores422proxy --resolution 1920x1080
Create from an existing preset
pme presets create "YouTube 4K Stereo" --base "YouTube 4K H.265" --audio-channels stereo

Rename, delete, export, import

Rename a custom preset
pme presets rename "Proxy 1080p" "Proxy FHD"
Delete a custom preset
pme presets delete "Proxy FHD"
Export a preset (built-in or custom) to JSON
pme presets export "YouTube 4K H.265" ~/Desktop/youtube-4k.json
Import a preset into the custom library
pme presets import ~/Desktop/youtube-4k.json

pme license

Manage your Pro license from the command line.

Check current license
pme license status
Activate Pro
pme license activate YOUR-LICENSE-KEY
Remove license from this machine
pme license deactivate

pme service

Run Parallel Media Encoder as a headless HTTP server. This enables remote job submission, queue management, and real-time progress monitoring through the REST API.

Start & stop

Start server (Unix socket)
pme service start

The default socket is ~/Library/Application Support/ParallelMediaEncoder/pme.sock. If you pass a custom --socket, keep the path short — macOS limits Unix socket paths to 104 characters.

Custom port
pme service start --port 8080
Disable auth (local only)
pme service start --no-auth
Stop the server
pme service stop
Check if running
pme service status

Auto-start with launchd

Install launchd agent
pme service install
Remove launchd agent
pme service uninstall

Auth tokens

Show auth token
pme service token
Generate new token
pme service token --regenerate

pme watch

Manage watch folders for automatic transcoding. Drop media into a folder and PME picks it up, applies a preset, and transcodes to your output folder. Requires a Pro license.

Watch folder configurations are shared between the GUI and CLI — a folder added via the CLI appears in the app and vice versa. Configs are stored in ~/Library/Application Support/ParallelMediaEncoder/WatchFolders.json.

How it works

When a watch folder is active, PME polls the folder at a configurable interval (1–60 minutes). New media files are moved into a PickedUp subfolder (or a custom destination on the same volume) before transcoding begins. This prevents files from being processed twice. To re-process a file, move it back out of the PickedUp destination.

The output folder cannot be inside or the same as the watch folder (this would create an infinite loop). Watch folders also cannot overlap — a new watch folder cannot be a parent or subfolder of an existing one.

For network shares (SMB, NFS, AFP), PME can store credentials and automatically remount the share if it disconnects during polling.

Add a watch folder

Flag Description
--folderFolder path to watch for new media (required)
--outputOutput directory for transcoded files (required)
--presetPreset name to apply (required)
--intervalPolling interval in minutes, 1–60 (default: 5)
--overwriteAllow overwriting existing output files
--suffixSuffix to append to output filenames
--picked-up-pathCustom destination for picked-up files (must be on same volume as watch folder)
--network-userUsername for network share authentication (SMB/NFS/AFP)
--network-passwordPassword for network share authentication (stored securely in Keychain)
--jsonOutput config as JSON
Add a watch folder with proxy suffix
pme watch add \
  --folder /Volumes/Ingest/DailyRushes \
  --output /Volumes/Export/Proxies \
  --preset "ProRes 422 LT" \
  --interval 5 \
  --suffix "-Proxy"
Watch folder with overwrite enabled
pme watch add \
  --folder ~/Desktop/WatchMe \
  --output ~/Transcoded \
  --preset "HEVC Master" \
  --interval 10 \
  --overwrite
Network share with credentials for auto-remount
pme watch add \
  --folder /Volumes/NAS/Ingest \
  --output /Volumes/NAS/Transcoded \
  --preset "ProRes 422 HQ" \
  --network-user "[email protected]" \
  --network-password "secret"
Custom PickedUp destination on the same volume
pme watch add \
  --folder /Volumes/Rushes/Camera_A \
  --output /Volumes/Rushes/Proxies \
  --preset "ProRes 422 Proxy" \
  --picked-up-path /Volumes/Rushes/Processed

List watch folders

Human-readable list
pme watch list
JSON output
pme watch list --json

Example output:

pme watch list output
a1b2c3d4  enabled
  Watch:    /Volumes/Ingest/DailyRushes
  Output:   /Volumes/Export/Proxies
  Preset:   ProRes 422 LT
  Interval: 5 min
  Suffix:   -Proxy
  Overwrite: no

b5c6d7e8  enabled
  Watch:    /Volumes/NAS/Ingest
  Output:   /Volumes/NAS/Transcoded
  PickedUp: /Volumes/NAS/Processed
  Preset:   ProRes 422 HQ
  Interval: 5 min
  Overwrite: no
  Network User: [email protected]

Start watching (foreground)

The start command runs in the foreground and prints events as files are picked up. Press Ctrl+C to stop. You can start a specific watch folder by ID prefix, or all configured folders.

Start all watch folders
pme watch start all
Start a specific watch folder (by ID prefix)
pme watch start a1b2c3d4
JSON event stream (for scripting)
pme watch start all --json

Example output while running:

Foreground output
PME watch folders running. Press Ctrl+C to stop.
  [a1b2c3d4] /Volumes/Ingest/DailyRushes (every 5 min)

[14:32:01] [a1b2c3d4] Scanning /Volumes/Ingest/DailyRushes...
[14:32:02] [a1b2c3d4] 3 files picked up (3 total)
[14:37:01] [a1b2c3d4] Scanning /Volumes/Ingest/DailyRushes...

Stop & remove

Disable all watch folders
pme watch stop all
Disable a specific watch folder
pme watch stop a1b2c3d4
Remove a watch folder config
pme watch remove a1b2c3d4
Remove by folder path
pme watch remove /Volumes/Ingest/DailyRushes

Removing a watch folder also deletes any stored network credentials from the Keychain.

REST API

When the service is running, all endpoints are available over HTTP. Every request requires an Authorization: Bearer <token> header unless the server was started with --no-auth.

Endpoints

Endpoint Method Description
/api/v1/healthGETHealth check
/api/v1/jobsPOSTSubmit transcode job(s)
/api/v1/jobsGETList all jobs
/api/v1/jobs/:idGETGet job status
/api/v1/jobs/:idDELETECancel a job
/api/v1/queue/startPOSTStart encoding
/api/v1/queue/pausePOSTPause all encodes
/api/v1/queue/statusGETQueue summary
/api/v1/presetsGETList presets
/api/v1/hardwareGETHardware info
/api/v1/licenseGETLicense status
/api/v1/eventsGET (SSE)Real-time progress stream

Submit a job

All fields except inputs are optional. Invalid values (unknown codec, unknown preset, malformed resolution, unknown audio codec) are rejected with a 400/404 — never silently ignored.

Field Type Description
inputsstring[]Absolute input file paths (required)
output_dirstringOutput directory; filenames derive from the inputs
outputstringExplicit output file path (single input only; may not equal the input)
codecstringCodec ID (see Available Codecs). Overrides the preset's codec. Default: hevc
presetstringPreset name to apply (case-insensitive); 404 if unknown
qualitynumber0.0–1.0, automatic quality mode. Mutually exclusive with bitrate
bitratenumberTarget bitrate in Kbps, manual mode
resolutionstringWIDTHxHEIGHT, e.g. 1920x1080
audio_codecstringaac, alac, or pcm. Default: passthrough
lutstringPath to a .cube LUT file
timecode_burninboolBurn in source timecode overlay
raw_exposure_evnumberRAW exposure in EV stops, -3.0 to 3.0 (BRAW/R3D)
hdrstringpassthrough (default) or tonemap
auto_startboolStart the queue immediately. Default: true
POST /api/v1/jobs
{
  "inputs": ["/path/to/input1.mxf", "/path/to/input2.mov"],
  "output_dir": "/path/to/output/",
  "codec": "hevc",
  "quality": 0.8,
  "auto_start": true
}

By default the service listens on a Unix domain socket:

curl via the default Unix socket
curl -X POST \
  --unix-socket "$HOME/Library/Application Support/ParallelMediaEncoder/pme.sock" \
  http://localhost/api/v1/jobs \
  -H "Authorization: Bearer $(pme service token)" \
  -H "Content-Type: application/json" \
  -d '{"inputs": ["/path/to/file.mxf"], "output_dir": "/output/", "codec": "hevc"}'

With pme service start --port 8080, the same API is available over TCP (localhost only):

curl via TCP
curl -X POST http://localhost:8080/api/v1/jobs \
  -H "Authorization: Bearer $(pme service token)" \
  -H "Content-Type: application/json" \
  -d '{"inputs": ["/path/to/file.mxf"], "output_dir": "/output/", "codec": "hevc"}'

Server-Sent Events

Connect to /api/v1/events for real-time updates. Because EventSource can't set headers, this endpoint also accepts the token as a query parameter: /api/v1/events?token=<token>. The stream emits three event types:

  • progress — per-file encoding progress (percentage, speed, ETA)
  • state_change — job state transitions (queued, encoding, completed, failed)
  • queue_status — overall queue summary updates

Available Codecs

Pass these IDs to --codec. DNxHR codecs require a Pro license.

ID Codec Notes
h264H.264/AVCDefault profiles
hevcH.265/HEVCDefault codec
prores422proxyProRes 422 Proxy
prores422ltProRes 422 LT
prores422ProRes 422
prores422hqProRes 422 HQ
prores4444ProRes 4444
prores4444xqProRes 4444 XQ
gifAnimated GIF15 fps default
dnxhr-lb DNxHR LB Pro
dnxhr-sq DNxHR SQ Pro
dnxhr-hq DNxHR HQ Pro
dnxhr-hqx DNxHR HQX Pro
dnxhr-444 DNxHR 444 Pro
dnxhd-lb DNxHD LB Pro
dnxhd-sq DNxHD SQ Pro
dnxhd-hq DNxHD HQ Pro
dnxhd-hqx DNxHD HQX Pro
dnxhd-444 DNxHD 444 Pro

Containers: H.264/HEVC/ProRes write .mov. Passing a DNx codec via --codec writes .mxf; DNx via a preset follows the preset's container setting (.mov wrapper by default, matching the app).

Exit Codes

Use these codes to handle errors in scripts and CI pipelines.

Code Meaning
0Success
1General error
2Usage error: Pro license required/invalid, or an invalid flag value or combination
3Input file not found
5Encoding failed
10Partial failure (batch: some succeeded, some failed)