DCP-o-matic includes some tools which allow DCP creation and manipulation from the command line or from scripting languages. This chapter covers the use of those tools.
There are four command-line tools in DCP-o-matic.
dcpomatic2_create creates film directories, with the
associated metadata, from a list of content files.
dcpomatic2_cli runs the transcode process on film directories.
dcpomatic2_kdm_cli can be used to create KDMs.
dcpomatic2_map can collect CPLs and assets from existing DCPs
and make a new DCP.
Some applications will benefit from setting up the films using the
main DCP-o-matic GUI and then using dcpomatic2_cli to
do the encode. This allows, for example, setup on a relatively
low-powered machine before running the encode on a higher-powered
headless server.
The syntax for dcpomatic2_create is:
dcpomatic2_create [OPTION] <CONTENT> [[OPTION] <CONTENT> ...]
[CONTENT] are the files or folders that you want to use in the
DCP. They can be:
.srt, DCP XML, .ssa etc.)
The options are:
-v, --version — show DCP-o-matic version-h, --help — show this help-n, --name <name> — film name-t, --template <name> — template name--no-encrypt — make an unencrypted DCP-e, --encrypt — make an encrypted DCP-c, --dcp-content-type <type> — FTR, SHR, TLR, TST, XSN, RTG, TSR, POL, PSA or ADV-f, --dcp-frame-rate <rate> — set DCP video frame rate (otherwise guessed from content)--container-ratio <ratio> — 119, 133, 137, 138, 166, 178, 185 or 239-s, --still-length <n> — number of seconds that still content should last--auto-crop-threshold <n> — threshold to use for 'black' when auto-cropping--standard <standard> — SMPTE or interop (default SMPTE)--no-use-isdcf-name — do not use an ISDCF name; use the specified name unmodified--config <dir> — directory containing config.xml and cinemas.sqlite3--twok — make a 2K DCP instead of choosing a resolution based on the content--fourk — make a 4K DCP instead of choosing a resolution based on the content-a, --audio-channels <n> — specify the number of audio channels in the DCP-o, --output <dir> — output directory--twod — make a 2D DCP--threed — make a 3D DCP--video-bit-rate <Mbit/s> — J2K bandwidth in Mbit/s--left-eye — next piece of content is for the left eye--right-eye — next piece of content is for the right eye--auto-crop — next piece of content should be auto-cropped--colourspace — next piece of content is in the given colourspace: srgb, rec601, rec709, p3, rec1886, rec2020, sgamut3--colorspace — same as --colourspace--channel <channel> — next piece of content should be mapped to audio channel L, R, C, Lfe, Ls, Rs, BsL, BsR, HI, VI--gain — next piece of content should have the given audio gain (in dB)--fade-in <seconds> — next piece of content should have the given fade-in (in seconds)--fade-out <seconds> — next piece of content should have the given fade-out (in seconds)--cpl <id> — CPL ID to use from the next piece of content (which is a DCP)--kdm <file> — KDM for next piece of content
For example, to setup a film using a MP4 file you might do:
dcpomatic2_create -o my_film --container-ratio 185 --content-ratio 185 -c FTR -n "My Film" Stuff.mp4
This will create a folder called my_film which is ready for a DCP to be made by dcpomatic2_cli.
dcpomatic2_create will use any default settings that you have configured in the main DCP-o-matic preferences.