2013-11-04

Which size for DCP subtitles?

A question about the "best" size of DCP subtitles piqued my curiosity. Since I have access to a sample of DCP folders from a distributor, it was easy to do some statistics and find out what others felt was the right size for subtitles.

Executive summary: the answer is 42, which seems perfectly appropriate since it also happens to be "the answer to life, the universe and everything". (If you didn't know, you may be interested to see that Google's calculator does, and gives you the correct answer when asked this essential question).

 

All the DCP's I had access to used the CineCanvas (or Interop) standard for subtitles, which is described in the "Subtitle Specification for DLP Cinema" published by Texas Instruments. The document doesn't give an "official" size recommendation for subtitles, but it does provide a default size if the file doesn't specify it. The default is 42.

It also explains what the number 42 is supposed to mean (in the context of subtitles, not in that other more profound meaning):

"Size is given in points. Fonts are rendered as if the screen height is 11 inches, so a 72pt font would be 1/11 screen height.
Default Size = 42"

And that also seems to be the preferred size for the 124 feature length movies in my sample:


Font Size Number of DCPs
36 1
37 2
38 7
39 21
40 10
41 3
42 68
44 6
45 3
46 1
47 1
48 1
Total 124

 

That disk also had 40 trailers with subtitles. For these, the preferred font size seems to be smaller at 39:

Font Size Number of DCPs
39 31
40 1
41 1
42 6
44 1
Total 40
 

Points and pixels

There are 72 points per inch, so the screen height is 11 * 72 = 792 points.
In 2K, the DCP sizes are:
  • 2048 x 1080 pixels for full frame
  • 1998 x 1080 pixels for 1.85
  • 2048 x  858 pixels for Cinemascope (2.39)
(In 4K, the sizes would be 4096x2160, 3996x2160 and 4096x1716 pixels)
So in full or 1.85:
  • 792 points = 1080 pixels
  • 1 point = 1.3636... pixels
  • 1 pixel = 0.7333... points
  • 42 points = 57.3 pixels
In Belle-Nuit Subtitler, the subtitle size appears to be set in pixels, which it then converts to points when exporting to "DLP Cinema".
I'm not sure about Cinemascope. Would 42 points be rendered as 45.5 pixels (42x858/792) ? Or still as 57 pixels ? Or would it depend on the projector ?
 

Labels: , , ,

2011-07-05

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>
       <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>
    
  • Edit the PKL file (the file named "....PKL.xml" which starts with "<PackingList>"). The subtitle Asset section looks like this:
    <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 -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: , ,