Adding subtitles to a DCP

There are several extremely expensive tools to do this sort of stuff, and there is an open source one (OpenDCP) which could certainly also do it. But it can also be done "by hand" quite easily.

The subtitle XML file can be exported from Belle-Nuit Subtitler (it is called "DLP Cinema" in the export menu). Since it is just an xml text file, it can also be produced in any text editor, or converted from another format with a few regular expressions. Examples of the format are easy to find on the net.

I had a non-encrypted DCP of a trailer, and the subtitles xml exported from Belle-Nuit. After many tries I finally ended up with a DCP folder which EasyDCP Player+ plays without complaining. (Well, the demo version plays the 15 first seconds in psychedelic XYZ colors. If you have a few thousand Euros lying around you can get the full version).

  • Open the subtitle.xml file, and copy the UUID from the SubtitleID tag near the top.
  • If needed, also adjust the MovieTitle, ReelNumber and Language.
  • Take note of the exact size of the file in bytes.
  • Edit the CPL file (the .xml file which starts with "<CompositionPlaylist>") to add the subtitle section. It goes into the AssetList, next to MainPicture and MainSound. Use the UUID you copied from the subtitle.xml, and set the right durations and language. In the end, it looks similar to this:
  • <MainSubtitle>
       <EditRate>24 1</EditRate>
  • Edit the PKL file (the file named "....PKL.xml" which starts with "<PackingList>"). The subtitle Asset section looks like this:
    The hash value is a SHA1 hash of the file, Base64 encoded. It can be produced with this command in Linux or Mac:
    openssl sha1 -binary "Your_Subtitle_File.xml" | openssl base64 -e
    On Windows, if you have Perl, you can get the hash with
    perl -M"Digest::SHA1 qw(sha1_base64)" -e "open(F,shift) or die; binmode F; print sha1_base64(<F>), qq(=\n)" "Your_Subtitle_File.xml"
    Maybe you can also just leave the hash out. It appears to work in EasyDCP.
  • If your PKL is signed, remove all the signature and certificates stuff. (If someone knows how it could be re-signed with a new certificate, please let us know; xmlsign can probably produce the right output if we know which options to use; I didn't investigate this)
  • Finally, edit the ASSETMAP file to add the subtitle file and correct the sizes of the CPL and PKL files.

Open questions:

  • Do Cinema servers accept unsigned DCPs?
  • How compatible is the result with the various server models and versions? There must be a reason why the subtitles are often burned in instead of being in a separate XML.

Labels: , ,