Skip to content

Latest commit

 

History

History
105 lines (77 loc) · 3.5 KB

File metadata and controls

105 lines (77 loc) · 3.5 KB

CLI reference: imf-panscan

The CLI lives in apps/cli and shares the core engine with the Electron authoring app. After npm run build, invoke as:

node apps/cli/dist/index.js <command> [...args]

Or, after npm link from apps/cli, simply imf-panscan <command>.

Commands

init — create initial metadata from a source + cut list

imf-panscan init \
  --source <path-to-VIDEO.mxf> \
  --out <panscan.json> \
  [--edl <cuts.edl> | --xml <sequence.xml>] \
  [--target 1920x1080] \
  [--aspect 16:9] \
  [--verbose]
  • Probes the source MXF with ffprobe for raster + edit rate.
  • Runs cropdetect to find the active picture area inside the stored raster.
  • Imports cut points from EDL or Resolve FCP XML (auto-detected by extension/content).
  • Generates default center-framed crop windows for every shot.
  • Writes a JSON file ready to load in the Electron app.

If no --edl/--xml is supplied, init creates one open-ended shot and prints a warning. Set the shot's endFrame before rendering.

validate — check a metadata file

imf-panscan validate <panscan.json> [--json]

Returns exit code 0 if all error-severity checks pass, 1 otherwise. --json emits a structured result for tooling. Issue codes are documented in examples/reports/validation-example.md.

inspect — print a human-readable summary

imf-panscan inspect <panscan.json>

Shows source/target/active-area info plus a per-shot table with frame ranges, durations, and crop coordinates.

render — produce an HD output via FFmpeg

imf-panscan render <panscan.json> \
  --source <input.mxf> \
  --out <output.mov> \
  [--preset prores-hq | prores-422 | h264-review] \
  [--audio] \
  [--dry-run] \
  [--skip-validate]
  • Validates the metadata first (unless --skip-validate); refuses to render on errors.
  • Generates a single ffmpeg filter_complex of per-shot trim → crop → scale chains, concatenated to one output stream.
  • --audio passes audio through from the IMF's audio essence into the output container. Default is video-only.
  • --dry-run prints the ffmpeg command without executing.

Built-in presets (defined in packages/ffmpeg-renderer/src/presets.ts):

Preset Codec Pixel format Container
prores-hq ProRes 422 HQ (-profile:v 3) yuv422p10le MOV
prores-422 ProRes 422 (-profile:v 2) yuv422p10le MOV
h264-review H.264 (libx264, CRF 18, medium) yuv420p MP4

export-xml — serialize metadata as XML

imf-panscan export-xml <panscan.json> [--out <panscan.xml>]

Produces a provisional SMPTE-style XML representation parallel to the JSON. Without --out, prints to stdout.

Example: end-to-end against an IMF

# 1. Generate initial metadata from a 2.39 UHD IMF + Resolve XML
imf-panscan init \
  --source /Volumes/.../ANARCHIST_.../VIDEO_*.mxf \
  --xml /Volumes/.../sequence.xml \
  --out /Volumes/.../ANARCHIST_.../panscan.json

# 2. (Open in Electron app, author per-shot framing, auto-save.)

# 3. Validate
imf-panscan validate /Volumes/.../ANARCHIST_.../panscan.json

# 4. Render a 1080 ProRes 422 HQ proof
imf-panscan render /Volumes/.../ANARCHIST_.../panscan.json \
  --source /Volumes/.../ANARCHIST_.../VIDEO_*.mxf \
  --out ./ANARCHIST_HD_panscan.mov \
  --preset prores-hq

# 5. Export the XML form for the standards proposal
imf-panscan export-xml /Volumes/.../ANARCHIST_.../panscan.json \
  --out ./ANARCHIST_panscan.xml