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
andLanguage
. - 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 toMainPicture
andMainSound
. 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> <Id>urn:uuid:CBEB439E-AA36-4B87-975D-2776A268A9AF</Id> <EditRate>24 1</EditRate> <IntrinsicDuration>3167</IntrinsicDuration> <EntryPoint>0</EntryPoint> <Duration>2927</Duration> <Language>de</Language> </MainSubtitle>
<Asset> <Id>urn:uuid:CBEB439E-AA36-4B87-975D-2776A268A9AF</Id> <Hash>7jzdoZCDXGet6tPWSv2htztPlw4=</Hash> <Size>12161</Size> <Type>text/xml;asdcpKind=Subtitle</Type> <OriginalFileName>melancholia-trailer-dcp-stfr.xml</OriginalFileName> </Asset>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 -eOn 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.
xmlsign
can probably produce the right output if we know which options to use; I didn't investigate this)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: dcp, digital cinema, subtitles