DEVELOPER DOCUMENTATION

Command line and headless export

Start the player from a script, and export frames or movies without a window, on a render farm or in a pipeline hook.

The program is BernardReview.exe on Windows (C:\Program Files\Bernard Review\bin\) and bernard-review on Linux. The examples below write BernardReview; replace it with the path of your installation.

Start the player

BernardReview <media or .bpl> [<media> ...] [--video <file>] [--frame N] [--ipc-port N]
  • A bare path, or one given with --video, is opened at start-up; several paths are added to the playlist in order. A media file on the command line plays as soon as it is open: that is how a file association or Open with hands a clip to the player.
  • --frame N puts the playhead on position N of the first clip, counted from 0 (as the seek command).
  • --ipc-port N makes the automation port listen on N instead of 5556. Two players on one machine must use two different ports.
  • With options only (--ipc-port), the player starts paused.
  • If one of the user's players is already running, the files are sent to it instead of opening a second player, except with --ipc-port or --export, or when Open files in the running player is unticked in the preferences. A script that must drive its own player therefore starts it with --ipc-port.

To drive the player once it runs, see Python API and IPC.

Export without a window

--export runs an export without opening a window, then exits. It comes in three forms.

Options laid over a preset:

BernardReview --export --preset dailies_prores_lt \
  --source "D:/shots/SQ010_SH010_ANIM_v002.mov" \
  --output "D:/dailies/SQ010_SH010_ANIM_v002.mov" \
  --cc "exposure=0.5" --display-space rec709 \
  --burn-in "tl={clip} {version};bl={frame} {timecode};br={date}"

Several sources, each in its own file thanks to <clip>:

BernardReview --export --preset jpg_review \
  --source A001_C001.R3D --source A001_C002.R3D \
  --output "D:/stills/<clip>/" --resize 1920x0 --chroma 444

A JSON job file, with the same fields as the export command (samples in api/export_examples/):

BernardReview --export job.json

Without --format, the output's extension names the format: dailies.mov, shot.####.dpx. For a sequence, the output is a #### pattern or a folder.

The options

OptionValues
--preset NAMEplates_exr_half_zip, plates_exr_float_piz, dpx_10bit, tiff_16bit_viewer, jpg_review, dailies_prores_lt, dailies_dnxhr_sq, master_prores_hq, master_prores_4444, master_dnxhr_444, client_h264, client_h265, nvfx_review, nvfx_lossless, or a studio preset
--source PATH (repeatable), --output or -oInputs and output; <clip>, <version> and <recipient> in the output
--formatexr, dpx, tiff, jpg, png, nvfx (NOVA), mov, mp4
--codecprores_proxy, prores_lt, prores_422, prores_hq, prores_4444, dnxhr_lb, dnxhr_sq, dnxhr_hq, dnxhr_hqx, dnxhr_444, h264, h265, mjpeg
--chroma, --crf, --bitrate, --quality, --bit-depth, --compressionQuality and compression
--audiopcm, aac, none
--fps, --in, --out, --step, --frame-offset NFrame rate, range (positions from 0), offset of the burnt-in numbers
--start-number, --paddingNumbering of an output sequence
--resize WxH, --proxy-scaleOutput size (0 keeps the aspect), decode resolution
--colorsource (pixels as decoded) or custom (the --cc values)
--cc "key=value,..."exposure, gamma, contrast, brightness, saturation, hue, r, g, b, temp, tint...
--input-space, --display-spaceFor example acescg, srgb, logc4; rec709, p3, rec2020, aces2
--layerPass of a multi-layer EXR
--burn-in ["layout"], --no-burn-inBurn-in: tl, tc, tr, bl, bc, br separated by ;
--watermark, --watermark-text, --watermark-position, --watermark-opacity, --watermark-size, --no-watermarkWatermark (MOV, MP4 and JPEG only)
--recipient NAME, --studio NAMEFill {recipient}, {studio} and <recipient>
--hardware, --no-hardware, --smart-tier, --no-smart-tierDecode on the graphics card; decode at the resolution the output needs
--annotations, --no-annotationsFlatten the drawings (see below)

The --no- options and their positive forms win over what a preset or a job file set.

A recipe

BernardReview --export --recipe evening_dailies.json \
  --source SQ010_SH010_COMP_v003.mov --source SQ010_SH020_COMP_v007.mov \
  --recipient "Client A"

The recipe brings everything else: each output is made for each source, one after the other. It takes only --recipe, --source, --recipient, --studio and --session.

What the script gets back

  • During the export, export: frame N/M lines; at the end, a last JSON line that sums the job up (output, encoder used, and jobs for several sources or a recipe).
  • Exit code: 0 when everything succeeded, 1 for a bad command line or recipe, 2 when an export failed.

Before you build it into a farm

  • A video source is decoded to 8 bits before export; RAW and EXR keep their precision.
  • viewer and clip color mean nothing without a window: they become custom, with the --cc values.
  • Drawings come from the player's playlist: without a window there are none to flatten. To export drawings, run the export from an open player (the export command with annotations, see Python API and IPC).
  • H.264 and H.265 need a hardware or system encoder on the machine (NVENC, Quick Sync, AMF, Media Foundation on Windows; NVENC, VA-API, Quick Sync on Linux). A farm machine without a graphics card will export ProRes or DNxHR.
  • A vector SWF is rendered by Ruffle's exporter, which needs a graphics card; the BERNARD_RUFFLE_EXPORTER variable gives its path on a farm.
  • NOVA: --format nvfx with --compression htj2k or wavelet (lossy, --quality), lossless or raw, and --bit-depth 16 or 32.
  • The watermark refuses plate formats (EXR, DPX, TIFF, PNG) and NOVA. The recipient appears neither in the summary nor in the log: the summary and the log write <recipient> in its place.

Going further: the complete manual, parts 8.6 to 8.8 and 11 (Help > User Guide in the player).