# go-dcp Library to parse Digital Cinema Packages folders and Content Titles ### TODO: * Adjust Matroska REPLAYGAIN_GAIN and REPLAYGAIN_PEAK to bring 85 dBc to 89 according to: `Cinemas are calibrated to the SMPTE RP 200:2012 standard where a -20 dB RMS pink noise signal is measured to 85 dBc and the reference fader level is set to 0.` ### DCP Samples * [Tears of Steel 4K DCP](https://download.blender.org/demo/movies/ToS/ToS_4k_DCP.zip) * [GKID Press Room](https://gkids.com/press/) contains some DCP movie trailers (and full-length ones sometimes) * Create your own with [DCP-o-MATIC](https://dcpomatic.com/) or [OpenDCP](https://www.opendcp.org/) ### Compilation ```shell GOROOT=~/go/go1.22.4 ./build-tools.sh ``` ## dcp tool This tool can be used to view information, verify or split DCPs. `-dcp` parameter can be either a DCP folder or an ASSETMAP path. Supports HTTP(s) URLs. ### info Outputs DCP information in Markdown ```shell ./bin/dcp -mode info \ -dcp /path/to/dcp/tos_version_05/ ``` ### verify Verifies DCP SHA1 hashes, media files and outputs the information in Markdown ```shell ./bin/dcp -mode verify \ -dcp /path/to/dcp/tos_version_05/ ``` ### split Splits multi packing lists DCPs into single DCP into its own folder and soft-links files where possible. ```shell ./bin/dcp -mode split \ -output /path/to/split/output/ \ -dcp /path/to/dcp/tos_version_05/ ``` ## concat tool This tool can be used to merge a DCP into a single playable output via ffmpeg. SMPTE Subtitles not currently supported. See help for additional parameters to provide a custom CPL, select a specific packing list or drop specific reel ids. `-dcp` parameter can be either a DCP folder or an ASSETMAP path. Supports HTTP(s) URLs. ```shell ./bin/concat \ -audio-channel-mapping auto \ -flac \ -out /path/to/output.mkv \ -dcp /path/to/dcp/tos_version_05/ ``` ## playback tool This tool can be used to playback a DCP via [xyz2yuv](https://git.gammaspectra.live/WeebDataHoarder/xyz2yuv) and [mpv](https://mpv.io/). mpv will receive Rec. 2020 10-bit 4:4:4 decoded video, and original audio from DCP. Supports converting IOP subtitles to ASS. See help for additional parameters to provide a custom CPL, select a specific packing list or drop specific reel ids. `-dcp` parameter can be either a DCP folder or an ASSETMAP path. Supports HTTP(s) URLs. ```shell ./bin/playback \ -audio-channel-mapping auto \ -xyz2yuv /path/to/bin/xyz2yuv \ -mpv /path/to/bin/mpv \ -dcp /path/to/dcp/tos_version_05/ ```