Skip to content

How to use Digital Cinema Tools

wolfgangw edited this page Apr 29, 2012 · 30 revisions

### How to generate a DCP with [cinemaslides](https://github.com/wolfgangw/digital_cinema_tools/wiki/Cinemaslides)

Open a terminal and run

cinemaslides -t dcp -o DCP_TEST --encrypt -x cut,10 --audio-fade 0,4 <path to an image file> <path to another image file> <path to an audio file>

This will build an encrypted digital cinema package:

  • -t dcp (or --type dcp) tells cinemaslides to make a DCP (instead of a preview or fullpreview).

  • -o DCP_TEST (or --dcp-out DCP_TEST) specifies the final output location of the DCP.

  • --encrypt will tell cinemaslides to encrypt all generated trackfiles.

  • -x cut,10 (or --transition-and-timing cut,10) means the transition between 2 adjacent images will be a simple cut and each image will last for 10 seconds. Mind cut,10 which has no spaces between cut and , and 10. The other transition options are fade,<in time>,<hold time>,<out time> (like fade,1,5,1) and crossfade,<cross time>,<hold time> (like crossfade,3.5,5.0)

  • <path to image file> is just generic notation for the path to a file, like images/master/foo.tif

Say cinemaslides --help for all possible options (There are a lot, you don't need each and every one). See cinemaslides' main page for more.

### How to generate a KDM for an encrypted package with [cinemaslides](https://github.com/wolfgangw/digital_cinema_tools/wiki/Cinemaslides)

In a terminal run

cinemaslides --kdm --cpl DCP_TEST/cpl_<long number>_.xml --target $CINEMACERTSTORE/leaf.signed.pem --start 1
  • --kdm tells cinemaslides to generate a KDM.

  • --cpl <path to CPL> tells cinemaslides to find the content keys referenced in this CPL and pack them up in the KDM. As always, use tab completion for long paths or filenames and never actually type in a UUID (Like cpl_ and TAB to complete to the full filename).

  • --target $CINEMACERTSTORE/leaf.signed.pem will tell cinemaslides for whom the KDM is intended (Or more exactly: Encrypt the delivered content keys with the public key in leaf.signed.pem. Only the owner of the related private key will be able to decrypt the content keys delivered by the KDM). This is the option where you will specify the certificate of a digital cinema server (You will not be able to decrypt the keys stored in that KDM). But for demonstration purposes we target this KDM at our own example certificate (leaf.signed.pem, generated by Setup) so we can decrypt it later on and confirm that everything is working ok.

  • --start 1 will set the start of the KDM's validity period to 1 day from now. We use 1 day from now here to ensure that if you run this immediately after installing cinemaslides will not complain about overlapping validity of the KDM signer's certificate and the requested KDM validity (There are extensive checks in place to make sure the generated KDM is valid and will be accepted by servers, Matrjoschka validity periods being crucial here).

### How to validate and inspect a DCP with [dcp_inspect](https://github.com/wolfgangw/backports#readme)

Run

dcp_inspect DCP_TEST

for a full-blown report about the package in DCP_TEST. See Examples for more.

### How to control [dcp_inspect](https://github.com/wolfgangw/backports#readme)'s verbosity

The default verbositiy level of dcp_inspect is quite chatty. If you don't care for lots of UUIDs etc. flashing by use --v info (or --verbosity info). Other options are quiet, errors and debug.

dcp_inspect DCP_TEST -v info

dcp_inspect will return proper exit codes so you can include it in scripted environments like automated testing (How to use dcp_inspect's exit codes). Use -v quiet and check $?.

See Example output from dcp_inspect for more.

### How to use [dcp_inspect](https://github.com/wolfgangw/backports#readme)'s exit codes

Script exit codes are useful when you need to run a tool in conjunction with other tools and control flow based on the results. dcp_inspect will return these exit codes:

  • 0 : No errors in the examined DCP(s)
  • 1 : Errors in the examined DCP(s)
  • 2 : No argument given (Running dcp_inspect without argument)
  • 3 : Too many arguments given (dcp_inspect will accept exactly 1 argument: a directory on your filesystem)
  • 4 : Argument is not a directory

and

  • 5 : XML Catalog not found
  • 6 : XSD Store not found

The latter 2 shouldn't occur but if they do your installation is borked. Rerun digital-cinema-tools-setup to repair.

### How to decrypt a KDM's content

Run

kdm-decrypt.rb <path to KDM file> $CINEMACERTSTORE/leaf.key

where <path to KDM file> would be the path to the KDM generated above. This will of course only work if you targeted the KDM at your own public key certificate ($CINEMACERTSTORE/leaf.signed.pem in this case).

Like always with long paths or filenames: Use tab completion in your terminal to avoid typos (never ever literally type in a UUID, one of those long numbers which will show up in digital cinema filenames): Type k_ and hit TAB to let bash automatically complete to the KDMs (long) filename.

Clone this wiki locally