- Python 100%
| .gitignore | ||
| dcp_config.example.json | ||
| LICENSE | ||
| main.py | ||
| README.md | ||
dcp
A small command-line tool that automates building a DCP (Digital Cinema Package) from a rendered image sequence and an audio track, using DCP-o-matic as the backend.
It was built for a student film pipeline: point it at the folders where your versioned animatic/render and audio exports live, and it finds the latest version of each, creates a DCP-o-matic project, and (optionally) encodes the final DCP — all in one run.
What it does
- Reads
dcp_config.json. - Finds the latest versioned image-sequence folder and audio file from their root folders
(e.g.
animatic_v007_exr,mix_v003.wav). - Creates a new auto-incremented output version folder (
v001,v002, …). - Calls
dcpomatic2_createto build the project, thendcpomatic2_clito dump and make the DCP.
Requirements
- Windows (paths in the example config are Windows-style)
- DCP-o-matic 2 installed
- Python 3.10+ (uses
match/union type hints)
Setup
# 1. Copy the example config and edit the paths for your machine
copy dcp_config.example.json dcp_config.json
# 2. Edit dcp_config.json:
# - dcpomaticBinPath -> where DCP-o-matic is installed
# - imageSequenceRootPath -> parent folder holding your versioned render folders
# - audioRootPath -> parent folder holding your versioned audio files
# - autogeneratedRootPath -> where output DCP projects should be written
# - projectName -> ### is replaced with the zero-padded version number
# 3. Run
py main.py
Config reference
| Key | Meaning |
|---|---|
dcpomaticBinPath |
Folder containing dcpomatic2_create.exe / dcpomatic2_cli.exe |
autogeneratedRootPath |
Where new vNNN output folders are created |
imageSequenceRootPath / imageSequencePattern |
Where to look for the render, and the glob to match version folders |
audioRootPath / audioPattern / useAudio |
Audio source folder, glob, and whether to include audio |
Note — image vs. audio patterns work differently:
imageSequencePatternmatches a folder (the tool then uses the images inside it), whereasaudioPatternmatches a.wavfile directly. So the image pattern resolves to a directory and the audio pattern resolves to a single file. |projectName/projectFolderName|###is replaced by the version number | |contentType,frameRate,containerRatio,standard,resolution,audioChannels,videoBitRate| DCP-o-matic encoding settings | |useColourspaceFlag/colourspace| Pass an explicit colourspace to DCP-o-matic (default: off) | |createDcp| If false, only creates the project without encoding |
Notes
dcp_config.jsonis git-ignored because it holds machine-specific paths — only the*.example.jsontemplate is committed.