Manual URL fixes.
[dcpomatic.git] / doc / manual / dcpomatic.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE book [
3 <!ENTITY % sgml.features "IGNORE">
4 <!ENTITY % xml.features "INCLUDE">
5 <!ENTITY % dbcent PUBLIC "-//OASIS//ENTITIES DocBook Character Entities V4.5//EN"
6    "/usr/share/xml/docbook/schema/dtd/4.5/dbcentx.mod">
7 %dbcent;
8 <!ENTITY % extensions SYSTEM "extensions.ent">
9 %extensions;
10 ]>
11 <book xmlns="http://docbook.org/ns/docbook" xmlns:mml="http://www.w3.org/1998/Math/MathML" version="5.0" xml:lang="en">
12
13 <bookinfo>
14 <title>DCP-o-matic users' manual</title>
15 <author><firstname>Carl</firstname><surname>Hetherington</surname></author>
16 </bookinfo>
17
18 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
19 <title>Introduction</title>
20
21 <para>
22 Hello, and welcome to DCP-o-matic!
23 </para>
24
25 <!-- ============================================================== -->
26 <section>
27 <title>What is DCP-o-matic?</title>
28
29 <para>DCP-o-matic is a set of programs to perform the following tasks:</para>
30
31 <itemizedlist>
32   <listitem>Creation of <ulink
33   url="http://en.wikipedia.org/wiki/Digital_Cinema_Package">Digital
34   Cinema Packages</ulink> (DCPs) from video, audio and/or
35   subtitle files.</listitem>
36   <listitem>Playback of DCPs on a PC.</listitem>
37   <listitem>Creation of KDMs for DCPs.</listitem>
38 </itemizedlist>
39
40 </section>
41
42
43 <!-- ============================================================== -->
44 <section>
45 <title>Licence</title>
46
47 <para>
48 DCP-o-matic is free and open-source and is licensed under the <ulink
49 url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU
50 GPL</ulink>.
51 </para>
52
53 </section>
54
55
56 <!-- ============================================================== -->
57 <section>
58 <title>Acknowledgements</title>
59
60 <para>
61 This manual uses icons from the <ulink url="http://tango.freedesktop.org/">Tango Desktop Project</ulink>, with thanks.
62 </para>
63
64 </section>
65
66 <!-- ============================================================== -->
67 <section>
68 <title>This manual</title>
69
70 <para>
71 This manual presents bits of DCP-o-matic's user interface (such as menu items or buttons) <guilabel>like this</guilabel>.
72 </para>
73
74 <note>
75 Notes of an advanced nature are presented like this.  Ignore them unless you want to know the gory details.
76 </note>
77
78 </section>
79 </chapter>
80
81
82 <!-- ============================================================== -->
83 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
84 <title>Installation</title>
85
86
87 <!-- ============================================================== -->
88 <section>
89 <title>Windows</title>
90
91 <para>
92 To install DCP-o-matic on Windows, download the installer from
93 <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
94 and double-click it.  Click through the installer wizard, and
95 DCP-o-matic will be installed onto your machine.
96 </para>
97
98 <para>
99 If you are using a 32-bit version of Windows, you will need the 32-bit
100 installer.  For 64-bit Windows, either installer will work, but I
101 suggest you used the 64-bit version as it will allow DCP-o-matic to
102 use more memory.  You may find that DCP-o-matic crashes if you run
103 many parallel encoding threads (more than 4) on the 32-bit
104 version.
105 </para>
106
107 <para>
108 If you are still using Windows XP, download the specific XP version as
109 it should be more stable on your machine than the &lsquo;normal&rsquo;
110 Windows version.
111 </para>
112
113 </section>
114
115
116 <!-- ============================================================== -->
117 <section>
118 <title>Mac OS X</title>
119
120 <para>
121 DCP-o-matic will run on Mac OS X version 10.6 (Snow Leopard) and
122 higher.  DCP-o-matic is split into four separate applications, each of
123 which can be installed by downloading the <code>.dmg</code>,
124 double-clicking to open and then dragging the icon to your
125 <guilabel>Applications</guilabel> folder.
126 </para>
127
128 <para>
129 If you are not sure which parts of DCP-o-matic to install, start
130 with the first (main) part.
131 </para>
132
133 </section>
134
135 <!-- ============================================================== -->
136 <section>
137 <title>Debian, Ubuntu or Mint Linux</title>
138
139 <para>
140   You can install DCP-o-matic on:
141 </para>
142
143 <itemizedlist>
144   <listitem>Debian 7 (&lsquo;wheezy&rsquo;)</listitem>
145   <listitem>Debian 8 (&lsquo;jessie&rsquo;)</listitem>
146   <listitem>Debian 9 (&lsquo;squeeze&rsquo;)</listitem>
147   <listitem>Debian unstable (&lsquo;sid&rsquo;)</listitem>
148   <listitem>Ubuntu 14.04 (&lsquo;Trusty Tahr&rsquo;)</listitem>
149   <listitem>Ubuntu 16.04 (&lsquo;Xenial Xerus&rsquo;)</listitem>
150   <listitem>Ubuntu 18.04 (&lsquo;Bionic Beaver&rsquo;)</listitem>
151   <listitem>Mint 17</listitem>
152   <listitem>Mint 18</listitem>
153   <listitem>Mint 19</listitem>
154 </itemizedlist>
155
156 <para>
157 using <code>.deb</code> packages: download the appropriate package
158 from <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
159 and double-click it.  Debian or Ubuntu will install the necessary bits and
160 pieces and set DCP-o-matic up for you.
161 </para>
162 </section>
163 <!-- ============================================================== -->
164
165
166 <!-- ============================================================== -->
167 <section>
168   <title>Fedora, Centos and Mageia Linux</title>
169
170   <para>There are <code>.rpm</code> packages for Fedora 27 and 28, Centos 6 and 7 and Mageia 6 on
171   <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
172   </para>
173 </section>
174 <!-- ============================================================== -->
175
176 <!-- ============================================================== -->
177 <section>
178 <title>Arch Linux</title>
179 <para>
180 Packages for Arch Linux are available from <ulink
181 url="https://aur.archlinux.org/packages/dcpomatic/">https://aur.archlinux.org/packages/dcpomatic/</ulink>,
182 thanks to Stefan Karner.
183 </para>
184 </section>
185
186
187 <!-- ============================================================== -->
188 <section>
189 <title>Other Linux distributions</title>
190
191 <para>
192 Installation on other Linux systems (for which no packages are
193 available) is quite hard as it must be compiled from source.  If you
194 can't download packages for your distribution, do let me know by
195 <ulink url="mailto:carl@dcpomatic.com">email</ulink> and I will look
196 into providing packages on the website.
197 </para>
198
199 <para>
200 The following dependencies are required:
201 <itemizedlist>
202 <listitem><ulink url="http://ffmpeg.org/">FFmpeg</ulink></listitem>
203 <listitem><ulink url="http://www.mega-nerd.com/libsndfile/">libsndfile</ulink></listitem>
204 <listitem><ulink url="http://www.mega-nerd.com/SRC/">libsamplerate</ulink></listitem>
205 <listitem><ulink url="http://www.openssl.org/">OpenSSL</ulink></listitem>
206 <listitem><ulink url="http://www.openjpeg.org/">libopenjpeg</ulink></listitem>
207 <listitem><ulink url="http://www.imagemagick.org/script/index.php">ImageMagick</ulink></listitem>
208 <listitem><ulink url="http://www.boost.org/">Boost</ulink></listitem>
209 <listitem><ulink url="http://www.libssh.org/">libssh</ulink></listitem>
210 <listitem><ulink url="http://www.gtk.org/">GTK (on Linux)</ulink></listitem>
211 <listitem><ulink url="http://www.wxwidgets.org/">wxWidgets</ulink></listitem>
212 <listitem><ulink url="http://libxmlplusplus.sourceforge.net/">libxml++</ulink></listitem>
213 <listitem><ulink url="http://www.aleksey.com/xmlsec/">xmlsec</ulink></listitem>
214 <listitem><ulink url="http://curl.haxx.se/">curl</ulink></listitem>
215 <listitem><ulink url="http://www.nih.at/libzip/">libzip</ulink></listitem>
216 <listitem><ulink url="http://carlh.net/asdcplib">asdcplib with some patches</ulink></listitem>
217 <listitem><ulink url="http://carlh.net/libdcp">libdcp</ulink></listitem>
218 <listitem><ulink url="http://carlh.net/libsub">libsub</ulink></listitem>
219 <listitem><ulink url="http://carlh.net/libcxml">libcxml</ulink></listitem>
220 <listitem><ulink url="https://carlh.net/locked_sstream">locked_sstream</ulink></listitem>
221 <listitem><ulink url="https://www.music.mcgill.ca/~gary/rtaudio/">rtaudio</ulink></listitem>
222 <listitem><ulink url="http://site.icu-project.org">libicu</ulink></listitem>
223 </itemizedlist>
224 </para>
225
226 <para>
227 Once you have installed the development packages for the dependencies,
228 download the source code from <ulink
229 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>,
230 unpack it and run the following commands from inside the source
231 directory:
232 </para>
233
234 <programlisting>
235 ./waf configure
236 ./waf build
237 sudo ./waf install
238 </programlisting>
239
240 <para>
241 With any luck, this will build and install DCP-o-matic on your system.  To run it, enter:
242 </para>
243
244 <programlisting>
245 dcpomatic2
246 </programlisting>
247
248 <para>
249 in a shell.
250 </para>
251
252 </section>
253 </chapter>
254
255
256 <!-- ============================================================== -->
257 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
258 <title>Creating a DCP from a video</title>
259
260 <para>
261 In this chapter we will see how to create a DCP from a video file using
262 DCP-o-matic.  We will gloss over the details and look at the basics.
263 </para>
264
265 <section>
266 <title>Creating a new film</title>
267
268 <para>
269 Let's make a very simple DCP to see how DCP-o-matic works.  First, we
270 need some content.  Download the low-resolution trailer for the open
271 movie <ulink url="http://sintel.org/">Sintel</ulink> from <ulink
272 url="https://download.blender.org/durian/trailer/Sintel_Trailer.480p.DivX_Plus_HD.mkv">their
273 website</ulink>.  Generally one would want to use the
274 highest-resolution material available, but for this test we will use
275 the low-resolution version to save everyone's bandwidth bills.
276 </para>
277
278 <para>
279 Now, start DCP-o-matic and its window will open.  First, we will
280 create a new &lsquo;film&rsquo;.  A &lsquo;film&rsquo; is how DCP-o-matic refers to
281 some pieces of content, along with some settings, which we will make into
282 a DCP.  DCP-o-matic stores its data in a folder on your disk while it
283 creates the DCP.  You can create a new film by selecting
284 <guilabel>New</guilabel> from the <guilabel>File</guilabel> menu, as
285 shown in <xref linkend="fig-file-new"/>.
286 </para>
287
288 <figure id="fig-file-new">
289   <title>Creating a new film</title>
290   <mediaobject>
291     <imageobject>
292       <imagedata fileref="screenshots/file-new&scs;"/>
293     </imageobject>
294   </mediaobject>
295 </figure>
296
297 <para>
298 This will open a dialogue box for the new film, as shown in <xref
299 linkend="fig-video-new-film"/>.
300 </para>
301
302 <figure id="fig-video-new-film">
303   <title>Dialogue box for creating a new film</title>
304   <mediaobject>
305     <imageobject>
306       <imagedata fileref="screenshots/video-new-film&scs;"/>
307     </imageobject>
308   </mediaobject>
309 </figure>
310
311 <para>
312 In this dialogue box you can choose a name for the film.  This will be
313 used to name the folder to store its data in, and also as the initial
314 name for the DCP itself.  You can also choose whereabouts you want to create
315 the film.  In the example from the figure, DCP-o-matic will create a
316 folder called &lsquo;DCP Test&rsquo; inside my home folder (carl) into which it
317 will write its working files.
318 </para>
319
320 </section>
321
322
323 <!-- ============================================================== -->
324 <section>
325 <title>Adding content</title>
326
327 <para>
328 The next step is to add the content that you want to use.  DCP-o-matic
329 can make DCPs from multiple pieces of content, but in this simple
330 example we will just use a single piece.  Click the <guilabel>Add
331 file(s)...</guilabel> button, as shown in <xref
332 linkend="fig-add-file"/>, and a file chooser will open for you to
333 select the content file to use, as shown in <xref
334 linkend="fig-video-select-content-file"/>.
335 </para>
336
337 <figure id="fig-add-file">
338   <title>Adding content files</title>
339   <mediaobject>
340     <imageobject>
341       <imagedata fileref="screenshots/add-file&scs;"/>
342     </imageobject>
343   </mediaobject>
344 </figure>
345
346 <figure id="fig-video-select-content-file">
347   <title>Selecting a video content file</title>
348   <mediaobject>
349     <imageobject>
350       <imagedata fileref="screenshots/video-select-content-file&scs;"/>
351     </imageobject>
352   </mediaobject>
353 </figure>
354
355 <para>
356 Select your content file and click <guilabel>Open</guilabel>.  In this
357 case we are using the Sintel trailer that we downloaded earlier.
358 </para>
359
360 <para>
361 When you do this, DCP-o-matic will take a look at your file.  After a
362 short while (when the progress bar at the bottom right of the window
363 has finished), you can look through your content using the slider to
364 the right of the window, as shown in <xref linkend="fig-examine-content"/>.
365 </para>
366
367 <figure id="fig-examine-content">
368   <title>Examining the content</title>
369   <mediaobject>
370     <imageobject>
371       <imagedata fileref="screenshots/examine-content&scs;"/>
372     </imageobject>
373   </mediaobject>
374 </figure>
375
376 <para>
377 Dragging the slider will move through your video.  You can also click
378 the <guilabel>Play</guilabel> button to play the content back.
379 </para>
380
381 </section>
382
383
384
385
386 <!-- ============================================================== -->
387 <section>
388 <title>Making the DCP</title>
389
390 <para>In most cases, some adjustments would be made to DCP-o-matic's
391 settings once the content has been added.  For our simple test,
392 however, the default values will suffice, so we can go straight onto
393 making the DCP.</para>
394
395 <para>
396 Choose <guilabel>Make DCP</guilabel> from the
397 <guilabel>Jobs</guilabel> menu.  DCP-o-matic will encode your DCP.
398 This may take some time (many hours in some cases).  While the job is
399 in progress, DCP-o-matic will update you on how it is getting on with
400 the progress bar in the bottom of its window, as shown in <xref
401 linkend="fig-making-dcp"/>.
402 </para>
403
404 <figure id="fig-making-dcp">
405   <title>Making the DCP</title>
406   <mediaobject>
407     <imageobject>
408       <imagedata scale="50" fileref="screenshots/making-dcp&scs;"/>
409     </imageobject>
410   </mediaobject>
411 </figure>
412
413 <para>
414 When it has finished, the DCP will end up on your disk inside the
415 film's folder.  You can then copy this to a projector via a USB
416 stick, hard-drive or network connection.  See <xref
417 linkend="ch-files"/> for details about the files that DCP-o-matic creates.
418 </para>
419
420 <para>
421 Alternatively, if you have a projector or Theatre Management System
422 (TMS) that is accessible via SCP or FTP across your network, you can upload
423 the content directly from DCP-o-matic.  See the <xref
424 linkend="sec-prefs-tms" endterm="sec-prefs-tms-short"/> in <xref linkend="sec-prefs-tms"/>.
425 </para>
426
427 </section>
428 </chapter>
429
430
431 <!-- ============================================================== -->
432 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
433 <title>Creating a DCP from a still image</title>
434
435 <para>
436 DCP-o-matic can also be used to create DCPs of one or more still images, perhaps
437 for an advertisement or an on-screen announcement.  This chapter shows you
438 how to do it.
439 </para>
440
441 <para>
442 As with DCPs made from video files, the first step is to create a new
443 &lsquo;Film&rsquo;; select <guilabel>New</guilabel> from the
444 <guilabel>File</guilabel> menu and the new film dialogue will open as
445 shown in <xref linkend="fig-still-new-film"/>.
446 </para>
447
448 <figure id="fig-still-new-film">
449   <title>Dialogue box for creating a new film</title>
450   <mediaobject>
451     <imageobject>
452       <imagedata fileref="screenshots/still-new-film&scs;"/>
453     </imageobject>
454   </mediaobject>
455 </figure>
456
457 <para>
458 Enter a name and click <guilabel>OK</guilabel>.  Now we need to add
459 the content.  As before, click <guilabel>Add file(s)...</guilabel>.
460 For our example, we will add a single image file, as shown in <xref
461 linkend="fig-still-select-content-file"/>.
462 </para>
463
464 <figure id="fig-still-select-content-file">
465   <title>Selecting a still content file</title>
466   <mediaobject>
467     <imageobject>
468       <imagedata fileref="screenshots/still-select-content-file&scs;"/>
469     </imageobject>
470   </mediaobject>
471 </figure>
472
473 <para>
474 Most of the default settings will be fine for a simple test.  The one
475 thing that you might wish to change is the length of the still.
476 Select the <guilabel>Timing</guilabel> tab and you will see a
477 <guilabel>Play length</guilabel> setting, as shown in <xref
478 linkend="fig-timing-tab"/>.
479 </para>
480
481 <figure id="fig-timing-tab">
482   <title>The timing tab</title>
483   <mediaobject>
484     <imageobject>
485       <imagedata fileref="screenshots/timing-tab&scs;"/>
486     </imageobject>
487   </mediaobject>
488 </figure>
489
490 <para>
491 This length is a &lsquo;timecode&rsquo;: it consists of four numbers.
492 The first is hours, the second minutes, the third seconds, and the
493 fourth frames.  Enter the duration that you want and then click <guilabel>Set</guilabel>.
494 </para>
495
496 <para>
497 Finally, as with video, you can choose <guilabel>Make DCP</guilabel>
498 from the <guilabel>Jobs</guilabel> menu to create your DCP.  This will
499 be much quicker than creating a DCP from a video file, as DCP-o-matic only needs
500 to encode a single frame which it can then repeat.
501 </para>
502
503 </chapter>
504
505
506 <!-- ============================================================== -->
507 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
508 <title>Manipulating existing DCPs</title>
509
510 <para>
511 Frequently DCP-o-matic is used to take content in formats such as MP4
512 and convert it to JPEG2000 for a DCP.  It can also be used
513 to take existing DCPs and modify them in various ways.
514 </para>
515
516 <section>
517 <title>Importing a DCP into DCP-o-matic</title>
518
519 <para>
520 If you want to do something to an existing DCP the first step is to
521 import it.  Click <guilabel>Add DCP...</guilabel> and select your
522 DCP's folder.  It will be added to the DCP-o-matic project.  If the
523 DCP is unencrypted you can preview it in the normal way, though
524 playback will be very slow as decoding of DCPs is almost as
525 computationally intensive as encoding them.
526 </para>
527
528 <para>
529 If your DCP is a Version File (VF) (i.e. it refers to
530 another DCP's assets) you should import it as follows:
531 </para>
532
533 <itemizedlist>
534 <listitem>Use <guilabel>Add DCP...</guilabel> to import the VF DCP.
535 The VF DCP will be added to the content list and marked &ldquo;NEEDS
536 OV&rdquo;.</listitem>
537 <listitem>Right-click on the VF DCP in the content list and choose <guilabel>Add OV...</guilabel> from the menu.</listitem>
538 <listitem>Choose the folder that contains the OV DCP.  The VF will now be playable as normal.</listitem>
539 </itemizedlist>
540
541 </section>
542
543
544 <section xml:id="sec-decrypting">
545 <title>Decrypting encrypted DCPs</title>
546
547 <para>
548 DCPs can be encrypted (see <xref linkend="ch-encryption"/> for
549 details).  If you import an encrypted DCP you will need a key, in the
550 form of a Key Delivery Message (KDM), to decrypt it.
551 </para>
552
553 <para>
554 KDMs must be prepared by the organisation which created the DCP.  They
555 contain the keys to decrypt the DCP wrapped up in such a way that only
556 the intended recipient can read them.  You will need to provide the
557 organisation with a certificate which identifies your copy of
558 DCP-o-matic and allows them to create a KDM for you.
559 </para>
560
561 <para>
562 To get DCP-o-matic's decryption certificate, open the Preferences
563 dialogue (see <xref linkend="ch-preferences"/>) and go to the
564 <guilabel>Keys</guilabel> tab.  Click the <guilabel>Export DCP
565 decryption certificate...</guilabel> button at the bottom of this tab
566 and save the certificate.  Send this certificate to the DCP creators
567 and they can create a KDM to allow DCP-o-matic to decrypt their DCP.
568 </para>
569
570 <para>
571 Once you have your KDM, right-click the DCP's name in DCP-o-matic and
572 choose <guilabel>Add KDM...</guilabel>.  Specify your KDM and the DCP
573 will be decrypted and become available for preview.
574 </para>
575
576 </section>
577
578
579 <section>
580 <title>Making a DCP from a DCP</title>
581
582 <para>
583 In many ways, using DCPs as <emphasis>content</emphasis> in
584 DCP-o-matic is the same as using any other content.  There are a few
585 things to note, though.
586 </para>
587
588
589 <section>
590 <title>Re-use of existing data</title>
591
592 <para>
593 Where possible DCP-o-matic will re-use existing JPEG2000-compressed
594 data from DCP content without modification.  This has the advantage
595 that creation of the new DCP will be quick, as the time-consuming
596 JPEG2000 encoding is not necessary.
597 </para>
598
599 <para>
600 DCP-o-matic can do this if you <emphasis>avoid</emphasis> changes to
601 the following content settings:
602 </para>
603
604 <itemizedlist>
605 <listitem>Crop</listitem>
606 <listitem>Scaling</listitem>
607 <listitem>Subtitle burn-in</listitem>
608 <listitem>Fades</listitem>
609 <listitem>Colour conversion</listitem>
610 </itemizedlist>
611
612 <para>
613 If you do change any of these settings on a piece of DCP content
614 DCP-o-matic will decode and then re-encode the JPEG2000 data.
615 </para>
616
617 </section>
618
619
620 <section xml:id="sec-overlay">
621 <title>Making overlay files</title>
622
623 <para>
624 With its default settings, DCP-o-matic will take any data from DCP
625 content and copy it into the DCP that it creates.  See <xref linkend="fig-dcp-copy"/>.
626 </para>
627
628 <figure id="fig-dcp-copy">
629 <title>Creating a new DCP by copying an existing one</title>
630 <mediaobject><imageobject><imagedata scale="100" fileref="diagrams/dcp-copy&dia;"/></imageobject></mediaobject>
631 </figure>
632
633 <para>
634 This can be inefficient in some cases.  Consider, for example, a film
635 which has ten different translations for which the subtitles are
636 different but video and audio are the same.  If the video and audio
637 content takes up, say, 100Gb this means that the set of DCPs for every
638 translation would be about 1Tb with a lot of duplicated data.
639 </para>
640
641 <para>
642 The DCP format has a solution to this problem.  One DCP can refer to
643 the &lsquo;assets&rsquo; (picture, sound or subtitle) of another DCP.
644 For our translation example this means that we could have a
645 &lsquo;base&rsquo; DCP (often called the OV or Original Version)
646 containing video, audio and one set of subtitles and then any number
647 of overlay DCPs (often called VF or Version Files) which refer to the
648 base version and replace the original subtitles with their own.  <xref
649 linkend="fig-dcp-refer"/> shows this principle for one of our
650 translations.  The DCP that we make refers to the original content
651 DCP's video and audio rather than containing a copy.
652 </para>
653
654 <figure id="fig-dcp-refer">
655 <title>Creating a new DCP by referring to an existing one</title>
656 <mediaobject><imageobject><imagedata scale="100" fileref="diagrams/dcp-refer&dia;"/></imageobject></mediaobject>
657 </figure>
658
659 <para>
660 To play back the subtitled DCP the projectionist ingests both the base
661 (OV) DCP and the overlay (VF) DCP, then plays the VF one.
662 </para>
663
664 <para>
665 To make a DCP like this:
666 </para>
667
668 <itemizedlist>
669 <listitem>Import your &lsquo;Content DCP&rsquo; to a DCP-o-matic project.</listitem>
670 <listitem>Add whatever replacement you want in your new DCP (replacement subtitles or audio files, for example).</listitem>
671 <listitem>Select the DCP in the content list</listitem>
672 <listitem>Tick the <guilabel>Use's this DCP's ... as OV and make VF</guilabel> checkbox
673 in the tabs for the parts of the DCP that you want to refer to in your
674 new DCP.  For example, to refer to the Content DCP's video and audio you would select the <guilabel>Video</guilabel> tab, click <guilabel>Use this DCP's video as OV and make VF</guilabel> then select the <guilabel>Audio</guilabel> tab and click <guilabel>Use this DCP's audio as OV and make VF</guilabel>.</listitem>
675 <listitem>Do <guilabel>Make DCP</guilabel> as usual and your VF DCP will be created.</listitem>
676 </itemizedlist>
677
678 </section>
679
680 </section>
681
682
683
684 </chapter>
685 <!-- ============================================================== -->
686
687
688 <!-- ============================================================== -->
689 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
690 <title>Content settings</title>
691
692 <para>
693 The previous chapters showed DCP generation using the default
694 settings.  DCP-o-matic offers a range of features to adjust the
695 content that goes into your DCP, and this chapter describes those
696 features in detail.
697 </para>
698
699 <section>
700 <title>Adding and removing content</title>
701
702 <para>
703 At the top of the <guilabel>Content</guilabel> tab is a list of the
704 content that will go into our DCP.  There can be as many pieces of
705 content as you like, and they can be of the following types:
706 </para>
707
708 <itemizedlist>
709 <listitem>Movie &mdash; a file containing some video, probably some
710 audio and possibly some embedded subtitles; for example, a MOV, MP4 or VOB.
711 </listitem>
712
713 <listitem>Sound &mdash; a file containing one or more channels of
714 audio; for example, a WAV or AIFF file.
715 </listitem>
716
717 <listitem>Still image &mdash; a file containing a single still image; for
718 example, a JPEG, PNG or TIFF file.
719 </listitem>
720
721 <listitem>Moving image &mdash; a directory containing many still
722 images which should be treated as the frames of a video.
723 </listitem>
724
725 <listitem>Subtitle &mdash; a file containing subtitle which will be
726 superimposed on the image of the DCP.  These can be
727 <guilabel>.srt</guilabel>, <guilabel>.ssa</guilabel>, <guilabel>.ass</guilabel> or <guilabel>.xml</guilabel>
728 files.</listitem>
729
730 <listitem>DCP &mdash; an existing DCP.</listitem>
731 </itemizedlist>
732
733 <para>
734 To add one or more movie, sound, still-image or subtitle files, select
735 <guilabel>Add file(s)...</guilabel> and choose them from the selector.
736 </para>
737
738 <para>
739 To add a directory (folder) of images, choose <guilabel>Add
740 folder...</guilabel> and choose the directory from the selector.
741 DCP-o-matic will open a small dialogue box where you can enter the
742 frame rate that the image sequence should be run at.
743 </para>
744
745 <para>
746 To add a DCP, choose <guilabel>Add DCP...</guilabel> and choose the
747 DCP's directory from the selector.
748 </para>
749
750 <para>
751 You can remove a piece of content by clicking on its name and then
752 clicking the <guilabel>Remove</guilabel> button.
753 </para>
754
755 </section>
756
757 <!-- ============================================================== -->
758 <section>
759 <title>Adding existing DCPs</title>
760
761 <para>Adding existing DCPs to a DCP-o-matic film is a little different
762 to adding other types of content.  Most content has to be converted to
763 JPEG2000, the compression scheme used by DCPs, which is a very
764 time-consuming process.  Existing DCPs are already in JPEG2000 format
765 so do not require conversion.  This means that, provided no settings
766 such as crop are used on the DCP content, picture and sound data will
767 be passed from existing to new DCP unaltered.
768 </para>
769
770 <para>Encrypted DCPs that are added as content will require a KDM
771 targeted at DCP-o-matic so that DCP-o-matic can decrypt them.  You
772 should ask the creator of the imported DCP to provide a KDM for
773 DCP-o-matic's decryption certificate, which can be obtained by
774 clicking <guilabel>Export DCP decryption certificate...</guilabel>
775 from the <guilabel>Keys</guilabel> tab of the
776 <guilabel>Preferences</guilabel> dialog (see <xref
777 linkend="sec-prefs-keys"/>).
778 </para>
779
780 </section>
781
782 <!-- ============================================================== -->
783 <section>
784 <title>Content Properties</title>
785
786 <para>
787 Below the content list are the controls to set content properties.  To
788 adjust the properties for a piece of content, click its name in the
789 content list.  The content property controls will then become active
790 for that piece of content.
791 </para>
792
793 <para>
794 If you want to change the properties for multiple pieces of content at
795 the same time, select the content in the list by clicking the first
796 piece then clicking the other pieces with <keycap>shift</keycap> key
797 held down.  Note that not all settings can be changed in this way.
798 </para>
799
800 <para>
801 The content properties are split up into four sections:
802 <guilabel>Video</guilabel>, <guilabel>Audio</guilabel>,
803 <guilabel>Subtitles</guilabel> and <guilabel>Timing</guilabel>.  Not
804 all of these sections will be active for all content types.  The controls
805 in each section are described below.
806 </para>
807
808 </section>
809
810
811 <!-- ============================================================== -->
812 <section>
813 <title>Video</title>
814
815 <para>
816 The <guilabel>Video</guilabel> tab controls properties of the image, as shown in <xref linkend="fig-video-tab"/>.
817 </para>
818
819 <figure id="fig-video-tab">
820   <title>Video settings tab</title>
821   <mediaobject>
822     <imageobject>
823        <imagedata fileref="screenshots/video-tab&scs;"/>
824     </imageobject>
825   </mediaobject>
826 </figure>
827
828
829 <!-- ============================================================== -->
830 <section>
831 <title>Use this DCP's video as OV and make VF</title>
832
833 <para>
834 This option is only applicable if the selected content is an existing
835 DCP.  It allows you make a VF DCP, using the video content from the
836 existing DCP by referencing it (rather than copying).  See <xref
837 linkend="sec-overlay"/>.
838 </para>
839
840 </section>
841
842 <!-- ============================================================== -->
843 <section>
844 <title>Image type</title>
845
846 <para>
847 The next option on this tab is the &lsquo;type&rsquo; of the video.
848 This specifies how DCP-o-matic should interpret the video's image.
849 <guilabel>2D</guilabel> is the default; this just takes the video
850 image as a standard 2D frame.  The <guilabel>3D
851 left/right</guilabel> option tells DCP-o-matic to interpret the frame as a
852 left-right pair, as shown in <xref linkend="fig-3d-left-right"/>.
853 </para>
854
855 <figure id="fig-3d-left-right">
856   <title>3D left/right image type</title>
857   <mediaobject>
858     <imageobject>
859        <imagedata scale="100" fileref="diagrams/3d-left-right&dia;"/>
860     </imageobject>
861   </mediaobject>
862 </figure>
863
864 <para>
865 Alternatively the <guilabel>3D top/bottom</guilabel> option tells
866 DCP-o-matic to see the frame as a top-bottom pair, as shown in <xref
867 linkend="fig-3d-top-bottom"/>.
868 </para>
869
870 <figure id="fig-3d-top-bottom">
871   <title>3D top/bottom image type</title>
872   <mediaobject>
873     <imageobject>
874        <imagedata scale="100" fileref="diagrams/3d-top-bottom&dia;"/>
875     </imageobject>
876   </mediaobject>
877 </figure>
878
879 <para>
880 Another option is <guilabel>3D alternate</guilabel> which takes the
881 first frame of the content as for the left eye, the second for the
882 right eye, the third for the left, and so on.  Finally, you can
883 specify <guilabel>3D left only</guilabel> or <guilabel>3D right
884 only</guilabel> if this content contains only the the left or right
885 eye images.  This is useful when you have the left and right eye image
886 sets in different files; you can specify one content as <guilabel>3D
887 left only</guilabel> and another as <guilabel>3D right only</guilabel>
888 and DCP-o-matic will pick up the appropriate frames from each.
889 </para>
890
891 </section>
892
893
894 <!-- ============================================================== -->
895 <section>
896 <title>Filtering</title>
897
898 <para>
899 The &lsquo;filters&rsquo; settings allow you to apply various video
900 filters to the image.  These may be useful to try to improve
901 poor-quality sources like DVDs.  You can set up the filters by clicking the
902 <guilabel>Edit</guilabel> button next to the filters entry in the
903 setup area of the DCP-o-matic window; this opens the filters selector
904 as shown in <xref linkend="fig-filters"/>.
905 </para>
906
907 <figure id="fig-filters">
908   <title>Filters selector</title>
909   <mediaobject>
910     <imageobject>
911       <imagedata fileref="screenshots/filters&scs;"/>
912     </imageobject>
913   </mediaobject>
914 </figure>
915
916 <para>
917 After changing the filters setup, you will need to regenerate the DCP
918 to see the effect on the cinema screen.  The preview in DCP-o-matic
919 will update itself whenever filters are changed, though of course this
920 image is much smaller and of lower resolution than a projected image!
921 </para>
922 </section>
923
924
925
926 <!-- ============================================================== -->
927 <section>
928 <title>Colour conversion</title>
929
930 <para>
931 The <guilabel>Colour conversion</guilabel> setting specifies what
932 colour transforms and gamma correction DCP-o-matic will use when
933 converting the selected content into the XYZ colourspace for the DCP.
934 </para>
935
936 <para>
937 The easiest way to select the required conversion is to choose one of
938 DCP-o-matic's presets.  DCP-o-matic knows how to convert from four
939 common colourspaces: sRGB, Rec. 601, Rec. 709 and P3.  If you do not
940 know which preset you should use, refer to the suggestions in <xref
941 linkend="tab-colour-conversion"/>.
942 </para>
943
944 <table id="tab-colour-conversion">
945 <title>Suggested colour conversion settings</title>
946 <tgroup cols='2' align='left' colsep='1' rowsep='1'>
947 <colspec colwidth='1*'/>
948 <colspec colwidth='5*'/>
949 <tbody>
950 <row>
951 <entry>sRGB</entry><entry>Still images in RGB, e.g. photographs</entry>.
952 </row>
953 <row>
954 <entry>Rec. 601</entry><entry>Standard-definition content (fewer than about 1000 pixels across) including DVD rips.</entry>
955 </row>
956 <row>
957 <entry>Rec. 709</entry><entry>High-definition content including Blu-Ray rips.</entry>
958 </row>
959 <row>
960 <entry>P3</entry><entry>Content explicitly graded to P3.</entry>
961 </row>
962 </tbody>
963 </tgroup>
964 </table>
965
966 <para>
967 For other required colour conversions, and if you know what you are
968 doing, you can choose <guilabel>Custom</guilabel> which will open the full
969 colour conversion editing dialogue box:
970 </para>
971
972 <figure id="fig-colour-conversion">
973   <title>Dialogue box for custom colour conversion</title>
974   <mediaobject>
975     <imageobject>
976       <imagedata fileref="screenshots/colour-conversion&scs;"/>
977     </imageobject>
978   </mediaobject>
979 </figure>
980
981 <para>
982 Alternatively, choose <guilabel>None</guilabel> if your source files
983 are already in the XYZ colour space and require no conversion.
984 </para>
985
986 <para>
987 DCP-o-matic's colour conversion processes are discussed in much more
988 detail in a separate document <ulink
989 url="http://dcpomatic.com/manual/colour.pdf">colour.pdf</ulink>.
990 </para>
991
992 </section>
993
994 <!-- ============================================================== -->
995 <section>
996 <title>Other settings</title>
997
998 <para>
999 The <guilabel>crop</guilabel> settings can be used to crop your content,
1000 which can be used to remove black borders from round the edges of DVD
1001 images, for example.  The specified number of pixels will be trimmed
1002 from each edge, and the content image in the right of the window will
1003 be updated to show the effect of the crop.
1004 </para>
1005
1006 <para>
1007 The <guilabel>fade in</guilabel> and <guilabel>fade out</guilabel>
1008 settings can be used to apply linear fades into and out of a piece of
1009 content.  Specify the time for each, clicking <guilabel>Set</guilabel>
1010 after making any changes.
1011 </para>
1012
1013 <para>
1014 The <guilabel>Scale to</guilabel> option governs the shape that
1015 DCP-o-matic will scale the content's image into.  Select the aspect
1016 ratio that your content should be presented in.
1017 </para>
1018
1019 </section>
1020
1021 <!-- ============================================================== -->
1022 <section>
1023 <title>Video description</title>
1024
1025 <para>
1026 At the bottom of the video tab is a short description of what will
1027 happen to your video with the current settings.  In the example of
1028 <xref linkend="fig-video-tab"/>, DCP-o-matic is telling you that the
1029 video file is 1920x1080 pixels and it has square pixels (a pixel
1030 aspect ratio of 1.00) hence its display aspect ratio is 1.78:1.  Since
1031 the controls specify &lsquo;16.9&rsquo; for the ratio, DCP-o-matic
1032 does not scale the image but pads it to the DCP's container ratio of
1033 1.85:1.  For a 2K DCP this is 1998x1080 pixels.
1034 </para>
1035
1036 <para>
1037 This description also gives the frame rate of the content and what
1038 will happen to it when it is played at the DCP's frame rate.  See
1039 <xref linkend="ch-frame-rates"/> for details of DCP-o-matic's
1040 frame-rate conversion.
1041 </para>
1042
1043 </section>
1044
1045 </section>
1046
1047
1048 <!-- ============================================================== -->
1049 <section>
1050 <title>Audio</title>
1051
1052 <para>
1053 The <guilabel>Audio</guilabel> tab controls properties of the image, as shown in <xref linkend="fig-audio-tab"/>.
1054 </para>
1055
1056 <figure id="fig-audio-tab">
1057   <title>Audio settings tab</title>
1058   <mediaobject>
1059     <imageobject>
1060        <imagedata fileref="screenshots/audio-tab&scs;"/>
1061     </imageobject>
1062   </mediaobject>
1063 </figure>
1064
1065 <!-- ============================================================== -->
1066 <section>
1067 <title>The audio map</title>
1068
1069 <para>
1070 The section at the bottom of the audio tab is the &lsquo;audio
1071 map&rsquo;.  This governs how sound from the content will be arranged
1072 in the DCP.
1073 </para>
1074
1075 <para>
1076 Down the left-hand side of the map is the list of audio channels in
1077 the currently-selected piece of content.  These are labelled with two
1078 numbers; the first is the stream index within the content and the
1079 second is the channel number within that stream.  Some content will
1080 have different streams for different languages or audio mixes.  Along
1081 the top is each channel in the DCP.  A green box means that the
1082 corresponding content channel will be copied into the corresponding
1083 DCP channel.
1084 </para>
1085
1086 <para>
1087 When content channels are copied into DCP channels they can be done
1088 with variable gain.  If, for example, you want to copy a channel
1089 as-is, you can set a gain of 0dB.  Alternatively, if you want to mix
1090 two channels into one, you may want to use a gain of -6dB on each one
1091 to prevent clipping when the two channels are added.
1092 </para>
1093
1094 <para>
1095 The green boxes of the audio mapping view tell you (very roughly) how
1096 much gain is applied to each channel.  A full-height box means 0dB
1097 (i.e. unity) gain.  Any less height indicates lower gain.
1098 </para>
1099
1100 <para>
1101 To map one channel to another with 0dB gain, click in the empty box
1102 and it will turn green to reflect the mapping.  A second click will
1103 turn the mapping back off.  To set some other gain, right-click on the
1104 box to open the gain menu.  This allows you to set
1105 <guilabel>Off</guilabel> (no mapping or negative infinity gain),
1106 <guilabel>Full</guilabel> (0dB gain), -6dB gain or
1107 <guilabel>Edit</guilabel> which allows you to set the required gain
1108 precisely.
1109 </para>
1110
1111 <para>
1112 Consider, for example, the case in <xref linkend="fig-audio-map-eg1"/>.
1113 </para>
1114
1115 <figure id="fig-audio-map-eg1">
1116   <title>Audio map example 1</title>
1117   <mediaobject>
1118     <imageobject>
1119        <imagedata fileref="screenshots/audio-map-eg1&scs;"/>
1120     </imageobject>
1121   </mediaobject>
1122 </figure>
1123
1124 <para>
1125 Here, we have two channels in the source which are mapped to left and
1126 right, respectively, in the DCP.  The full green boxes show that the
1127 mapping is at unity gain (0dB) in each case.  Imagine that we modify
1128 the settings to those shown in <xref linkend="fig-audio-map-eg2"/>
1129 </para>
1130
1131 <figure id="fig-audio-map-eg2">
1132   <title>Audio map example 2</title>
1133   <mediaobject>
1134     <imageobject>
1135        <imagedata fileref="screenshots/audio-map-eg2&scs;"/>
1136     </imageobject>
1137   </mediaobject>
1138 </figure>
1139
1140 <para>
1141 We now have the content's streams mapped to left and right and also
1142 mixed together and placed in the DCP's centre channel.  The smaller
1143 green boxes on the centre mappings show that those channels are added
1144 with some non-unity gain; you can see by hovering the mouse pointer
1145 over those boxes that the gain for content channels 1 and 2 is -6dB
1146 when being sent to the centre channel and 0dB when being sent to left
1147 and right.
1148 </para>
1149
1150 <figure id="fig-audio-map-eg3">
1151   <title>Audio map example 3</title>
1152   <mediaobject>
1153     <imageobject>
1154        <imagedata fileref="screenshots/audio-map-eg3&scs;"/>
1155     </imageobject>
1156   </mediaobject>
1157 </figure>
1158
1159 <para>
1160 As a final example, the map in <xref linkend="fig-audio-map-eg3"/>
1161 shows the mapping of a 5.1 source into a 5.1 DCP.
1162 </para>
1163
1164 </section>
1165
1166
1167 <!-- ============================================================== -->
1168 <section>
1169   <title>Other controls</title>
1170
1171 <para>
1172 The <guilabel>Use this DCP's audio as OV and make VF</guilabel>
1173 checkbox is only applicable if the selected content is an existing
1174 DCP.  It allows you to make a VF DCP, using the audio content from the
1175 existing DCP by referencing it (rather than copying).  See <xref
1176 linkend="sec-overlay"/>.
1177 </para>
1178
1179 <para>
1180 <guilabel>Show graphs of audio levels</guilabel> will analyse the
1181 audio of the selected content and plot it on a graph.  See <xref
1182 linkend="sec-show-audio"/> for more details.
1183 </para>
1184
1185 <para>
1186 &lsquo;Audio Gain&rsquo; is used to alter the volume of the
1187 soundtrack.  The specified gain (in dB) will be applied to each sound
1188 channel of your content before it is written to the DCP.
1189 </para>
1190
1191 <para>
1192 If you use a sound processor that DCP-o-matic knows about, it can help
1193 you calculate changes in gain that you should apply.  Say, for
1194 example, that you make a test DCP and find that you have to run it at
1195 volume 5 instead of volume 7 to get a good sound level in the screen.
1196 If this is the case, click the <guilabel>Calculate...</guilabel>
1197 button next to the audio gain entry, and the dialogue box in <xref
1198 linkend="fig-calculate-audio-gain"/> will open.
1199 </para>
1200
1201 <figure id="fig-calculate-audio-gain">
1202   <title>Calculating audio gain</title>
1203   <mediaobject>
1204     <imageobject>
1205       <imagedata fileref="screenshots/calculate-audio-gain&scs;"/>
1206     </imageobject>
1207   </mediaobject>
1208 </figure>
1209
1210 <para>
1211 For our example, put 5 in the first box and 7 in the second and click
1212 <guilabel>OK</guilabel>.  DCP-o-matic will calculate the audio gain
1213 that it should apply to make this happen.  Then you can re-make the
1214 DCP (this will be reasonably fast, as the video data will already have
1215 been done) and it should play back at the correct volume with 7 on
1216 your sound-rack fader.
1217 </para>
1218
1219 <para>
1220 Current versions of DCP-o-matic only know about the Dolby CP650 and
1221 CP750.  If you use a different sound processor, and know the gain
1222 curve of its volume control, <ulink url="mailto:carl@dcpomatic.com">get in
1223 touch</ulink>.
1224 </para>
1225
1226 <para>
1227 <guilabel>Audio Delay</guilabel> is used to adjust the synchronisation
1228 between audio and video.  A positive delay will move the audio later
1229 with respect to the video, and a negative delay will move it earlier.
1230 </para>
1231
1232 </section>
1233 </section>
1234
1235
1236 <!-- ============================================================== -->
1237 <section>
1238 <title>Subtitles</title>
1239
1240 <para>
1241 The subtitles tab contains settings related to subtitles in your
1242 content, as shown in <xref linkend="fig-subtitles-tab"/>.
1243 </para>
1244
1245 <figure id="fig-subtitles-tab">
1246   <title>Subtitle settings tab</title>
1247   <mediaobject>
1248     <imageobject>
1249        <imagedata fileref="screenshots/subtitles-tab&scs;"/>
1250     </imageobject>
1251   </mediaobject>
1252 </figure>
1253
1254 <para>
1255 DCP-o-matic can either:
1256 </para>
1257
1258 <itemizedlist>
1259   <listitem>Extract subtitles that are embedded in video files, or</listitem>
1260   <listitem>Use subtitles from SubRip (<code>.srt</code>), SubStation
1261   Alpha (<code>.ssa</code> or <code>.ass</code>) or DCP XML files.  You may find the great
1262   free program <ulink
1263   url="http://www.nikse.dk/subtitleedit/">Subtitle Edit</ulink> useful
1264   for creating such files.</listitem>
1265 </itemizedlist>
1266
1267 <para>
1268 Embedded subtitles are usually represented using a set of bitmaps,
1269 especially on files that have come from DVD or BluRay.  Such subtitles
1270 can (currently) only be &lsquo;burnt&rsquo; into the DCP (that is,
1271 they are included in the image and not overlaid by the projector).
1272 </para>
1273
1274 <para>
1275 With SubRip, SubStation Alpha or DCP subtitles you have the choice to
1276 either burn-in or include the subtitles as separate subtitle
1277 &lsquo;asset&rsquo; within your DCP (in which case the projector
1278 overlays them onto the image on playback).  The difference between
1279 burn-in and overlay is illustrated by <xref linkend="fig-burn-in"/>
1280 and <xref linkend="fig-discrete"/>.
1281 </para>
1282
1283 <figure id="fig-burn-in">
1284   <title>Burnt-in subtitles</title>
1285   <mediaobject>
1286     <imageobject>
1287        <imagedata scale="100" fileref="diagrams/burn-in&dia;"/>
1288     </imageobject>
1289   </mediaobject>
1290 </figure>
1291
1292 <figure id="fig-discrete">
1293   <title>Separate subtitles</title>
1294   <mediaobject>
1295     <imageobject>
1296        <imagedata scale="100" fileref="diagrams/discrete&dia;"/>
1297     </imageobject>
1298   </mediaobject>
1299 </figure>
1300
1301 <para>
1302 The advantage of separate subtitles is that the same video content can
1303 be used for DCPs in many different languages.  This means that only a
1304 small text file needs to be changed for each target language, rather
1305 than a large video file.  It also means that the time-consuming video
1306 encoding need only be done once for the project rather than once for
1307 every language.
1308 </para>
1309
1310 <para>
1311 Select the <guilabel>Use Subtitles</guilabel> check-box to enable
1312 the subtitles in the selected content.
1313 </para>
1314
1315 <para>
1316 Select the <guilabel>Burn subtitles into image</guilabel> check-box to
1317 burn these subtitles into the image; if this is not ticked the
1318 subtitles will be included separately in the DCP to be rendered by the
1319 projector.  This check-box will always be ticked if you are using
1320 embedded &lsquo;image&rsquo; subtitles.
1321 </para>
1322
1323 <para>
1324 The <guilabel>X Offset</guilabel> and <guilabel>Y Offset</guilabel>
1325 controls move the subtitles around within the image.  The offsets are
1326 expressed as a percentage of the video frame size; 100% X offset is
1327 the entire width of the frame, and 100% Y offset is the entire height.
1328 Hence, to move the subtitles down by half the frame height you would
1329 use a Y offset of 50%.
1330 </para>
1331
1332 <para>
1333 The <guilabel>X Scale</guilabel> and <guilabel>Y Scale</guilabel>
1334 controls scale the subtitles.  Scale values of 1 make the subtitles
1335 the same size (relative to the size of the image) as they are on the
1336 original.  Values lower than 1 make them smaller, and values higher
1337 make them larger.  You can stretch the subtitles in either direction
1338 by specifying different values for X and Y scale.  Subtitles from DVD
1339 and Blu Ray sources are frequently larger (relative to the video
1340 frame) than those typically used for DCP, so it is often useful to
1341 scale such subtitles down using these controls.
1342 </para>
1343
1344 <para>
1345 The <guilabel>Line spacing</guilabel> control adjusts the line spacing
1346 of the subtitles.  This only works for non-embedded (text) subtitles.
1347 </para>
1348
1349 <para>
1350 The <guilabel>Stream</guilabel> control changes the subtitle stream
1351 that is used when the content has more than one.
1352 </para>
1353
1354 <para>
1355 If you are using non-embedded (text) subtitles you can see the
1356 subtitle text and timings by clicking the <guilabel>View...</guilabel>
1357 button, or specify the fonts that should be used by clicking <guilabel>Fonts...</guilabel>.
1358 </para>
1359
1360 <para>
1361 With any subtitles you can click <guilabel>Appearance...</guilabel> to
1362 change how the subtitles look.
1363 </para>
1364
1365 </section>
1366
1367
1368 <!-- ============================================================== -->
1369 <section>
1370 <title>Timing</title>
1371
1372 <para>
1373 The timing tab contains settings related to the timing of your
1374 content, as shown in <xref linkend="fig-timing-tab-detail"/>.
1375 </para>
1376
1377 <figure id="fig-timing-tab-detail">
1378   <title>Timing settings tab</title>
1379   <mediaobject>
1380     <imageobject>
1381        <imagedata fileref="screenshots/timing-tab&scs;"/>
1382     </imageobject>
1383   </mediaobject>
1384 </figure>
1385
1386 <para>
1387 Most of the timing tab's entries are <emphasis>time-codes</emphasis>.
1388 These are expressed as four numbers, as shown in <xref
1389 linkend="fig-timecode"/>.
1390 </para>
1391
1392 <figure id="fig-timecode">
1393   <title>Timecode</title>
1394   <mediaobject>
1395     <imageobject>
1396        <imagedata scale="100" fileref="diagrams/timecode&dia;"/>
1397     </imageobject>
1398   </mediaobject>
1399 </figure>
1400
1401 <para>
1402 <guilabel>Position</guilabel> is the time at which this piece of
1403 content should start within the DCP.  In most cases, this will be
1404 <code>0:0:0:0</code> to make the content start at the beginning of the
1405 DCP.
1406 </para>
1407
1408 <para>
1409 <guilabel>Full length</guilabel> is the length of the piece of
1410 content.  This can only be set for still-image content: for video or
1411 sound content, it is fixed by the nature of the content file.  If
1412 still-image content is being used you can set the length for which it
1413 should be displayed using this control.
1414 </para>
1415
1416 <para>
1417 <guilabel>Trim from start</guilabel> specifies the amount that should
1418 be trimmed from the start of the content.  You can set this amount to
1419 trim up to the current preview position by clicking <guilabel>Trim up
1420 to current position</guilabel>.
1421 </para>
1422
1423 <para>
1424 <guilabel>Trim from end</guilabel> specifies the amount that should be
1425 trimmed from the end of the content.  You can set this amount to trim
1426 after the current preview position by clicking <guilabel>Trim after to
1427 current position</guilabel>.
1428 </para>
1429
1430 <para>
1431 <guilabel>Play length</guilabel> indicates how long this piece of
1432 content will be once the trims have been applied.  This will be equal
1433 to the full length minus <guilabel>trim-from-start</guilabel> and minus <guilabel>trim-from-end</guilabel>.
1434 </para>
1435
1436 <para>
1437 <guilabel>Video frame rate</guilabel> specifies the frame rate for
1438 still-image content.  It can also be used to override the detected
1439 frame rate of other content if DCP-o-matic has got it wrong.
1440 </para>
1441
1442 <para>
1443 Each timecode control has a <guilabel>Set</guilabel> which you should
1444 click when you have entered a new value for a timecode.  The
1445 <guilabel>Set</guilabel> button will make DCP-o-matic take account of
1446 any changes to the corresponding timecode.
1447 </para>
1448
1449 </section>
1450
1451
1452 <!-- ============================================================== -->
1453 <section>
1454 <title>Video processing pipeline</title>
1455
1456 <para>
1457 This section gives a little more detail about how DCP-o-matic process
1458 video as it takes it from a source and puts it into a DCP.
1459 </para>
1460
1461 <para>
1462 Consider, as a somewhat over-the-top example, that we have a 720 x 576
1463 image which is letterboxed with 36 black pixels each at the top and
1464 bottom, and the video content within the letterbox should be presented
1465 in the DCP at ratio of 2.39:1 within a 1.85:1 frame (such as might
1466 happen with a trailer).  The source image is shown in <xref
1467 linkend="fig-pipeline1"/>.
1468 </para>
1469
1470 <figure id="fig-pipeline1">
1471   <title>Example image to demonstrate video processing</title>
1472   <mediaobject>
1473     <imageobject>
1474        <imagedata scale="100" fileref="diagrams/pipeline1&dia;"/>
1475     </imageobject>
1476   </mediaobject>
1477 </figure>
1478
1479 <para>
1480 DCP-o-matic runs through the following steps when preparing an image for a DCP:
1481 </para>
1482
1483 <itemizedlist>
1484 <listitem>Crop</listitem>
1485 <listitem>Scale</listitem>
1486 <listitem>Place in container</listitem>
1487 </itemizedlist>
1488
1489 <para>
1490 First, some amount of the image can be cropped.  This is almost always
1491 used to remove black borders (letterboxing and/or pillarboxing) around
1492 images.
1493 </para>
1494
1495 <para>
1496 In our example image, we would use 36 pixels of crop from the top and
1497 bottom.  This would give the new image shown in <xref
1498 linkend="fig-pipeline2"/>.
1499 </para>
1500
1501 <figure id="fig-pipeline2">
1502   <title>Example image after cropping</title>
1503   <mediaobject>
1504     <imageobject>
1505        <imagedata scale="100" fileref="diagrams/pipeline2&dia;"/>
1506     </imageobject>
1507   </mediaobject>
1508 </figure>
1509
1510 <para>
1511 The next step is to scale the image.  Since this content should be
1512 presented in a 2.39:1 aspect ratio inside a 1.85:1 DCP we would select
1513 <guilabel>Scope</guilabel> from the <guilabel>Scale to</guilabel>
1514 option in the <guilabel>Video</guilabel> tab and
1515 <guilabel>Flat</guilabel> from the <guilabel>Container</guilabel>
1516 option in the <guilabel>DCP</guilabel> tab.
1517 </para>
1518
1519 <para>The <guilabel>Scale to</guilabel> option should always be set to
1520 the aspect ratio at which the content should be seen.  The
1521 <guilabel>Container</guilabel> option should be set to the preset that
1522 you want to use on the projector.  Of course, these two settings will
1523 often be the same.
1524 </para>
1525
1526 <para>
1527 Given the scaling and container information, DCP-o-matic will look at
1528 the DCP's container size, and then scale the source image up until one
1529 or both of its dimensions (width, height or both) fits the size of the
1530 container, all the while preserving the desired aspect ratio.
1531 </para>
1532
1533 <para>
1534 In our example here, the DCP's container is specified as 1.85:1 (so
1535 that the DCP will play back correctly using the projector's
1536 &lsquo;Flat&rsquo; preset).  At 2K, 1.85:1 is 1998 pixels by 1080.
1537 Scaling the source up whilst preserving its 1.85:1 aspect ratio will
1538 result in the image hitting the sides of the container first, at a
1539 size of 1998 x 836.  This gives us a new version of the image as shown
1540 in <xref linkend="fig-pipeline3"/>.
1541 </para>
1542
1543 <figure id="fig-pipeline3">
1544   <title>Example image after cropping and scaling</title>
1545   <mediaobject>
1546     <imageobject>
1547        <imagedata scale="100" fileref="diagrams/pipeline3&dia;"/>
1548     </imageobject>
1549   </mediaobject>
1550 </figure>
1551
1552 <para>
1553 The final step is to place the image into the DCP.  In this case,
1554 since we have a 2.39:1 image that should be presented as a 1.85:1 DCP,
1555 we have set the <guilabel>container</guilabel> in the
1556 <guilabel>DCP</guilabel> tab to be Scope.  Since the content has been
1557 scaled to 1998 x 836, and a Flat container is 1998 x 1080, there will
1558 be some black bars at the top and bottom of the image.  DCP-o-matic
1559 shares out this black equally, as shown in <xref
1560 linkend="fig-pipeline3"/>.
1561 </para>
1562
1563 <figure id="fig-pipeline4">
1564   <title>Example image in the DCP</title>
1565   <mediaobject>
1566     <imageobject>
1567        <imagedata scale="100" fileref="diagrams/pipeline4&dia;"/>
1568     </imageobject>
1569   </mediaobject>
1570 </figure>
1571
1572 </section>
1573
1574
1575 <section>
1576   <title>Copy and paste settings</title>
1577
1578 <para>
1579 Once you have set up a piece of content it is possible to copy the
1580 settings you have applied to another piece of content.  To do this,
1581 select the content to copy from and choose <guilabel>Copy</guilabel>
1582 from the <guilabel>Edit</guilabel> menu.  Then select the content to
1583 copy to and choose <guilabel>Paste</guilabel>.  A dialogue box will
1584 open to allow you to choose which settings you want to copy.  Clicking
1585 <guilabel>OK</guilabel> will apply the copied settings.
1586 </para>
1587
1588 </section>
1589
1590
1591 </chapter>
1592
1593
1594 <!-- ============================================================== -->
1595 <chapter xml:id="ch-dcp" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1596 <title>DCP settings</title>
1597
1598 <para>
1599 This chapter describes the settings that apply to the whole DCP.  The
1600 controls for these settings are in the <guilabel>DCP</guilabel> tab of
1601 the main window, as shown in <xref linkend="fig-dcp-tab"/>.
1602 </para>
1603
1604 <figure id="fig-dcp-tab">
1605   <title>DCP settings tab</title>
1606   <mediaobject>
1607     <imageobject>
1608        <imagedata fileref="screenshots/dcp-tab&scs;"/>
1609     </imageobject>
1610   </mediaobject>
1611 </figure>
1612
1613 <para>
1614 The first thing here is the name.  This is generally set to the title
1615 of the film that is being encoded.  If <guilabel>Use ISDCF
1616 name</guilabel> is not ticked, the name that you specify will be used
1617 as-is for the name of the DCP.  If <guilabel>Use ISDCF name</guilabel>
1618 is ticked, the name that you enter will be used as part of a
1619 ISDCF-compliant name.
1620 </para>
1621
1622 <para>
1623 Underneath the name field is a preview of the name that the DCP will
1624 get.  To use a ISDCF-compliant name, tick the <guilabel>Use ISDCF
1625 name</guilabel> check-box.  The ISDCF name will be composed using details
1626 of your content's soundtrack, the current date and other things that
1627 can be specified in the ISDCF name details dialogue box, which you can
1628 open by clicking on the <guilabel>Details</guilabel> button.
1629 </para>
1630
1631 <para>
1632 If you want to take the ISDCF-compliant name that DCP-o-matic
1633 generates and modify it, click <guilabel>Copy as name</guilabel> and
1634 the ISDCF name will be copied into the <guilabel>Name</guilabel> box.
1635 You can then edit it as you wish.  The DCP name should not matter (in
1636 that it should not affect how the DCP ingests or plays) but
1637 projectionists will appreciate it if you use the standard naming
1638 scheme as it makes it easier to identify details of the content.
1639 </para>
1640
1641 <para>
1642 The <guilabel>Content Type</guilabel> option can be
1643 &lsquo;feature&rsquo;, &lsquo;trailer&rsquo; or whatever; select the
1644 required type from the drop-down list.  On some projection systems
1645 this will affect where your content appears in the projector's server
1646 user interface, so take care to select an appropriate type.
1647 </para>
1648
1649 <para>
1650 The <guilabel>Signed</guilabel> check-box sets whether or not the DCP
1651 is signed.  This is rarely important; if in doubt, tick it.
1652 </para>
1653
1654 <para>
1655 The <guilabel>Encrypted</guilabel> check-box will set whether the DCP
1656 should be encrypted or not.  If this is ticked, the DCP will require a
1657 KDM to play back.  Encryption is discussed in <xref
1658 linkend="ch-encryption"/>.
1659 </para>
1660
1661 <para>
1662 If you use encryption DCP-o-matic will generate a random encryption
1663 key for you.  To specify your own key, click the
1664 <guilabel>Edit..</guilabel> button next to the key.
1665 </para>
1666
1667 <para>
1668 The <guilabel>Reels</guilabel> and <guilabel>Reel length</guilabel>
1669 controls specify how the DCP will be split up into
1670 &lsquo;reels&rsquo;.  See <xref linkend="sec-reels"/> below.
1671 </para>
1672
1673 <para>
1674 The <guilabel>Standard</guilabel> option specifies which of the two
1675 DCP standards DCP-o-matic should use.  If in doubt, use SMPTE (the
1676 more modern of the two).
1677 </para>
1678
1679 <para>
1680 Ticking the <guilabel>Upload DCP to TMS after it is made</guilabel>
1681 will ask DCP-o-matic to copy the finished DCP to your configured TMS (see <xref linkend="sec-prefs-tms"/>).
1682 </para>
1683
1684 <para>
1685 At the bottom of the DCP tab are a further two tabs, one each to
1686 contain the settings for the DCP's video and audio parts.
1687 </para>
1688
1689 <para>
1690 The <guilabel>Container</guilabel> option sets the ratio of the image
1691 in the DCP.  If this ratio is different to the ratio used for any
1692 content, DCP-o-matic will pad the content with black.  In simple cases
1693 this should be set to the same ratio as that for the the primary piece
1694 of video content.  Alternatively, you might want to pillarbox a small
1695 format into a Flat container: in this case, select the small format
1696 for the content's ratio and &lsquo;Flat&rsquo; for the DCP.
1697 </para>
1698
1699 <para>
1700 The <guilabel>Frame Rate</guilabel> control sets the frame rate of
1701 your DCP.  This can be a little tricky to get right.  Ideally, you
1702 want it to be the same as the video content that you are using.  If it
1703 is not the same, DCP-o-matic must resort to some tricks to alter your
1704 content to fit the specified frame rate.  Frame rates are discussed in
1705 more detail in <xref linkend="ch-frame-rates"/>.
1706 </para>
1707
1708 <para>
1709 The <guilabel>Use best</guilabel> button sets the DCP video frame rate
1710 to what DCP-o-matic thinks is the best given the content that you have
1711 added.
1712 </para>
1713
1714 <para>
1715 The <guilabel>3D</guilabel> button will set your DCP to 3D mode if it
1716 is checked.  A 3D DCP will then be created, and any 2D content will be
1717 made 3D compatible by repeating the same frame for both left and right
1718 eyes.  A 3D DCP can be played back on many 3D systems (e.g. Dolby 3D,
1719 Real-D etc.) but not on a 2D system.
1720 </para>
1721
1722 <para>
1723 The <guilabel>Resolution</guilabel> tab allows you to choose the
1724 resolution for your DCP.  Use 2K unless you have content that is of
1725 high enough resolution to be worth presenting in 4K.
1726 </para>
1727
1728 <para>
1729 The <guilabel>JPEG2000 bandwidth</guilabel>; setting changes how big
1730 the final image files used within the DCP will be.  Larger numbers
1731 will give better quality, but correspondingly larger DCPs.  The
1732 bandwidth can be between 50 and 250 megabits per second (Mbit/s).
1733 Most commercial DCPs use bit rates between 75 and 125 Mbit/s.
1734 </para>
1735
1736 <para>
1737 The <guilabel>Audio Channels</guilabel> control sets the number of
1738 audio channels that the DCP will have.  If the DCP has any channels
1739 for which there is no content audio they will be replaced by silence.
1740 You can only set an even number of channels here, since that is
1741 required by the DCI standard.  If you want an odd number of channels,
1742 set the DCP channel count to one greater than you need and the
1743 unused channel will be filled with silence.
1744 </para>
1745
1746 <para>
1747 The <guilabel>Processor</guilabel> control allows you to select a
1748 process to apply to the audio before it goes into the DCP.  Three processes are currently provided:
1749 </para>
1750
1751 <itemizedlist>
1752 <listitem>Mid-side decode &mdash; this will take a L/R
1753 stereo input and extract the common part (corresponding to the
1754 &lsquo;Mid&rsquo; in a mid-side signal) into the DCP's centre channel.
1755 The remaining L/R parts will be kept in the L/R channels of the DCP.
1756 This may be useful to make near-field L/R mixes more compatible with
1757 cinema audio systems.</listitem>
1758 <listitem>Stereo to 5.1 up-mixer A &mdash; this will take a stereo input and up-mix it to &lsquo;fake&rsquo; 5.1.  The input L/R are treated as follows:
1759 <itemizedlist>
1760 <listitem>DCP L is input L bandpass-filtered between 1.9kHz and 4.8kHz.</listitem>
1761 <listitem>DCP R is input R bandpass-filtered between 1.9kHz and 4.8kHz.</listitem>
1762 <listitem>DCP C is input L mixed with input R, taken down by 3dB and then bandpass-filtered between 150Hz and 1.9kHz.</listitem>
1763 <listitem>DCP Lfe is input L mixed with input R, taken down by 3dB and then bandpass-filtered between 20Hz and 150Hz.</listitem>
1764 <listitem>DCP Ls is input L bandpass-filtered between 4.8kHz and 20kHz.</listitem>
1765 <listitem>DCP Rs is input R bandpass-filtered between 4.8kHz and 20kHz.</listitem>
1766 </itemizedlist>
1767 <para>
1768 This upmixing algorithm is due to Gérald Maruccia.
1769 </para>
1770 </listitem>
1771 <listitem>Stereo to 5.1 up-mixer B &mdash; this uses a different approach:
1772 <itemizedlist>
1773   <listitem>DCP L is input L.</listitem>
1774   <listitem>DCP R is input R.</listitem>
1775   <listitem>DCP C is input L + input R taken down by 3dB.</listitem>
1776   <listitem>DCP Lfe is DCP C bandpass filtered between 20Hz and 150Hz.</listitem>
1777   <listitem>DCP Ls and Rs are input L - input R with a 20ms delay.</listitem>
1778 </itemizedlist>
1779 </listitem>
1780 </itemizedlist>
1781
1782 <!-- ============================================================== -->
1783 <section xml:id="sec-reels">
1784 <title>Reels</title>
1785
1786 <para>
1787 A &lsquo;reel&rsquo; in a DCP is a subsection of the DCP, in the same
1788 way as a 35mm reel is a section of a film.  A DCP can be split up into
1789 any number of reels and the joins (the equivalent to 35mm splices)
1790 between the reels are seamless.
1791 </para>
1792
1793 <para>
1794 There is no reason why you can't just use a single reel for the whole
1795 of your DCP, as there is no limit on their length.  Many people choose
1796 to do this.
1797 </para>
1798
1799 <para>
1800 There are, however, some possible advantages of splitting things up
1801 into reels:
1802 </para>
1803
1804 <itemizedlist>
1805 <listitem>
1806 The picture, sound and subtitle data of the DCP will be
1807 split up into more smaller files on disk, rather than fewer larger
1808 files.  This can be useful if the DCP is to be transferred on storage
1809 that have file size limits.  The FAT32 filesystem, for example, can
1810 only hold files smaller than 4Gb.  A 6Gb DCP with a single reel could
1811 not be transferred using a FAT32-formatted disk.  If that DCP were
1812 split up into two 3Gb reels it could be transferred.
1813 </listitem>
1814 <listitem>
1815 It is easier to re-use DCP components if they are in reels.  Consider,
1816 for example, a film company who wants to put a 5 second ident onto the
1817 beginning of DCPs that they distribute.  If they receive a feature
1818 film DCP they can modify it to add their ident as a separate reel.
1819 This is easier than attaching the picture data in the DCP.
1820 </listitem>
1821 </itemizedlist>
1822
1823 <para>
1824 DCP-o-matic offers three options for setting up the reels in your DCP:
1825 single reel, split by video content or custom.
1826 </para>
1827
1828 <para>
1829 <guilabel>Single reel</guilabel>, as its name suggests, keeps the whole DCP as one reel.
1830 This is a perfectly good option if you have no particular reason to
1831 need reels.
1832 </para>
1833
1834 <para>
1835 <guilabel>Split by video content</guilabel> puts each piece of source
1836 video content in its own reel, as shown in <xref linkend="fig-reels-by-video"/>.
1837 </para>
1838
1839 <figure id="fig-reels-by-video">
1840 <title>Making reels using split by video content</title>
1841 <mediaobject><imageobject><imagedata scale="100" fileref="diagrams/reels-by-video&dia;"/></imageobject></mediaobject>
1842 </figure>
1843
1844 <para>
1845 Here we have three video files (<code>ident.mp4</code>,
1846 <code>feature.ts</code> and <code>cred.mov</code>).  With
1847 <guilabel>split by video content</guilabel> DCP-o-matic makes a new
1848 reel to hold each video file.
1849 </para>
1850
1851 <para>
1852 <guilabel>Custom</guilabel> splits reels by the size of the files that
1853 will make up their video content.  With <guilabel>Custom</guilabel>
1854 you must specify a reel length in Gb.  Then no file in the DCP will be larger than this reel length.
1855 </para>
1856
1857 </section>
1858
1859
1860 <!-- ============================================================== -->
1861 <section xml:id="sec-show-audio">
1862 <title>Show audio</title>
1863
1864 <para>
1865 The <guilabel>Show Audio</guilabel> button will instruct DCP-o-matic
1866 to examine the audio in your content and plot a graph of its level
1867 over time.  This can be useful for getting a rough idea of how loud
1868 the sound will be in the cinema auditorium.  A typical plot is shown
1869 in <xref linkend="fig-audio-plot"/>
1870 </para>
1871
1872 <figure id="fig-audio-plot">
1873   <title>Audio plot</title>
1874   <mediaobject>
1875     <imageobject>
1876        <imagedata fileref="screenshots/audio-plot&scs;"/>
1877     </imageobject>
1878   </mediaobject>
1879 </figure>
1880
1881 <para>
1882 The plot gives the audio level (vertical axis, in dB) with time
1883 (horizontal axis).  0dB represents full scale, so if there is anything
1884 near this you are in danger of clipping the projector's audio outputs.
1885 </para>
1886
1887 <para>
1888 There are two plot types: the peak level and the RMS, which can be
1889 shown or hidden using the check-boxes on the right hand side of the
1890 window.
1891 </para>
1892
1893 <para>
1894 The channel check-boxes will show or hide the plot(s) for
1895 the corresponding channels in the DCP.
1896 </para>
1897
1898 <para>
1899 The smoothing slider applies a variable degree of temporal smoothing
1900 to the plots, which can make them easier to read in some cases.
1901 </para>
1902
1903 <para>
1904 Obviously the audio plot is no substitute for listening in an
1905 auditorium, but it can be useful to get levels in the right rough area.
1906 </para>
1907
1908 </section>
1909
1910 </chapter>
1911
1912
1913 <!-- ============================================================== -->
1914 <chapter xml:id="ch-templates" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1915 <title>Templates</title>
1916
1917 <para>
1918 If you frequently make DCPs with similar settings you may find it
1919 useful to use templates.
1920 </para>
1921
1922 <para>
1923 Say, for example, you often make 4K feature DCPs from video files in
1924 &rsquo;scope at 25fps.  You can speed up this process by following
1925 these steps:
1926 </para>
1927
1928 <itemizedlist>
1929   <listitem>Create a film with any content and set it up how you like;
1930   in our example, set the content to scale to DCP, the DCP resolution
1931   to 4K, and so on.</listitem>
1932   <listitem>Choose <guilabel>Save as template...</guilabel> from the <guilabel>File</guilabel> menu.</listitem>
1933   <listitem>Enter a name for your template.</listitem>
1934 </itemizedlist>
1935
1936 <para>
1937 Then in the future you can create a new film, tick the
1938 <guilabel>Template</guilabel> box and choose your previously-saved
1939 template.  The basic film's settings will come from your template, and
1940 when you add some content it will take on the settings of the
1941 first similarly-typed piece of content in your template.
1942 </para>
1943
1944 <para>
1945 For example if the template has a piece of video content and some
1946 subtitles, any video that you add to the new film will take on the
1947 settings of the video in the template.  Similarly, any subtitles that
1948 you add will take on the settings of the subtitles from the template.
1949 </para>
1950
1951 <para>
1952 The following settings from the <guilabel>DCP</guilabel> tab are saved
1953 in templates:
1954 </para>
1955
1956 <itemizedlist>
1957   <listitem>&ldquo;Use ISDCF name&rdquo; checkbox</listitem>
1958   <listitem>Content type (FTR, TLR etc.)</listitem>
1959   <listitem>Container</listitem>
1960   <listitem>Resolution</listitem>
1961   <listitem>JPEG200 bandwidth</listitem>
1962   <listitem>Video frame rate</listitem>
1963   <listitem>Signed and encrypted checkboxes</listitem>
1964   <listitem>Audio channels</listitem>
1965   <listitem>Standard (Interop / SMPTE)</listitem>
1966   <listitem>Audio processor</listitem>
1967   <listitem>Reel type and length</listitem>
1968   <listitem>Upload after make DCP checkbox</listitem>
1969 </itemizedlist>
1970
1971 <para>
1972 In addition to this, the settings (but not the filenames) of any
1973 content in the template are stored, as discussed above.  The status of
1974 the <guilabel>Keep video and subtitles in sequence</guilabel> checkbox
1975 from the timeline is also preserved.
1976 </para>
1977
1978 </chapter>
1979
1980
1981
1982 <!-- ============================================================== -->
1983 <chapter xml:id="ch-encryption" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1984 <title>Encryption</title>
1985
1986 <para>
1987 It is not required that DCPs be encrypted, but they can be.  This
1988 chapter discusses the basic principles of DCP encryption, and how
1989 DCP-o-matic can create encrypted DCPs and KDMs for them.
1990 </para>
1991
1992
1993 <!-- ============================================================== -->
1994 <section>
1995 <title>Basics</title>
1996
1997 <para>
1998 DCPs can be encrypted.  This means that the picture and sound data are
1999 encoded in such a way that only cinemas &lsquo;approved&rsquo; by the
2000 DCP's creators can read them.  In particular, this means copies of the
2001 DCP can be distributed by insecure means: if an ne'er-do-well called
2002 Mallory obtains a hard drive containing an encrypted DCP, there is no
2003 way that he can play it.  Only those cinemas who receive a correct key
2004 delivery message (KDM) can play the DCP.
2005 </para>
2006
2007
2008 <!-- ============================================================== -->
2009 <section>
2010 <title>How it works</title>
2011
2012 <para>
2013 This section attempts to summarise how DCP encryption works.  You can
2014 skip it if you like.  You may need some knowledge of encryption
2015 methods to understand it.
2016 </para>
2017
2018 <para>
2019 We suppose that we are trying to send a DCP to
2020 Alice's cinema without a troublemaker called Mallory being able to
2021 watch it himself.
2022 </para>
2023
2024 <para>
2025 There are two main families of encryption techniques.  The first,
2026 symmetric-key encryption, allows us to encode some data using some
2027 numeric key.  After encoding, no-one can decode the data unless they
2028 know the key.
2029 </para>
2030
2031 <para>
2032 The first step in a DCP encryption is to encode its data with some key
2033 using symmetric-key encryption.  The encrypted DCP can then be sent
2034 anywhere, safe in the knowledge that even if Mallory got hold of a
2035 copy, he could not decrypt it.
2036 </para>
2037
2038 <para>
2039 Alice, however, needs to know the key so she can play the DCP in her
2040 cinema.  A simple approach might be for us to send Alice the key.
2041 However, if Mallory can intercept the DCP, he might also be able to
2042 intercept our communication of the key to Alice.  Furthermore, if Alice
2043 happened to know Mallory, she could just send him a copy of the key.
2044 </para>
2045
2046 <para>
2047 The clever bit in the process requires the use of public-key
2048 encryption.  With this technique we can encrypt a block of data using
2049 some &lsquo;public&rsquo; key.  That data can then only be decrypted
2050 using a corresponding private key which is
2051 <emphasis>different</emphasis> to the public key.  The private and
2052 public keys form a pair which are related mathematically, but it is
2053 extremely hard (or rather, virtually impossible) to derive the private
2054 key from the public key.
2055 </para>
2056
2057 <para>
2058 Public-key encryption allows us to distribute the DCP's key to Alice
2059 securely.  The manufacturer of Alice's projector generates a public
2060 and private key.  They hide the private key inside the projector where
2061 no-one can read it.  They then make the public key available to anyone
2062 who is interested.
2063 </para>
2064
2065 <para>
2066 DCP-o-matic has a similar arrangement except that it stores its
2067 private keys in the user's configuration file. See <xref
2068 linkend="sec-decrypting"/> for details of how to share DCP-o-matic's
2069 certificate so that others can make encrypted DCPs for DCP-o-matic.
2070 </para>
2071
2072 <para>
2073 We take our DCP's symmetric key and encrypt it using the public key of
2074 Alice's projector.  We send the result to Alice over email (using a
2075 format called a Key Delivery Message, or KDM).  Her projector then
2076 decrypts our message using its private key, yielding the magic
2077 symmetric key which can decrypt the DCP.
2078 </para>
2079
2080 <para>
2081 If is fine if Mallory intercepts our email to Alice, since the only
2082 key which can decrypt the message is the private key buried inside
2083 Alice's projector.  The projector manufacturer is very careful that
2084 no-one ever finds out what this key is.  Our DCP is secure: only Alice
2085 can play it back, since only her projector knows the key (even Alice
2086 does not).
2087 </para>
2088
2089 </section>
2090 </section>
2091
2092
2093 <!-- ============================================================== -->
2094 <section>
2095 <title>Encryption using DCP-o-matic</title>
2096
2097 <para>
2098 There are two steps to distributing an encrypted DCP.  First, the
2099 DCP's data must be encrypted, and secondly KDMs must be generated for
2100 those cinemas that are allowed to play the DCP.
2101 </para>
2102
2103 <para>
2104 The first part is simple: ticking the <guilabel>Encrypted</guilabel>
2105 box in the <guilabel>DCP</guilabel> tab will instruct DCP-o-matic to
2106 encrypt the DCP that it makes using a random key that DCP-o-matic
2107 generates.  The key will be written to the film's metadata file, which
2108 should be kept secure.
2109 </para>
2110
2111 <para>
2112 A DCP that is generated with the <guilabel>Encrypted</guilabel> box
2113 ticked will not play on any projector as-is (it will be marked as
2114 &lsquo;locked&rsquo;, or whatever the projector manufacturer's term
2115 is).
2116 </para>
2117
2118 <para>
2119 The second part of distributions is to generate KDMs for the cinemas
2120 that you wish to allow to play your DCP.  There are two approaches to
2121 this within DCP-o-matic: using the project, or using a DKDM.  These
2122 approaches are now described in turn.
2123 </para>
2124
2125 <section>
2126 <title>Creating KDMs from a DCP-o-matic project</title>
2127
2128 <para>
2129 You can create KDMs from inside a DCP-o-matic project using the
2130 <guilabel>Make KDMs</guilabel> option on the <guilabel>Jobs</guilabel>
2131 menu.  This will open the KDM dialogue box, as shown in <xref
2132 linkend="fig-kdm"/>.
2133 </para>
2134
2135 <figure id="fig-kdm">
2136   <title>KDM dialog</title>
2137   <mediaobject>
2138     <imageobject>
2139       <imagedata scale="40" fileref="screenshots/kdm&scs;"/>
2140     </imageobject>
2141   </mediaobject>
2142 </figure>
2143
2144 <para>
2145 In order to generate KDMs for a particular projector, you need to know
2146 its <emphasis>certificate</emphasis>.  These are usually made
2147 available by the projector manufacturers as text files with a
2148 <code>.pem</code> extension.
2149 </para>
2150
2151 <para>
2152 DCP-o-matic can store these certificates along with details of their
2153 cinemas and screens within those cinemas.  Each screen has a
2154 certificate for its projector (and optionally certificates for other
2155 trusted devices, such as the sound processor).  DCP-o-matic can
2156 generate KDMs for any screens that it knows about.
2157 </para>
2158
2159 <para>
2160 To add a cinema, click <guilabel>Add Cinema...</guilabel>.  This opens
2161 a dialogue box into which you can enter the cinema's name, and
2162 optionally an email address.  This email address can be used to
2163 get DCP-o-matic to deliver KDMs via email.
2164 </para>
2165
2166 <para>
2167 Once you have added a cinema, select it by clicking on its name, then
2168 click <guilabel>Add Screen...</guilabel>.  The resulting dialogue
2169 allows you to enter a name for the screen and load in its certificate
2170 from a file.  The certificate should be in SHA256 PEM format.
2171 </para>
2172
2173 <para>
2174 Alternatively, certificates for projection systems made by some
2175 manufacturers can be downloaded from databases provided by the
2176 manufacturer.  Currently this is supported for Doremi and Dolby
2177 equipment.  If you are targeting a screen with equipment by one of
2178 these manufacturers you can click <guilabel>Download</guilabel> then
2179 enter the serial number of the server in the screen and click
2180 <guilabel>Download</guilabel> again and, all being well, the certificate
2181 will be fetched.
2182 </para>
2183
2184 <para>
2185 Using the download system you will need to know the serial number of
2186 the media server in use in the screen.  Most cinema projection or
2187 technical departments will know these serial numbers.
2188 </para>
2189
2190 <para>
2191 Note that the reliability of the manufacturers' certificate databases
2192 cannot be guaranteed.  It is vital that KDMs are tested by the
2193 destination cinema will in advance of show time to identify any
2194 problems.
2195 </para>
2196
2197 <para>
2198 Once you have set up all the screens that you need KDMs for, select
2199 the CPL that you want to create the KDM for.  You can use the
2200 drop-down list to select the CPLs in the current film project, or load
2201 a CPL from somewhere else.  Select the cinemas and/or screens that you
2202 want KDMs for and fill in the start and end dates and times.
2203 </para>
2204
2205 <para>
2206 You must also select the type of KDM that you want to generate.  If in
2207 doubt, use <guilabel>Modified Transitional 1</guilabel>.
2208 </para>
2209
2210 <note>
2211 The differences between the three KDM types are fairly subtle.
2212 <guilabel>DCI Specific</guilabel> and <guilabel>DCI Any</guilabel> add
2213 a <code>&lt;ContentAuthenticator&gt;</code> tag to the KDM which
2214 allows the exhibitor to check that the DCP and KDM have come from a
2215 bona-fide source.  In addition, <guilabel>DCI Specific</guilabel> adds
2216 information on trusted devices to the KDM.  This allows the KDM
2217 creator to specify devices (such as sound processors) that are allowed
2218 to use keys delivered by the KDM.  At present it is not clear how
2219 widely the <guilabel>DCI Specific</guilabel> and <guilabel>DCI
2220 Any</guilabel> features are supported (or even tolerated) by servers
2221 so you are advised to use <guilabel>Modified Transitional
2222 1</guilabel>.
2223 </note>
2224
2225 <para>
2226 Finally, choose what you want to do with the KDMs.  They can be
2227 written to disk, to a location that you can specify by clicking
2228 <guilabel>Browse</guilabel>.  Alternatively, if you choose
2229 <guilabel>Send by email</guilabel> the KDMs will be zipped up and
2230 emailed to the appropriate cinema email addresses.  Click
2231 <guilabel>Make KDMs</guilabel> to generate the KDMs.
2232 </para>
2233
2234 </section>
2235
2236 <section>
2237 <title>Creating KDMs using a DKDM</title>
2238 </section>
2239
2240 <para>
2241 It can be inconvenient to need a whole DCP-o-matic project just to
2242 create KDMs for its film.  Perhaps you want to archive the project to
2243 save space, or create KDMs on a different machine.  In such situations
2244 it is easier to use a DKDM.  This is a normal KDM, but instead of
2245 being targeted at a projection system (to allow it to decrypt the
2246 content) it is targeted at a particular user's certificate.  This
2247 means that the certificate owner can create new KDMs for other users.
2248 The DKDM holds everything that is required to create further KDMs.
2249 </para>
2250
2251 <para>
2252 Sometimes it is useful to create DKDMs that can be used by
2253 DCP-o-matic.  If you create such a DKDM you can keep it and then, at
2254 any point in the future, use DCP-o-matic's standalone KDM creator to
2255 make KDMs for the DKDM's film for any cinema.
2256 </para>
2257
2258 <para>
2259 In other cases a DKDM is sent to a 3rd party so that they can create
2260 KDMs for your films.  This can be useful if, for example, you have a
2261 distributor who provides 24-hour KDM support to cinemas and can create
2262 KDMs for anybody that requires them at short notice.
2263 </para>
2264
2265 <para>
2266 To create a DKDM for DCP-o-matic, open your encrypted project and
2267 select <guilabel>Make DKDM for DCP-o-matic...</guilabel> from the
2268 <guilabel>Jobs</guilabel> menu.  Select the CPL that you want to make
2269 the DKDM for and click <guilabel>OK</guilabel>.  This DKDM will then
2270 be available in the KDM creator.  This is a separate program which you
2271 can start from the same place that you start the &lsquo;normal&rsquo;
2272 DCP-o-matic.  Its window is shown in <xref linkend="fig-kdm-creator"/>.
2273 </para>
2274
2275 <figure id="fig-kdm-creator">
2276   <title>The KDM creator</title>
2277   <mediaobject>
2278     <imageobject>
2279       <imagedata scale="35" fileref="screenshots/kdm-creator&scs;"/>
2280     </imageobject>
2281   </mediaobject>
2282 </figure>
2283
2284 <para>
2285 To create KDMs, select the cinema(s) and/or screens that you want KDMs
2286 to be created for, the date range, the DCP that the KDMs are for and
2287 the destination for the KDMs and click <guilabel>Create
2288 KDMs</guilabel>.
2289 </para>
2290
2291 <para>
2292 By default the <guilabel>DKDM</guilabel> list will list any DCPs for
2293 which you have clicked <guilabel>Make DKDM for
2294 DCP-o-matic</guilabel>in the main DCP-o-matic program.  If you have
2295 other DKDMs you can add them by clicking <guilabel>Add...</guilabel> and
2296 specifying the file containing the DKDM.
2297 </para>
2298
2299 <para>
2300 If another organisation wants to send you a DKDM they will ask you for
2301 a target certificate.  You can get DCP-o-matic's target certificate by
2302 opening <guilabel>Preferences</guilabel> and clicking <guilabel>Export
2303 DCP decryption certificate...</guilabel> in the <guilabel>Keys</guilabel>
2304 tab.
2305
2306 </para>
2307
2308 </section>
2309
2310 <section>
2311 <title>Encryption keys</title>
2312
2313 <para>
2314   You must be careful when using encryption not to lose important keys.
2315 </para>
2316
2317 <para>
2318 If you are making KDMs from a DCP-o-matic film you
2319 <emphasis>must</emphasis> ensure that you have a backup of the
2320 <code>metadata.xml</code> file from the project, as well as the DCP
2321 itself.
2322 </para>
2323
2324 <para>
2325 If you are using a DKDM you <emphasis>must</emphasis> ensure that you
2326 have a backup of DCP-o-matic's <code>config.xml</code> file, since it
2327 contains the only key which can decrypt the DKDM.  The
2328 <code>config.xml</code> file location depends on your operating
2329 system; possible locations are listed in <xref linkend="ch-config"/>
2330 </para>
2331
2332 </section>
2333
2334 <section>
2335 <title>Encryption overview</title>
2336
2337 <figure id="fig-encryption-overview">
2338   <title>Overview of encryption</title>
2339   <mediaobject>
2340     <imageobject>
2341       <imagedata fileref="diagrams/crypt&dia;"/>
2342     </imageobject>
2343   </mediaobject>
2344 </figure>
2345
2346 </section>
2347 </chapter>
2348
2349
2350
2351 <!-- ============================================================== -->
2352 <chapter xml:id="ch-preferences" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
2353 <title>Preferences</title>
2354
2355 <para>
2356 DCP-o-matic provides a few preferences which can be used to modify its
2357 behaviour.  This chapter explains those options.
2358 </para>
2359
2360 <para>
2361 Preferences can be edited by choosing
2362 <guilabel>Preferences...</guilabel> from the <guilabel>Edit</guilabel>
2363 menu.  This opens a dialogue which is split into seven tabs.
2364 </para>
2365
2366 <!-- ============================================================== -->
2367 <section>
2368 <title>General</title>
2369
2370 <para>
2371 The general tab is shown in <xref linkend="fig-prefs-general"/>.
2372 </para>
2373
2374 <figure id="fig-prefs-general">
2375   <title>General preferences</title>
2376   <mediaobject>
2377     <imageobject>
2378       <imagedata fileref="screenshots/prefs-general&scs;"/>
2379     </imageobject>
2380   </mediaobject>
2381 </figure>
2382
2383
2384 <!-- ============================================================== -->
2385 <section>
2386 <title>Language</title>
2387
2388 <para>
2389 If you tick the <guilabel>Set Language</guilabel> checkbox and choose
2390 a language from the list, that language will be used for DCP-o-matic.
2391 You will need to restart DCP-o-matic to see the new language.
2392 </para>
2393
2394 <para>
2395 The translations for DCP-o-matic have been contributed by helpful
2396 users.  If your language is not on the last, head to <ulink
2397 url="http://dcpomatic.com/i18n.php">the DCP-o-matic website</ulink> to
2398 read about how to contribute a translation.
2399 </para>
2400 </section>
2401
2402
2403 <!-- ============================================================== -->
2404 <section>
2405 <title>Number of threads DCP-o-matic should use</title>
2406
2407 <para>
2408 When DCP-o-matic is encoding DCPs it can use multiple parallel threads
2409 to speed things up.  Set this value to the number of threads
2410 DCP-o-matic should use.  This should normally be the number of
2411 processors (or processor cores) in your machine.  DCP-o-matic will try
2412 to set this up correctly when you run it for the first time.
2413 </para>
2414
2415 </section>
2416
2417
2418 <!-- ============================================================== -->
2419 <section>
2420 <title>Number of threads DCP-o-matic encode server should use</title>
2421
2422 <para>
2423 This is the number of threads that the encode server should use when
2424 it is running and helping another copy of DCP-o-matic to speed up its
2425 encode.
2426 </para>
2427
2428 </section>
2429
2430
2431 <!-- ============================================================== -->
2432 <section>
2433 <title>Configuration file</title>
2434
2435 <para>
2436 This is the location of DCP-o-matic's configuration file on disk.  You
2437 can use this to share configuration between several copies of
2438 DCP-o-matic, across a network share, for instance.
2439 </para>
2440 </section>
2441
2442 <!-- ============================================================== -->
2443 <section>
2444 <title>Cinema and screen database file</title>
2445
2446 <para>
2447 This option allows you to change the file that DCP-o-matic uses to
2448 store details of the cinemas and screens used to make KDMs.
2449 </para>
2450 </section>
2451
2452
2453 <!-- ============================================================== -->
2454 <section>
2455 <title>Play sound via</title>
2456
2457 <para>
2458 The checkbox to the left of <guilabel>Play sound</guilabel> enables or
2459 disables DCP-o-matic use of sound.  On some machines there will be
2460 multiple options in the drop-down menu to decide how the sound should
2461 be played.
2462 </para>
2463 </section>
2464
2465 <!-- ============================================================== -->
2466 <section>
2467 <title>Integrated loudness</title>
2468
2469 <para>
2470 If <guilabel>Find integrated loudness, true peak and loudness range
2471 when analysing audio</guilabel> is ticked, DCP-o-matic will do extra
2472 work when analysing audio.  Leave this ticked if the extra parameters
2473 are useful to you.  If not, untick it and audio analysis will be
2474 faster.
2475 </para>
2476
2477 </section>
2478
2479 <!-- ============================================================== -->
2480 <section>
2481 <title>Automatically analyse content audio</title>
2482
2483 <para>
2484 If this checkbox is ticked an audio analysis will be run whenever content is added that contains sound.
2485 </para>
2486 </section>
2487
2488 <!-- ============================================================== -->
2489 <section>
2490 <title>Updates</title>
2491
2492 <para>
2493 The <guilabel>Check for updates on startup</guilabel> option, if
2494 enabled, will tell DCP-o-matic to check on <ulink
2495 url="http://dcpomatic.com/">dcpomatic.com</ulink> to see if there any
2496 newer versions of DCP-o-matic then the one you are running.  If so, a
2497 dialogue box will open with a link to download the new version.
2498 available
2499 </para>
2500
2501 <para>
2502 The <guilabel>Check for testing updates as well as stable
2503 ones</guilabel> option will also check for test updates as well as
2504 those that are formally &lsquo;released&rsquo;. This is useful if you
2505 like to live on the bleeding edge!
2506 </para>
2507 </section>
2508
2509 <!-- ============================================================== -->
2510 <section>
2511 <title>Issuer and creator</title>
2512
2513 <para>
2514 With these controls you can set the issuer and creator strings that
2515 will be put into the DCPs which you create.
2516 </para>
2517 </section>
2518
2519 </section>
2520
2521 <!-- ============================================================== -->
2522 <section>
2523 <title>Defaults</title>
2524
2525 <para>
2526 The defaults tab is shown in <xref linkend="fig-prefs-defaults"/>.
2527 </para>
2528
2529 <figure id="fig-prefs-defaults">
2530   <title>Defaults preferences</title>
2531   <mediaobject>
2532     <imageobject>
2533       <imagedata fileref="screenshots/prefs-defaults&scs;"/>
2534     </imageobject>
2535   </mediaobject>
2536 </figure>
2537
2538 <para>
2539 The options in this tab simply allow you to set up default values for
2540 various properties of new films.
2541 </para>
2542
2543 </section>
2544
2545 <!-- ============================================================== -->
2546 <section>
2547 <title>Servers</title>
2548
2549 <para>
2550 The servers tab is shown in <xref linkend="fig-prefs-servers"/>.
2551 </para>
2552
2553 <figure id="fig-prefs-servers">
2554   <title>Servers preferences</title>
2555   <mediaobject>
2556     <imageobject>
2557       <imagedata fileref="screenshots/prefs-servers&scs;"/>
2558     </imageobject>
2559   </mediaobject>
2560 </figure>
2561
2562 <para>
2563 If <guilabel>Use all servers</guilabel> is ticked DCP-o-matic will
2564 locate encoding servers automatically (see <xref
2565 linkend="ch-servers"/>).
2566 </para>
2567
2568 <para>
2569 Instead of this (or in addition) servers can be specified explicitly.
2570 To add a server, click <guilabel>Add...</guilabel> and enter the host
2571 name or IP address of the server to use.
2572 </para>
2573
2574 </section>
2575
2576
2577 <!-- ============================================================== -->
2578 <section xml:id="sec-prefs-keys">
2579 <title>Keys</title>
2580
2581 <para>
2582 The Keys tab (shown in <xref linkend="fig-prefs-keys"/>) has controls
2583 related to the keys and certificates used in some parts of DCP
2584 creation.
2585 </para>
2586
2587 <figure id="fig-prefs-keys">
2588   <title>Keys preferences</title>
2589   <mediaobject>
2590     <imageobject>
2591       <imagedata fileref="screenshots/prefs-keys&scs;"/>
2592     </imageobject>
2593   </mediaobject>
2594 </figure>
2595
2596 <para>
2597 <guilabel>Export KDM decryption certificate...</guilabel> allows you
2598 to save the certificate that DCP-o-matic uses when decrypting KDMs
2599 that you give it.  Use this option if somebody wants to make a KDM for
2600 you and asks for your certificate.
2601 </para>
2602
2603 <para>
2604 <guilabel>Export KDM decryption chain...</guilabel> exports the whole
2605 KDM decryption chain rather than just its certificate.  This may also
2606 be requested by KDM creators.
2607 </para>
2608
2609 <para>
2610 <guilabel>Export all KDM decryption settings...</guilabel> exports a
2611 file which contains all the DCP-o-matic settings related to the use of
2612 KDMs supplied by other people.  Use this button and <guilabel>Import
2613 all KDM decryption settings...</guilabel> to transfer settings between
2614 different copies of DCP-o-matic so that they can both use the same
2615 KDMs.
2616 </para>
2617
2618 <para>
2619 The two <guilabel>Advanced...</guilabel> buttons open advanced
2620 dialogue boxes for detailed manipulation of DCP-o-matic's certificate
2621 chains.
2622 </para>
2623
2624 </section>
2625
2626 <section>
2627 <title>Advanced keys settings</title>
2628
2629 <para>
2630 At the top of the <guilabel>Advanced</guilabel> dialogue for signing
2631 DCPs and KDMs is the chain of certificates that will be used to sign
2632 DCPs and KDMs.  DCP-o-matic creates a random chain when you first run
2633 it and if you are happy to use this chain you can ignore the
2634 preferences.  Otherwise, you can add or remove certificates from the
2635 chain using the <guilabel>Add...</guilabel> and
2636 <guilabel>Remove</guilabel> buttons.
2637 </para>
2638
2639 <para>
2640 If you want DCP-o-matic to re-create the certificate chain (using new,
2641 random certificates) click <guilabel>Re-make
2642 certificates...</guilabel> and specify your organisation and common
2643 names in the dialogue box that opens.
2644 </para>
2645
2646 <para>
2647 Underneath the certificate chain is the private key that corresponds
2648 to the leaf certificate in the chain.  You can specify your own
2649 private key by clicking <guilabel>Load...</guilabel>.  You must do
2650 this if you change the leaf certificate, so that the leaf private key
2651 corresponds to the public key held in the leaf certificate.
2652 </para>
2653
2654 <para>
2655 At the top of the <guilabel>Advanced</guilabel> dialogue for decrypting DCPs is the chain and key which is used by
2656 DCP-o-matic when you import an encrypted DCP as a piece of content.
2657 The leaf certificate of this chain contains the public key that should
2658 be used when targeting a KDM at DCP-o-matic.
2659 </para>
2660
2661
2662 <para>
2663 If you want to import an encrypted DCP you will need to give the
2664 decryption certificate to the distributor of the DCP so that they can
2665 generate a DKDM for you.  You can save this certificate to disk by
2666 clicking <guilabel>Export DCP decryption certificate...</guilabel>.
2667 As with the signing chain, DCP-o-matic will create a certificate chain
2668 and private key for you.  You can also choose to load your own
2669 certificates and key or re-make the chain and key with new, random
2670 values.
2671 </para>
2672
2673 <para>
2674 Clicking <guilabel>Export DCP decryption chain...</guilabel> will
2675 export the whole certificate chain, rather than just the leaf
2676 certificate.
2677 </para>
2678
2679 </section>
2680
2681 <!-- ============================================================== -->
2682 <section xml:id="sec-prefs-tms">
2683 <title>TMS</title>
2684 <titleabbrev xml:id="sec-prefs-tms-short">TMS preferences</titleabbrev>
2685
2686 <para>
2687 The TMS tab (shown in <xref linkend="fig-prefs-tms"/>) gives some
2688 options for specifying details about your theatre management system
2689 (TMS).  If you do this, and your TMS accepts SSH or FTP connections,
2690 you can upload DCPs directly from DCP-o-matic to the TMS using the
2691 <guilabel>Send DCP to TMS</guilabel> option in the
2692 <guilabel>Jobs</guilabel> menu.
2693 </para>
2694
2695 <figure id="fig-prefs-tms">
2696   <title>TMS preferences</title>
2697   <mediaobject>
2698     <imageobject>
2699       <imagedata fileref="screenshots/prefs-tms&scs;"/>
2700     </imageobject>
2701   </mediaobject>
2702 </figure>
2703
2704 <para>
2705 <guilabel>Protocol</guilabel> should be set to SCP or FTP as
2706 appropriate for your TMS.  We know that the Arts Alliance Media (AAM)
2707 and the Doremi ranges uses SCP connections, and that Dolby's TMSs use
2708 FTP.  Do let us know if you use any other type of TMS with the
2709 <guilabel>Send DCP to TMS</guilabel> feature.
2710 </para>
2711
2712 <para>
2713 <guilabel>TMS IP address</guilabel> should be set to the IP address of
2714 your TMS, <guilabel>TMS target path</guilabel> to the place that DCPs
2715 should be uploaded to (which will be relative to the home directory of
2716 the SSH or FTP user).  Finally, the user name and password are the
2717 credentials required to log into the TMS via SSH or FTP.
2718 </para>
2719
2720 <para>
2721 Note that for this to work on Doremi servers you will need to set the
2722 <code>PasswordAuthentication</code> option in your server's
2723 <code>sshd_config</code> to <code>yes</code>.
2724 </para>
2725
2726 </section>
2727
2728
2729 <!-- ============================================================== -->
2730 <section>
2731 <title>KDM email</title>
2732
2733 <para>
2734 The KDM email is shown in <xref linkend="fig-prefs-kdm-email"/>.
2735 </para>
2736
2737 <figure id="fig-prefs-kdm-email">
2738   <title>KDM email preferences</title>
2739   <mediaobject>
2740     <imageobject>
2741       <imagedata fileref="screenshots/prefs-kdm-email&scs;"/>
2742     </imageobject>
2743   </mediaobject>
2744 </figure>
2745
2746 <para>
2747 This is a template for the email that is used to send KDMs out to
2748 cinemas.  You can change it to say whatever you like.  A few
2749 &lsquo;magic&rsquo; strings will be replaced by information from the
2750 KDM that is being sent:
2751 </para>
2752
2753 <table>
2754 <title>&lsquo;Magic&rsquo; KDM strings</title>
2755 <tgroup cols='2' align='left' colsep='1' rowsep='1'>
2756 <tbody>
2757 <row>
2758 <entry><code>$CPL_NAME</code></entry><entry>DCP title</entry>
2759 </row>
2760 <row>
2761 <entry><code>$CINEMA_NAME</code></entry><entry>Cinema name</entry>
2762 </row>
2763 <row>
2764 <entry><code>$SCREENS</code></entry><entry>Name of screen or screens that KDMs are being generated for</entry>
2765 </row>
2766 <row>
2767 <entry><code>$START_TIME</code></entry><entry>The time from which the KDMs are valid</entry>
2768 </row>
2769 <row>
2770 <entry><code>$END_TIME</code></entry><entry>The time until which the KDMs are valid</entry>
2771 </row>
2772 </tbody>
2773 </tgroup>
2774 </table>
2775
2776 <para>
2777 The <guilabel>Reset to default text</guilabel> will replace the current KDM email with DCP-o-matic's default.
2778 </para>
2779
2780 </section>
2781
2782
2783 <!-- ============================================================== -->
2784 <section>
2785 <title>Cover sheet</title>
2786
2787 <para>
2788 The DCP cover sheet configuration is shown in <xref linkend="fig-prefs-cover-sheet"/>.
2789 </para>
2790
2791 <figure id="fig-prefs-cover-sheet">
2792   <title>DCP cover sheet preferences</title>
2793   <mediaobject>
2794     <imageobject>
2795       <imagedata fileref="screenshots/prefs-cover-sheet&scs;"/>
2796     </imageobject>
2797   </mediaobject>
2798 </figure>
2799
2800 <para>
2801 This is a template for the cover sheet that is written next to every DCP that DCP-o-matic creates.  You can change it to say whatever you like.  A few
2802 &lsquo;magic&rsquo; strings will be replaced by information from the
2803 DCP that has been made:
2804 </para>
2805
2806 <table>
2807 <title>&lsquo;Magic&rsquo; Cover sheet strings</title>
2808 <tgroup cols='2' align='left' colsep='1' rowsep='1'>
2809 <tbody>
2810 <row>
2811 <entry><code>$CPL_NAME</code></entry><entry>DCP title</entry>
2812 </row>
2813 <row>
2814 <entry><code>$TYPE</code></entry><entry>DCP content type (e.g. feature, trailer...)</entry>
2815 </row>
2816 <row>
2817 <entry><code>$CONTAINER</code></entry><entry>The container ratio (e.g. flat, scope...)</entry>
2818 </row>
2819 <row>
2820 <entry><code>$AUDIO</code></entry><entry>Details of the audio channels</entry>
2821 </row>
2822 <row>
2823 <entry><code>$AUDIO_LANGUAGE</code></entry><entry>Audio language</entry>
2824 </row>
2825 <row>
2826 <entry><code>$SUBTITLE_LANGUAGE</code></entry><entry>Subtitle language</entry>
2827 </row>
2828 <row>
2829 <entry><code>$LENGTH</code></entry><entry>DCP length in hours, minutes and seconds</entry>
2830 </row>
2831 <row>
2832 <entry><code>$SIZE</code></entry><entry>DCP size in gigabytes</entry>
2833 </row>
2834 </tbody>
2835 </tgroup>
2836 </table>
2837
2838 <para>
2839 The <guilabel>Reset to default text</guilabel> will replace the current cover sheet with DCP-o-matic's default.
2840 </para>
2841
2842 </section>
2843
2844
2845 <!-- ============================================================== -->
2846 <section xml:id="sec-prefs-advanced">
2847 <title>Advanced</title>
2848 <titleabbrev xml:id="sec-prefs-advanced-short">Advanced preferences</titleabbrev>
2849
2850 <para>
2851 The advanced preferences are shown in <xref linkend="fig-prefs-advanced"/>.
2852 </para>
2853
2854 <figure id="fig-prefs-advanced">
2855   <title>Advanced preferences</title>
2856   <mediaobject>
2857     <imageobject>
2858       <imagedata fileref="screenshots/prefs-advanced&scs;"/>
2859     </imageobject>
2860   </mediaobject>
2861 </figure>
2862
2863 <para>
2864 <guilabel>Maximum JPEG2000 bandwidth</guilabel> specifies the maximum
2865 bit-rate of JPEG2000 that DCP-o-matic will allow you to create.  You
2866 are advised to leave this at 250Mbit/s in normal use for maximum DCP
2867 compatibility.
2868 </para>
2869
2870 <para>
2871 <guilabel>Allow any DCP frame rate</guilabel> removes the limits on
2872 the DCP video frame rates that DCP-o-matic will create.  This may be
2873 useful for experimentation.  Again, you are strongly advised to leave
2874 this unticked for normal use.
2875 </para>
2876
2877 <para>
2878 <guilabel>Only servers encode</guilabel> makes DCP-o-matic encode
2879 JPEG2000 data only on encoding servers and not on the host.  We
2880 suggest you leave this unticked unless you have a good reason to do otherwise.
2881 </para>
2882
2883 <para>
2884 With the filename format fields you can adjust the filenames that are
2885 used for metadata (CPL and PKL files) and assets (MXF and subtitle
2886 files).  Below each field there is a list of the &lsquo;magic&rsquo;
2887 values that you can use in the format and an example of a filename
2888 that you might see with your current settings.
2889 </para>
2890
2891 <para>
2892 The four checkboxes labelled <guilabel>Log</guilabel> control what
2893 sort of messages DCP-o-matic writes to its log file when creating a
2894 DCP.  It is useful to leave <guilabel>General</guilabel>,
2895 <guilabel>Warnings</guilabel> and <guilabel>Errors</guilabel> ticked
2896 as this makes the log files useful for tracking down bugs.
2897 </para>
2898
2899 <para>
2900 The <guilabel>Timing</guilabel> checkbox will enable extra log entries
2901 to allow developers to investigate and optimise the speed of
2902 DCP-o-matic.  It will significantly increase the size of the log files
2903 that are generated, so in normal use it is best to leave this
2904 unticked.
2905 </para>
2906
2907 </section>
2908 </chapter>
2909
2910 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en" xml:id="ch-frame-rates">
2911 <title>Frame rates</title>
2912
2913 <para>
2914 In an ideal world, a DCP would be created using content at the same
2915 video frame and audio sampling rates as the DCP.  This is not,
2916 however, always possible.
2917 </para>
2918
2919
2920 <!-- ============================================================== -->
2921 <section>
2922 <title>DCP frame rate limitations</title>
2923
2924 <para>
2925 There are some limitations to video and audio frame rates in DCPs.  This is
2926 complicated by the fact that not all projectors will play DCPs at the
2927 same frame rates.  It is possible to create a DCP which one projector will
2928 play fine, but another (of a different type) will refuse to play, or
2929 even refuse to ingest.
2930 </para>
2931
2932
2933 <!-- ============================================================== -->
2934 <section>
2935 <title>Guaranteed rates</title>
2936
2937 <para>
2938 The only rates that are (pretty much) guaranteed to work on all DCI
2939 projectors are 24 frames per second (fps) for video and 48kHz or 96kHz
2940 for audio.  If you are sending your DCPs to unknown places it wise to
2941 consider using these rates if at all possible.
2942 </para>
2943
2944 </section>
2945
2946
2947 <!-- ============================================================== -->
2948 <section>
2949 <title>Other often-supported rates</title>
2950 <para>
2951 Many projectors now in the wild support additional video frame rates:
2952 25, 30 and 48 fps.
2953 </para>
2954 </section>
2955
2956
2957 <!-- ============================================================== -->
2958 <section>
2959 <title>Adapting content to fit the DCP rate</title>
2960
2961 <para>
2962 DCP-o-matic has a few tricks to allow you to use content that is not
2963 in one of the &lsquo;approved&rsquo; rates.
2964 </para>
2965
2966 <para>
2967 Audio is easy: DCP-o-matic can resample to 48kHz from any source rate
2968 with minimal loss in quality.
2969 </para>
2970
2971 <para>
2972 Video rate conversion is harder.  DCP-o-matic's basic strategy to deal
2973 with a non-supported content rate is to run it at the wrong speed, and
2974 to adjust the audio to keep it in sync.
2975 </para>
2976
2977 <para>Let us consider the example of a 25fps source for which you want
2978 to create a 24fps DCP.  DCP-o-matic will put the frames from the
2979 source directly into the DCP without modification, but will tell the
2980 projector to play them back at 24fps.  This means that the DCP's video
2981 will run slightly slower than the original.
2982 </para>
2983
2984 <para>
2985 If DCP-o-matic did nothing else, the result of this would be that the
2986 audio would be running at the original speed with the video running
2987 slowly.  Hence the audio would drift slowly out of sync.  To avoid
2988 this, DCP-o-matic also resamples the audio such that the projector
2989 will play it too slow by the same amount.  Hence it will sound
2990 slightly different but will remain in sync with the video.
2991 </para>
2992
2993 <para>
2994 For very low or high frame rates, DCP-o-matic can also skip or duplicate frames.
2995 </para>
2996
2997 </section>
2998 </section>
2999
3000
3001 <!-- ============================================================== -->
3002 <section>
3003 <title>Setting up</title>
3004
3005 <para>
3006 The <guilabel>Frame Rate</guilabel> control in the
3007 <guilabel>DCP</guilabel> tab sets the video frame rate that the DCP
3008 will use.  Clicking <guilabel>Use best</guilabel> sets the rate to
3009 what DCP-o-matic thinks is the best for your content.  With this
3010 button, DCP-o-matic assumes that the whole range of frame rates (24,
3011 25, 30 and 48fps) are allowable.
3012 </para>
3013
3014 <para>
3015 After this, the <guilabel>Video</guilabel> tab for each piece of
3016 content will give a summary of what DCP-o-matic is doing with that
3017 content.
3018 </para>
3019
3020 <para>
3021 If you want to experiment with other non-standard frame rates, you can
3022 do so by ticking the <guilabel>Allow any DCP frame rate</guilabel> in
3023 the <guilabel>Advanced</guilabel> tab of the preferences dialogue (see the
3024 <xref linkend="sec-prefs-advanced" endterm="sec-prefs-advanced-short"/>).  You are strongly advised to
3025 use this only on your own equipment, and only for experimentation
3026 purposes.
3027 </para>
3028
3029 </section>
3030
3031 </chapter>
3032
3033
3034 <!-- ============================================================== -->
3035 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en" xml:id="ch-servers">
3036 <title>Encoding servers</title>
3037
3038 <para>
3039 One way to increase the speed of DCP encoding is to use more
3040 than one machine at the same time.  An instance of DCP-o-matic can
3041 offload some of the time-consuming JPEG2000 encoding to any number of
3042 other machines on a network.  To do this, one &lsquo;master&rsquo;
3043 machine runs DCP-o-matic, and the &lsquo;server&rsquo; machines run
3044 a small program called <code>dcpomatic_server</code>.
3045 </para>
3046
3047 <para>
3048 The master and server machines do not need to be the same type, so you
3049 can mix Windows PCs, Macs and Linux machines as you wish.
3050 </para>
3051
3052
3053 <!-- ============================================================== -->
3054 <section>
3055 <title>Running the servers</title>
3056
3057 <para>
3058 There are two options for the encoding server;
3059 <code>dcpomatic_server_cli</code>, which runs on the command line, and
3060 <code>dcpomatic_server</code>, which has a simple GUI.  The command line
3061 version is well-suited to headless servers, especially on Linux, and
3062 the GUI version works best on Windows where it will put an icon in the
3063 system tray.
3064 </para>
3065
3066 <para>
3067 To run the command line version, simply enter:
3068 </para>
3069
3070 <programlisting>
3071 dcpomatic2_server_cli
3072 </programlisting>
3073
3074 <para>
3075 at a command prompt.  If you are running the program on a machine with
3076 a multi-core processor, you can run multiple parallel encoding threads
3077 by doing something like:
3078 </para>
3079
3080 <programlisting>
3081 dcpomatic2_server_cli -t 4
3082 </programlisting>
3083
3084 <para>
3085 to run 4 threads in parallel.
3086 </para>
3087
3088 <para>
3089 To run the GUI version on windows, run the &lsquo;DCP-o-matic encode
3090 server&rsquo; from the start menu.  An icon will appear in the system
3091 tray; right-click it to open a menu from whence you can quit the
3092 server or open a window to show its status.
3093 </para>
3094
3095 <para>If you would rather not bother installing DCP-o-matic on your
3096 server computers, the other option is to use the live-CD
3097 image that you can download from the <ulink
3098 url="http://dcpomatic.com/">DCP-o-matic web site.</ulink></para>
3099
3100 <para>Either burn the image to CD, or write it to a USB stick (using
3101 something like <ulink
3102 url="http://unetbootin.sourceforge.net/">unetbootin</ulink>).  Boot a
3103 PC from the CD or USB stick and it becomes a DCP-o-matic server
3104 without touching your standard operating system install.
3105 </para>
3106
3107 </section>
3108
3109 <!-- ============================================================== -->
3110 <section>
3111 <title>Setting up DCP-o-matic</title>
3112
3113 <para>
3114 DCP-o-matic periodically looks on the local network for servers.  Any
3115 that it finds are given work to do during encodes.  Selecting
3116 <guilabel>Encoding Servers</guilabel> from the
3117 <guilabel>Tools</guilabel> menu brings up a window which shows that
3118 servers that DCP-o-matic has found.
3119 </para>
3120
3121 </section>
3122
3123 <!-- ============================================================== -->
3124 <section>
3125 <title>Some notes about encode servers</title>
3126
3127 <para>
3128 DCP-o-matic does not mind if servers come and go; if a server
3129 disappears, DCP-o-matic will stop sending work to it, and will check
3130 it every minute or so in case it has come back online.
3131 </para>
3132
3133 <para>
3134 You will probably find that using a 1Gb/s or faster network will
3135 provide a significant speed-up compared to a 100Mb/s network.
3136 </para>
3137
3138 </section>
3139
3140 </chapter>
3141
3142 <chapter xml:id="ch-files" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
3143 <title>Generated files</title>
3144
3145 <para>
3146 DCP-o-matic generates a number of files as it makes a DCP.  <xref
3147 linkend="fig-file-structure"/> shows the files that might be generated
3148 after you have created a DCP for a film called &lsquo;DCP Test&rsquo;.
3149 </para>
3150
3151 <figure id="fig-file-structure">
3152   <title>Creating a new film</title>
3153   <mediaobject>
3154     <imageobject>
3155       <imagedata scale="100" fileref="diagrams/file-structure&dia;"/>
3156     </imageobject>
3157   </mediaobject>
3158 </figure>
3159
3160 <para>
3161 The <code>DCP Test</code> folder is the one that you specify when you
3162 select the <guilabel>New Film</guilabel> option from DCP-o-matic's
3163 menu.  Everything is stored inside this folder.
3164 </para>
3165
3166 <para>
3167 DCP-o-matic generates some working files as it goes along.  These are as follows:
3168 <itemizedlist>
3169
3170 <listitem><code>log</code> is a list of notes that DCP-o-matic makes as it goes
3171 along.  This can be useful for debugging purposes if something goes
3172 wrong.</listitem>
3173
3174 <listitem><code>metadata</code> stores the settings that you have made
3175 for this film: things like cropping, output format and so on.</listitem>
3176
3177 <listitem><code>video</code> is where DCP-o-matic writes the DCP's
3178 video data as it encodes it.</listitem>
3179
3180 <listitem><code>analysis</code> is used to keep the results of audio analysis runs.</listitem>
3181
3182 <listitem><code>info</code> contains details of each video frame that
3183 DCP-o-matic has written so far.  This is used when an encoding
3184 operation is interrupted and DCP-o-matic must resume it.</listitem>
3185 </itemizedlist>
3186 </para>
3187
3188 <para>
3189 Following this is the DCP itself:
3190 <code>DCP-TEST_EN-XX_UK-U_51_2K_CSY_20130218_CSY_OV</code>.  This
3191 contains some small XML files, which describe the DCP, and two large
3192 MXF files, which contain the DCP's audio and video data.  It may also
3193 contain subtitles in either XML or MXF format.  This folder
3194 (<code>DCP-TEST_EN-XX_...</code>) is what you should ingest, or pass
3195 to the cinema which is showing your DCP.
3196 </para>
3197
3198 </chapter>
3199
3200
3201 <chapter>
3202   <title>Command-line tools</title>
3203
3204   <para>
3205     DCP-o-matic includes some tools which allow DCP creation from the
3206     command line or from scripting languages.  This chapter covers the
3207     use of those tools.
3208   </para>
3209
3210   <para>
3211     There are three command-line tools in DCP-o-matic.
3212     <code>dcpomatic2_create</code> creates film directories, with the
3213     associated metadata, from a list of content files.  Then
3214     <code>dcpomatic2_cli</code> runs the transcode process on these
3215     film directories.  Finally, <code>dcpomatic2_kdm_cli</code> can be
3216     used to create KDMs.
3217   </para>
3218
3219   <para>
3220     Some applications will benefit from setting up the films using the
3221     main DCP-o-matic GUI and then using <code>dcpomatic2_cli</code> to
3222     do the encode.  This allows, for example, setup on a relatively
3223     low-powered machine before running the encode on a higher-powered
3224     headless server.
3225   </para>
3226
3227   <section>
3228     <title><code>dcpomatic2_create</code></title>
3229
3230     <para>
3231       The syntax for <code>dcpomatic2_create</code> is:
3232     </para>
3233
3234     <para>
3235       <code>dcpomatic2_create [OPTION] [CONTENT] [&lt;CONTENT&gt; ...]</code>
3236     </para>
3237
3238     <para>
3239       <code>[CONTENT]</code> are the files or folders that you want to use in the
3240       DCP. They can be:
3241       <itemizedlist>
3242         <listitem>&lsquo;Movie&rsquo; files in almost any common format (e.g. MP4, MOV, MKV, etc.)</listitem>
3243         <listitem>A folder containing and image sequence in almost any common format (e.g. TIFF, DPX etc.)</listitem>
3244         <listitem>Sound files (e.g. WAV, MP3, AIFF)</listitem>
3245         <listitem>Subtitles files (e.g. <code>.srt</code>, DCP XML, <code>.ssa</code> etc.)</listitem>
3246       </itemizedlist>
3247     </para>
3248
3249     <para>
3250       The options are:
3251     </para>
3252
3253     <itemizedlist>
3254       <listitem><code>-v</code>, <code>--version</code> &#8212; show DCP-o-matic version</listitem>
3255       <listitem><code>-h</code>, <code>--help</code> &#8212; show this help</listitem>
3256       <listitem><code>-n</code>, <code>--name</code> &#8212; &lt;name&gt; film name</listitem>
3257       <listitem><code>-t, --template &lt;name&gt;</code> &#8212; template name</listitem>
3258       <listitem><code>-c, --dcp-content-type &lt;type&gt;</code> &#8212; FTR, SHR, TLR, TST, XSN, RTG, TSR, POL, PSA or ADV</listitem>
3259       <listitem><code>--container-ratio &lt;ratio&gt;</code> &#8212; 119, 133, 137, 138, 166, 178, 185 or 239</listitem>
3260       <listitem><code>--content-ratio &lt;ratio&gt;</code> &#8212; 119, 133, 137, 138, 166, 178, 185 or 239</listitem>
3261       <listitem><code>-s, --still-length &lt;n&gt;</code> &#8212; number of seconds that still content should last</listitem>
3262       <listitem><code>--standard &lt;standard&gt;</code> &#8212; SMPTE or interop (default SMPTE)</listitem>
3263       <listitem><code>--no-use-isdcf-name&gt;</code> &#8212; do not use an ISDCF name; use the specified name unmodified</listitem>
3264       <listitem><code>--no-sign</code>&#8212; do not sign the DCP</listitem>
3265       <listitem><code>-o</code>, <code>--output &lt;dir&gt;</code> &#8212; output directory</listitem>
3266     </itemizedlist>
3267
3268     <para>
3269       For example, to setup a film using a MP4 file you might do:
3270     </para>
3271
3272     <para>
3273       <code>dcpomatic2_create -o my_film --container-ratio 185 --content-ratio 185 -c FTR -n "My Film" Stuff.mp4</code>
3274     </para>
3275
3276     <para>
3277       This will create a folder called <code>my_film</code> which is ready for a DCP to be made by <code>dcpomatic2_cli</code>.
3278     </para>
3279
3280     <para>
3281       <code>dcpomatic2_create</code> will use any default settings that you have configured in the main DCP-o-matic preferences.
3282     </para>
3283   </section>
3284
3285   <section>
3286     <title><code>dcpomatic2_cli</code></title>
3287
3288     <para>
3289       The syntax for <code>dcpomatic2_cli</code> is:
3290     </para>
3291
3292     <para>
3293       <code>dcpomatic2_cli [OPTION] [FILM]</code>
3294     </para>
3295
3296     <para>
3297       <itemizedlist>
3298         <listitem><code>-v</code>, <code>--version</code> &#8212; show DCP-o-matic version</listitem>
3299         <listitem><code>-h</code>, <code>--help</code> &#8212; show this help</listitem>
3300         <listitem><code>-f</code>, <code>--flags</code> &#8212; show flags passed to C++ compiler on build</listitem>
3301         <listitem><code>-n</code>, <code>--no-progress</code> &#8212; do not print progress to stdout</listitem>
3302         <listitem><code>-r</code>, <code>--no-remote</code> &#8212; do not use any remote servers</listitem>
3303         <listitem><code>-t</code>, <code>--threads</code> &#8212; specify number of local encoding threads (overriding configuration)</listitem>
3304         <listitem><code>-j</code>, <code>--json</code> &lt;port&gt; &#8212; run a JSON server on the specified port</listitem>
3305         <listitem><code>-k</code>, <code>--keep-going</code> &#8212; keep running even when the job is complete</listitem>
3306         <listitem><code>-s</code>, <code>--servers</code> &#8212; just display a list of encoding servers that DCP-o-matic is configured to use; don't encode</listitem>
3307         <listitem><code>-d</code>, <code>--dcp-path</code> &#8212; echo DCP's path to stdout on successful completion (implies -n)</listitem>
3308         <listitem><code>--dump</code> &#8212; just dump a summary of the film's settings; don't encode</listitem>
3309       </itemizedlist>
3310     </para>
3311
3312     <para>
3313       For example, to encode a film called <code>my_film</code> you might do:
3314     </para>
3315
3316     <para>
3317       <code>dcpomatic2_cli my_film</code>
3318     </para>
3319   </section>
3320
3321   <section>
3322     <title><code>dcpomatic2_kdm_cli</code></title>
3323
3324     <para>
3325       The syntax for <code>dcpomatic2_kdm_cli</code> is:
3326     </para>
3327
3328     <para>
3329       <code>dcpomatic2_kdm_cli [OPTION] &lt;FILM|CPL-ID&gt;</code>
3330     </para>
3331
3332     <para>
3333       <itemizedlist>
3334         <listitem><code>-o</code>, <code>--output</code> &#8212; output file or directory</listitem>
3335         <listitem><code>-f</code>, <code>--valid-from</code> &#8212; valid from time (in local time zone of the cinema) (e.g. "2013-09-28 01:41:51") or "now"</listitem>
3336         <listitem><code>-t</code>, <code>--valid-to</code> &#8212; valid to time (in local time zone of the cinema) (e.g. "2014-09-28 01:41:51")</listitem>
3337         <listitem><code>-d</code>, <code>--valid-duration</code> &#8212; valid duration (e.g. "1 day", "4 hours", "2 weeks")</listitem>
3338         <listitem><code>--formulation</code> &#8212; modified-transitional-1, dci-any or dci-specific [default modified-transitional-1]</listitem>
3339         <listitem><code>-z</code>, <code>--zip</code> &#8212; ZIP each cinema's KDMs into its own file</listitem>
3340         <listitem><code>-v</code>, <code>--verbose</code> &#8212; be verbose</listitem>
3341         <listitem><code>-c</code>, <code>--cinema</code> &#8212; specify a cinema, either by name or email address</listitem>
3342         <listitem><code>--certificate</code> &#8212; file containing projector certificate</listitem>
3343         <listitem><code>--cinemas</code> &#8212; list known cinemas from the DCP-o-matic settings</listitem>
3344         <listitem><code>--dkdm-cpls</code> &#8212; list CPLs for which DCP-o-matic has DKDMs</listitem>
3345       </itemizedlist>
3346     </para>
3347
3348   </section>
3349 </chapter>
3350
3351
3352
3353 <!-- ============================================================== -->
3354 <chapter>
3355 <title>Loose ends</title>
3356
3357 <para>
3358 This chapter collects a few notes on bits of DCP-o-matic that do not fit elsewhere in the manual.
3359 </para>
3360
3361
3362 <!-- ============================================================== -->
3363 <section>
3364 <title>Resuming encodes</title>
3365
3366 <para>
3367 If you cancel a DCP encoding run half-way through, or your computer
3368 crashes... fear not.  DCP-o-matic takes care to ensure that, in most
3369 cases, it can resume encoding from where it left off.  When you
3370 re-start a DCP creation, using the same settings are a previous run,
3371 DCP-o-matic will first check that the existing picture frames are
3372 correct, and then resume from where it left off.  The checking of
3373 existing frames does take some time, but it is much faster than
3374 running a full re-encode.
3375 </para>
3376
3377 <para>
3378 This resumption is achieved by writing a digest (hash) to disk for
3379 every image frame that is written.  On resumption, the existing MXF
3380 file for image data is read and its contents checked against the
3381 hashes.
3382 </para>
3383
3384 </section>
3385
3386 </chapter>
3387
3388 <!-- ============================================================== -->
3389 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
3390 <title>Common tasks</title>
3391
3392 <para>
3393 This chapter describes how to carry out some commonly-required tasks
3394 with DCP-o-matic.  The full details are elsewhere in the manual: here
3395 we just discuss different approaches to these tasks and how to carry
3396 them out.
3397 </para>
3398
3399 <section>
3400 <title>Adding subtitles to an existing DCP</title>
3401
3402 <para>
3403 You have three options:
3404 </para>
3405
3406 <itemizedlist>
3407 <listitem>Make a &ldquo;Version File&rdquo; (VF) DCP.</listitem>
3408 <listitem>Make a complete DCP with projector-added subtitles.</listitem>
3409 <listitem>Make a complete DCP with burnt-in subtitles.</listitem>
3410 </itemizedlist>
3411
3412 <para>
3413 Making a VF DCP is usually the best option.  This will be a very small
3414 DCP which contains only the subtitles: it refers to your existing DCP
3415 for the picture and sound.  The projectionist will ingest both the
3416 existing and VF DCPs and play back the VF.  The advantages of this
3417 approach are that the VF is very quick to generate, and small in size,
3418 making it easy to distribute.  This is especially useful if you have
3419 to make VF DCPs in many different languages.
3420 </para>
3421
3422 <para>
3423 Making a complete DCP with projector-added subtitles gives you a new,
3424 single DCP which the projectionist can ingest and play.  It will be
3425 the same size as your existing DCP, and fairly quick to create.  This
3426 approach relies on the projector (or server) to create the subtitles
3427 and overlay them on the image, which mostly works well but is not
3428 100&percnt; reliable.
3429 </para>
3430
3431 <para>
3432 Making a complete DCP with burnt-in subtitles gives you a new, single DCP
3433 but with the subtitles rendered by DCP-o-matic and copied into your
3434 image.  This is slower to create than a DCP with projector-added
3435 subtitles as every video frame with a subtitle must be re-encoded.
3436 The advantage of this approach is that it is less likely to go wrong,
3437 especially if you are using unusual subtitle positioning or character
3438 sets.
3439 </para>
3440
3441 <section>
3442 <title>Making a VF DCP</title>
3443
3444 <itemizedlist>
3445 <listitem>Start a new DCP-o-matic film.</listitem>
3446 <listitem>Click <guilabel>Add folder...</guilabel> and specify your existing DCP's folder.</listitem>
3447 <listitem>Go to the <guilabel>DCP</guilabel> tab and choose <guilabel>Split by video content</guilabel> for <guilabel>Reel type</guilabel>.</listitem>
3448 <listitem>Go to the <guilabel>Video</guilabel> and
3449 <guilabel>Audio</guilabel> tabs in turn and tick the <guilabel>Use this DCP's audio as OV and make VF</guilabel> checkboxes.</listitem>
3450 <listitem>Add your subtitles to the film in whatever format you have.</listitem>
3451 <listitem>Check the subtitle appearance in the preview; it will be
3452 slow to respond as it is having to decompress images from the existing
3453 DCP.</listitem>
3454 <listitem>Choose <guilabel>Make DCP</guilabel> from the menu.</listitem>
3455 </itemizedlist>
3456
3457 </section>
3458
3459 <section>
3460 <title>Making a complete DCP with projector-added subtitles</title>
3461
3462 <itemizedlist>
3463 <listitem>Start a new DCP-o-matic film.</listitem>
3464 <listitem>Click <guilabel>Add folder...</guilabel> and specify your existing DCP's folder.</listitem>
3465 <listitem>Add your subtitles to the film in whatever format you have.</listitem>
3466 <listitem>Check the subtitle appearance in the preview; it will be
3467 slow to respond as it is having to decompress images from the existing
3468 DCP.  Adjust the appearance using controls in the
3469 <guilabel>Subtitle</guilabel> tab if required.</listitem>
3470 <listitem>Choose <guilabel>Make DCP</guilabel> from the menu.</listitem>
3471 </itemizedlist>
3472
3473 </section>
3474
3475 <section>
3476 <title>Making a complete DCP with burnt-in subtitles</title>
3477
3478 <itemizedlist>
3479 <listitem>Start a new DCP-o-matic film.</listitem>
3480 <listitem>Click <guilabel>Add folder...</guilabel> and specify your existing DCP's folder.</listitem>
3481 <listitem>Add your subtitles to the film in whatever format you have.</listitem>
3482 <listitem>Go to the <guilabel>Subtitle</guilabel> tab and tick the <guilabel>Burn subtitles into image</guilabel> checkbox.</listitem>
3483 <listitem>Check the subtitle appearance in the preview; it will be
3484 slow to respond as it is having to decompress images from the existing
3485 DCP.  Adjust the appearance using controls in the
3486 <guilabel>Subtitle</guilabel> tab if required.</listitem>
3487 <listitem>Choose <guilabel>Make DCP</guilabel> from the menu.</listitem>
3488 </itemizedlist>
3489
3490 </section>
3491 </section>
3492
3493 <section>
3494 <title>Adding soundtracks or subtitles in different languages</title>
3495
3496 <para>
3497 If you have a film that is to be dubbed or subtitled in several
3498 languages, the best approach with DCP-o-matic is as follows:
3499 </para>
3500
3501 <itemizedlist>
3502 <listitem>Make a DCP with the common elements (perhaps just the video, or maybe the video and sound); this is known as the Original Version (OV).</listitem>
3503 <listitem>For each language, make a new Version File (VF) DCP which refers to the OV.</listitem>
3504 </itemizedlist>
3505
3506 <para>
3507 Once you have done this, you send the OV DCP to every cinema and then
3508 the appropriate VF to each cinema depending on what language they want
3509 to play the film in.  The projectionist ingests both DCPs and then plays the VF.
3510 </para>
3511
3512 <para>
3513 The advantage of this approach is that the VF DCPs are much smaller
3514 than the OV since they only have the language-specific parts.  If you
3515 are just changing the subtitles you can often ship the OV by normal
3516 transport means (e.g. a hard drive or high-speed download) and send
3517 the VF by email.
3518 </para>
3519
3520 <para>
3521 The full details of OV and VF files are discussed in <xref linkend="sec-overlay"/>.  The steps can be summarised as follows:
3522 </para>
3523
3524 <itemizedlist>
3525 <listitem>Create a new DCP-o-matic project for the OV, as normal, adding video and perhaps sound.  Make the DCP.</listitem>
3526 <listitem>Create a new DCP-o-matic project for the VF.</listitem>
3527 <listitem>Use <guilabel>Add folder...</guilabel> to add your OV DCP to the project.</listitem>
3528 <listitem>Select the video tab and tick <guilabel>Use this DCP's video as OV and make VF</guilabel> (you may need to select <guilabel>By video content</guilabel> for <guilabel>Reel type</guilabel> in the <guilabel>DCP</guilabel> tab).</listitem>
3529 <listitem>Do the same in the <guilabel>Audio</guilabel> tab if your OV has audio.</listitem>
3530 <listitem>Add your language-specific audio and/or subtitles and Make DCP.</listitem>
3531 </itemizedlist>
3532
3533 </section>
3534
3535 </chapter>
3536
3537 <chapter xml:id="ch-player" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
3538   <title>Playing DCPs</title>
3539
3540   <para>DCP-o-matic includes a DCP player, and although it requires a
3541   very high-speed CPU to play DCPs in full resolution, it can also
3542   play DCPs at reduced resolutions with slower CPUs.</para>
3543
3544   <para>To use the player, start <guilabel>DCP-o-matic
3545   Player</guilabel>, and load a DCP using the
3546   <guilabel>Open</guilabel> option on the <guilabel>File</guilabel>
3547   menu.</para>
3548
3549   <para>If you load a VF and/or encrypted DCP you can add your OV
3550   and/or KDM using the appropriate options on the
3551   <guilabel>File</guilabel> menu.</para>
3552
3553   <para>During playback the <guilabel>Performance</guilabel> area at
3554   the bottom right of the window will give details of how many frames
3555   are being dropped; these are frames that were not decoded from the
3556   DCP quickly enough.  If this number is high you can increase
3557   performance at the cost of rendering quality by choosing an option
3558   from the <guilabel>View</guilabel> menu.  If you set the player to
3559   decode at less than full resolution the DCP's data will be decoded
3560   at this lower resolution, which is quicker than decoding at full
3561   resolution.
3562   </para>
3563
3564 </chapter>
3565
3566 <!-- ============================================================== -->
3567 <chapter xml:id="ch-config" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
3568 <title>Configuration files</title>
3569
3570 <para>Most of DCP-o-matic's configuration is stored in an XML file called <code>config.xml</code>.  This is stored in different places depending on your operating system:</para>
3571
3572 <itemizedlist>
3573   <listitem>Windows: <code>c:\Users\your_user_name\AppData\Local\dcpomatic</code></listitem>
3574   <listitem>OS X: <code>/Users/your_user_Name/Library/Preferences/com.dcpomatic/2</code></listitem>
3575   <listitem>Linux: <code>~/.config/dcpomatic2</code></listitem>
3576 </itemizedlist>
3577
3578 <para>Possible XML tags are as follows:</para>
3579
3580 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="config.xml"/>
3581
3582 </chapter>
3583
3584 </book>