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: , ,


Blogger zoki said...

Dali si ovo ve' probao na nekom serveru i da li radi?

Kupujemo easy DCP pa bi smo hteli da neke doma'e filmove koji dolaze u bioskope titlujemo na neki od stranih jezika...

Unapred ti hvala na odgovoru.

21 October, 2011 22:36  
Anonymous Martin said...


I've created dc package. EasyDCP loaded content without complain, and showed video,audio and subtitles.xml.
But there was no subtitles during playback. Could you possibly post, or send your example cpl,pkl,assetmap and subtitle xml to chcek/compare?


18 January, 2012 12:50  
Anonymous Anonymous said...

so easy dcp creator cost alot of money, but it is not able to create SMPTE dcp´s with subtitles in 25fps,
so u dont need those software.

the best way to make a fine working dcp with subtitles is here, u can read, what u have to do.

i have tested on a doremie dcp2000

Kind regards

31 May, 2012 23:56  
Anonymous PM! said...

That's probably a stupid question (because i can't find a straight answer on the web) :
How do you calculate the of a cpl or mxf in terminal ?
I tried with the command du but i can't find the wight options.


12 September, 2012 19:28  
Blogger Milivoj said...

PM, I suppose you want the exact size in bytes? In Terminal, the command "ls -l /path/to/your_file" will give you that. In Linux, "du -b your_file" also gives sizes in bytes. I think the Mac version of du would also accept the -b option, but I can't check right now.

13 September, 2012 11:49  
Anonymous Xavier Gomez said...

Thank you very much for your post.
You know any system to be able to copy the movie in QT format to make the subtitles.

19 June, 2013 08:02  
Blogger etblog1 said...

this worflow only works for 2K 24p interOP DCPs, the old standard that has to be delivered on a linux hard drive.

SMPTE subtitles, the new standard that also supports other framerates, frame sizes and hard disk formats, are not really compatible on cinema servers and are not trivial to make.

burnt-in subtitles are therefor the only way to deliver a non-interOP DCP, that is not 24p, 2K, 1:85:1 and on an ext2 drive.

the website mentioned (http://www.michaelcinquin.com/tools/DCP) only works for interOP even though it says it works for SMPTE, but compatibility is very low!

if anyone has more questions about doing DCPs, drop me a line.

05 November, 2013 10:40  
Blogger Milivoj said...

@etblog1: Yes, this is for Interop subtitles. And as you say, SMPTE subtitles with 25p are still risky (don't work on some machines), so everybody seems to burn them in for 25p. In the stats I did recently, all DCPs but one used Interop subtitles, even when they used the SMPTE namespace in the other .xml files. As for the drive format, the standard is indeed ext2 or ext3. But apparently many people can't be bothered to format them in Linux and deliver on NTFS instead, which doesn't seem to a problem. All servers appear to be able to read NTFS.
Of course, the fact that you cannot read the SMPTE "standard" without paying for it doesn't help it's adoption.

07 November, 2013 08:57  

Post a Comment

Links to this post:

Create a Link

<< Home