fd98fe62cbf9e09d46a4d8a45590fdb0b08ab180
[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>
30 DCP-o-matic is a program to generate <ulink
31 url="http://en.wikipedia.org/wiki/Digital_Cinema_Package">Digital
32 Cinema Packages</ulink> (DCPs) from almost any video, audio and/or
33 subtitle source files.  The resulting DCPs will play on modern digital
34 cinema projectors.
35 </para>
36
37 </section>
38
39
40 <!-- ============================================================== -->
41 <section>
42 <title>Licence</title>
43
44 <para>
45 DCP-o-matic is free and open-source and is licensed under the <ulink
46 url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU
47 GPL</ulink>.
48 </para>
49
50 </section>
51
52
53 <!-- ============================================================== -->
54 <section>
55 <title>Acknowledgements</title>
56
57 <para>
58 This manual uses icons from the <ulink url="http://tango.freedesktop.org/">Tango Desktop Project</ulink>, with thanks.
59 </para>
60
61 </section>
62 </chapter>
63
64
65 <!-- ============================================================== -->
66 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
67 <title>Installation</title>
68
69
70 <!-- ============================================================== -->
71 <section>
72 <title>Windows</title>
73
74 <para>
75 To install DCP-o-matic on Windows, download the installer from
76 <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
77 and double-click it.  Click through the installer wizard, and
78 DCP-o-matic will be installed onto your machine.
79 </para>
80
81 <para>
82 If you are using a 32-bit version of Windows, you will need the 32-bit
83 installer.  For 64-bit Windows, either installer will work, but I
84 suggest you used the 64-bit version as it will allow DCP-o-matic to
85 use more memory.  You may find that DCP-o-matic crashes if you run
86 many parallel encoding threads (more than 4) on the 32-bit
87 version.
88 </para>
89
90 </section>
91
92
93 <!-- ============================================================== -->
94 <section>
95 <title>Mac OS X</title>
96
97 <para>
98 DCP-o-matic will run on Mac OS X version 10.6 (Snow Leopard) and
99 higher.  To install it, download the <code>.dmg</code> from <ulink
100 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink> and double
101 click to open it.  Then drag the DCP-o-matic icon to your
102 <guilabel>Applications</guilabel> folder or wherever else you would
103 like to install it.
104 </para>
105
106 </section>
107
108 <!-- ============================================================== -->
109 <section>
110 <title>Debian or Ubuntu Linux</title>
111
112 <para>
113   You can install DCP-o-matic on:
114 </para>
115
116 <itemizedlist>
117   <listitem>Debian 7 (&lsquo;wheezy&rsquo;)</listitem>
118   <listitem>Debian 8 (&lsquo;jessie&rsquo;)</listitem>
119   <listitem>Debian unstable (&lsquo;sid&rsquo;)</listitem>
120   <listitem>Ubuntu 12.04 (&lsquo;Precise Pangolin&rsquo;)</listitem>
121   <listitem>Ubuntu 14.04 (&lsquo;Trusty Tahr&rsquo;)</listitem>
122   <listitem>Ubuntu 15.04 (&lsquo;Vivid Vervet&rsquo;)</listitem>
123   <listitem>Ubuntu 15.10 (&lsquo;Wily Werewolf&rsquo;)</listitem>
124 </itemizedlist>
125
126 <para>
127 using <code>.deb</code> packages: download the appropriate package
128 from <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
129 and double-click it.  Debian or Ubuntu will install the necessary bits and
130 pieces and set DCP-o-matic up for you.
131 </para>
132 </section>
133 <!-- ============================================================== -->
134
135
136 <!-- ============================================================== -->
137 <section>
138   <title>Fedora Linux</title>
139
140   <para>There are <code>.rpm</code> packages for Fedora 22 and 23 on
141   <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
142   </para>
143 </section>
144 <!-- ============================================================== -->
145
146
147 <!-- ============================================================== -->
148 <section>
149   <title>Centos Linux</title>
150   <para>There are <code>.rpm</code> packages for Centos 6.5 and 7 on
151   <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
152   </para>
153 </section>
154 <!-- ============================================================== -->
155
156
157 <!-- ============================================================== -->
158 <section>
159 <title>Arch Linux</title>
160 <para>
161 Packages for Arch Linux are available from <ulink
162 url="https://aur.archlinux.org/packages/dcpomatic/">https://aur.archlinux.org/packages/dcpomatic/</ulink>,
163 thanks to Stefan Karner.
164 </para>
165 </section>
166
167
168 <!-- ============================================================== -->
169 <section>
170 <title>Other Linux distributions</title>
171
172 <para>
173 Installation on other Linux systems (for which no packages are
174 available) is quite hard; you will have to compile it from source.  If
175 you are using distribution for which no packages are available, do let
176 me know by <ulink url="mailto:carl@dcpomatic.com">email</ulink> and I
177 will look into providing packages on the website.
178 </para>
179
180 <para>
181 The following dependencies are required:
182 <itemizedlist>
183 <listitem><ulink url="http://ffmpeg.org/">FFmpeg</ulink></listitem>
184 <listitem><ulink url="http://www.mega-nerd.com/libsndfile/">libsndfile</ulink></listitem>
185 <listitem><ulink url="http://www.mega-nerd.com/SRC/">libsamplerate</ulink></listitem>
186 <listitem><ulink url="http://www.openssl.org/">OpenSSL</ulink></listitem>
187 <listitem><ulink url="http://www.openjpeg.org/">libopenjpeg</ulink></listitem>
188 <listitem><ulink url="http://www.imagemagick.org/script/index.php">ImageMagick</ulink></listitem>
189 <listitem><ulink url="http://www.boost.org/">Boost</ulink></listitem>
190 <listitem><ulink url="http://www.libssh.org/">libssh</ulink></listitem>
191 <listitem><ulink url="http://www.gtk.org/">GTK (on Linux)</ulink></listitem>
192 <listitem><ulink url="http://www.wxwidgets.org/">wxWidgets</ulink></listitem>
193 <listitem><ulink url="http://libxmlplusplus.sourceforge.net/">libxml++</ulink></listitem>
194 <listitem><ulink url="http://www.aleksey.com/xmlsec/">xmlsec</ulink></listitem>
195 <listitem><ulink url="http://curl.haxx.se/">curl</ulink></listitem>
196 <listitem><ulink url="http://www.nih.at/libzip/">libzip</ulink></listitem>
197 <listitem><ulink url="http://carlh.net/libdcp/">libdcp</ulink></listitem>
198 <listitem><ulink url="http://carlh.net/libsub/">libsub</ulink></listitem>
199 <listitem><ulink url="http://carlh.net/libcxml/">libcxml</ulink></listitem>
200 <listitem><ulink url="http://site.icu-project.org">libicu</ulink></listitem>
201 </itemizedlist>
202 </para>
203
204 <para>
205 Once you have installed the development packages for the dependencies,
206 download the source code from <ulink
207 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>,
208 unpack it and run the following commands from inside the source
209 directory:
210 </para>
211
212 <programlisting>
213 ./waf configure
214 ./waf build
215 sudo ./waf install
216 </programlisting>
217
218 <para>
219 With any luck, this will build and install DCP-o-matic on your system.  To run it, enter:
220 </para>
221
222 <programlisting>
223 dcpomatic2
224 </programlisting>
225
226 <para>
227 in a shell.
228 </para>
229
230 </section>
231 </chapter>
232
233
234 <!-- ============================================================== -->
235 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
236 <title>Creating a video DCP</title>
237
238 <para>
239 In this chapter we will see how to create a video DCP using
240 DCP-o-matic.  We will gloss over the details and look at the basics.
241 </para>
242
243 <section>
244 <title>Creating a new film</title>
245
246 <para>
247 Let's make a very simple DCP to see how DCP-o-matic works.  First, we
248 need some content.  Download the low-resolution trailer for the open
249 movie <ulink url="http://sintel.org/">Sintel</ulink> from <ulink
250 url="http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.480p.DivX_Plus_HD.mkv">their
251 website</ulink>.  Generally, of course, one would want to use the
252 highest-resolution material available, but for this test we will use
253 the low-resolution version to save everyone's bandwidth bills.
254 </para>
255
256 <para>
257 Now, start DCP-o-matic and its window will open.  First, we will
258 create a new &lsquo;film&rsquo;.  A &lsquo;film&rsquo; is how DCP-o-matic refers to
259 some pieces of content, along with some settings, which we will make into
260 a DCP.  DCP-o-matic stores its data in a folder on your disk while it
261 creates the DCP.  You can create a new film by selecting
262 <guilabel>New</guilabel> from the <guilabel>File</guilabel> menu, as
263 shown in <xref linkend="fig-file-new"/>.
264 </para>
265
266 <figure id="fig-file-new">
267   <title>Creating a new film</title>
268   <mediaobject>
269     <imageobject>
270       <imagedata fileref="screenshots/file-new&scs;"/>
271     </imageobject>
272   </mediaobject>
273 </figure>
274
275 <para>
276 This will open a dialogue box for the new film, as shown in <xref
277 linkend="fig-video-new-film"/>.
278 </para>
279
280 <figure id="fig-video-new-film">
281   <title>Dialogue box for creating a new film</title>
282   <mediaobject>
283     <imageobject>
284       <imagedata fileref="screenshots/video-new-film&scs;"/>
285     </imageobject>
286   </mediaobject>
287 </figure>
288
289 <para>
290 In this dialogue box you can choose a name for the film.  This will be
291 used to name the folder to store its data in, and also as the initial
292 name for the DCP itself.  You can also choose whereabouts you want to create
293 the film.  In the example from the figure, DCP-o-matic will create a
294 folder called &lsquo;DCP Test&rsquo; inside my home folder (carl) into which it
295 will write its working files.
296 </para>
297
298 </section>
299
300
301 <!-- ============================================================== -->
302 <section>
303 <title>Adding content</title>
304
305 <para>
306 The next step is to add the content that you want to use.  DCP-o-matic
307 can make DCPs from multiple pieces of content, but in this simple
308 example we will just use a single piece.  Click the <guilabel>Add
309 file(s)...</guilabel> button, as shown in <xref
310 linkend="fig-add-file"/>, and a file chooser will open for you to
311 select the content file to use, as shown in <xref
312 linkend="fig-video-select-content-file"/>.
313 </para>
314
315 <figure id="fig-add-file">
316   <title>Adding content files</title>
317   <mediaobject>
318     <imageobject>
319       <imagedata fileref="screenshots/add-file&scs;"/>
320     </imageobject>
321   </mediaobject>
322 </figure>
323
324 <figure id="fig-video-select-content-file">
325   <title>Selecting a video content file</title>
326   <mediaobject>
327     <imageobject>
328       <imagedata fileref="screenshots/video-select-content-file&scs;"/>
329     </imageobject>
330   </mediaobject>
331 </figure>
332
333 <para>
334 Select your content file and click <guilabel>Open</guilabel>.  In this
335 case we are using the Sintel trailer that we downloaded earlier.
336 </para>
337
338 <para>
339 When you do this, DCP-o-matic will take a look at your file.  After a
340 short while (when the progress bar at the bottom right of the window
341 has finished), you can look through your content using the slider to
342 the right of the window, as shown in <xref linkend="fig-examine-content"/>.
343 </para>
344
345 <figure id="fig-examine-content">
346   <title>Examining the content</title>
347   <mediaobject>
348     <imageobject>
349       <imagedata fileref="screenshots/examine-content&scs;"/>
350     </imageobject>
351   </mediaobject>
352 </figure>
353
354 <para>
355 Dragging the slider will move through your video.  You can also click
356 the <guilabel>Play</guilabel> button to play the content back.  <emphasis>Note
357 that there will be no sound</emphasis>, and playback might not be entirely
358 accurate (it may be slightly slower or faster than it should be, for
359 example).  This player is really only intended for brief inspection of
360 content; if you need to check it more thoroughly, use another player
361 such as <ulink
362 url="http://projects.gnome.org/totem/index.html">Totem</ulink>, <ulink
363 url="http://www.mplayerhq.hu/design7/news.html">mplayer</ulink> or
364 <ulink url="http://www.videolan.org/vlc/index.html">VLC</ulink>.
365 </para>
366
367 </section>
368
369
370
371
372 <!-- ============================================================== -->
373 <section>
374 <title>Making the DCP</title>
375
376 <para>In most cases, some adjustments would be made to DCP-o-matic's
377 settings once the content has been added.  For our simple test,
378 however, the default values will suffice, so we can go straight onto
379 making the DCP.</para>
380
381 <para>
382 Choose <guilabel>Make DCP</guilabel> from the
383 <guilabel>Jobs</guilabel> menu.  DCP-o-matic will encode your DCP.
384 This may take some time (many hours in some cases).  While the job is
385 in progress, DCP-o-matic will update you on how it is getting on with
386 the progress bar in the bottom of its window, as shown in <xref
387 linkend="fig-making-dcp"/>.
388 </para>
389
390 <figure id="fig-making-dcp">
391   <title>Making the DCP</title>
392   <mediaobject>
393     <imageobject>
394       <imagedata scale="50" fileref="screenshots/making-dcp&scs;"/>
395     </imageobject>
396   </mediaobject>
397 </figure>
398
399 <para>
400 When it has finished, the DCP will end up on your disk inside the
401 film's folder.  You can then copy this to a projector via a USB
402 stick, hard-drive or network connection.  See <xref
403 linkend="ch-files"/> for details about the files that DCP-o-matic creates.
404 </para>
405
406 <para>
407 Alternatively, if  you have a  projector or Theatre  Management System
408 (TMS) that is accessible via SCP across your network, you can upload
409 the content directly from DCP-o-matic.  See the <xref
410 linkend="sec-prefs-tms" endterm="sec-prefs-tms-short"/> in <xref linkend="sec-prefs-tms"/>.
411 </para>
412
413 </section>
414 </chapter>
415
416
417 <!-- ============================================================== -->
418 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
419 <title>Creating a still-image DCP</title>
420
421 <para>
422 DCP-o-matic can also be used to create DCPs of one or more still images, perhaps
423 for an advertisement or an on-screen announcement.  This chapter shows you
424 how to do it.
425 </para>
426
427 <para>
428 As with video DCPs, the first step is to create a new
429 &lsquo;Film&rsquo;; select <guilabel>New</guilabel> from the
430 <guilabel>File</guilabel> menu and the new film dialogue will open as
431 shown in <xref linkend="fig-still-new-film"/>.
432 </para>
433
434 <figure id="fig-still-new-film">
435   <title>Dialogue box for creating a new film</title>
436   <mediaobject>
437     <imageobject>
438       <imagedata fileref="screenshots/still-new-film&scs;"/>
439     </imageobject>
440   </mediaobject>
441 </figure>
442
443 <para>
444 Enter a name and click <guilabel>OK</guilabel>.  Now we need to add
445 the content.  As before, click <guilabel>Add file(s)...</guilabel>.
446 For our example, we will add a single image file, as shown in <xref
447 linkend="fig-still-select-content-file"/>.
448 </para>
449
450 <figure id="fig-still-select-content-file">
451   <title>Selecting a still content file</title>
452   <mediaobject>
453     <imageobject>
454       <imagedata fileref="screenshots/still-select-content-file&scs;"/>
455     </imageobject>
456   </mediaobject>
457 </figure>
458
459 <para>
460 As with video DCPs, most of the default settings will be fine for a
461 simple test.  The one thing that you might wish to change is the
462 length of the still.  Select the <guilabel>Timing</guilabel> tab and
463 you will see a <guilabel>Play length</guilabel> setting, as shown in <xref
464 linkend="fig-timing-tab"/>.
465 </para>
466
467 <figure id="fig-timing-tab">
468   <title>The timing tab</title>
469   <mediaobject>
470     <imageobject>
471       <imagedata fileref="screenshots/timing-tab&scs;"/>
472     </imageobject>
473   </mediaobject>
474 </figure>
475
476 <para>
477 This length is a &lsquo;timecode&rsquo;: it consists of four numbers.
478 The first is hours, the second minutes, the third seconds, and the
479 fourth frames.  Enter the duration that you want and then click <guilabel>Set</guilabel>.
480 </para>
481
482 <para>
483 Finally, as with video, you can choose <guilabel>Make DCP</guilabel>
484 from the <guilabel>Jobs</guilabel> menu to create your DCP.  This will
485 be much quicker than creating a video DCP, as DCP-o-matic only needs
486 to encode a single frame which it can then repeat.
487 </para>
488
489 </chapter>
490
491
492 <!-- ============================================================== -->
493 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
494 <title>Manipulating existing DCPs</title>
495
496 <para>
497 Frequently DCP-o-matic is used to take content in formats such as MP4
498 and convert it to JPEG2000 for a DCP.  Alternatively, it can be used
499 to take existing DCPs and modify them in various ways.
500 </para>
501
502 <section>
503 <title>Importing a DCP into DCP-o-matic</title>
504
505 <para>
506 If you want to do something to an existing DCP the first step is to
507 import it.  Click <guilabel>Add folder...</guilabel> and select your
508 DCP's folder.  It will be added to the DCP-o-matic project.  If the
509 DCP is unencrypted you can preview it in the normal way, though
510 playback will be very slow as decoding of DCPs is almost as
511 computationally intensive as encoding them.
512 </para>
513
514 </section>
515
516
517 <section>
518 <title>Decrypting encrypted DCPs</title>
519
520 <para>
521 DCPs can be encrypted (see <xref linkend="ch-encryption"/> for
522 details).  If you import an encrypted DCP you will need a key, in the
523 form of a Key Delivery Message (KDM), to decrypt it.
524 </para>
525
526 <para>
527 KDMs must be prepared by the organisation which created the DCP.  They
528 contain the keys to decrypt the DCP wrapped up in such a way that only
529 the intended recipient can read them.  You will need to provide the
530 organisation with a certificate which identifies your copy of
531 DCP-o-matic and allows them to create a KDM for you.
532 </para>
533
534 <para>
535 To get DCP-o-matic's decryption certificate, open the Preferences
536 dialogue (see <xref linkend="ch-preferences"/>) and go to the
537 <guilabel>Keys</guilabel> tab.  Click the <guilabel>Export DCP
538 decryption certificate...</guilabel> button at the bottom of this tab
539 and save the certificate.  Send this certificate to the DCP creators
540 and they can create a KDM to allow DCP-o-matic to decrypt their DCP.
541 </para>
542
543 <para>
544 Once you have your KDM, right-click the DCP's name in DCP-o-matic and
545 choose <guilabel>Add KDM...</guilabel>.  Specify your KDM and (all
546 being well) the DCP will be decrypted and become available for preview.
547 </para>
548
549 </section>
550
551
552 <section>
553 <title>Making a DCP from a DCP</title>
554
555 <para>
556 In many ways, using DCPs as <emphasis>content</emphasis> in
557 DCP-o-matic is the same as using any other content.  There are a few
558 things to note, though.
559 </para>
560
561
562 <section>
563 <title>Re-use of existing data</title>
564
565 <para>
566 Where possible DCP-o-matic will re-use existing JPEG2000-compressed
567 data from DCP content without modification.  This has the advantage
568 that creation of the new DCP will be quick, as the time-consuming
569 JPEG2000 encoding is not necessary.
570 </para>
571
572 <para>
573 DCP-o-matic can do this if you avoid changes to the following content
574 settings:
575 </para>
576
577 <itemizedlist>
578 <listitem>Crop</listitem>
579 <listitem>Scaling</listitem>
580 <listitem>Subtitle burn-in</listitem>
581 <listitem>Fades</listitem>
582 <listitem>Colour conversion</listitem>
583 </itemizedlist>
584
585 <para>
586 If you do change any of these settings on a piece of DCP content
587 DCP-o-matic will decode and then re-encode the JPEG2000 data.
588 </para>
589
590 </section>
591
592
593 <section>
594 <title>Making overlay files</title>
595
596 <para>
597 With its default settings, DCP-o-matic will take any data from DCP
598 content and copy it into the DCP that it creates.  See <xref linkend="fig-dcp-copy"/>.
599 </para>
600
601 <figure id="fig-dcp-copy">
602 <title>Creating a new DCP by copying an existing one</title>
603 <mediaobject><imageobject><imagedata scale="100" fileref="diagrams/dcp-copy&dia;"/></imageobject></mediaobject>
604 </figure>
605
606 <para>
607 This can be inefficient in some cases.  Consider, for example, a film
608 which has ten different translations for which the subtitles are
609 different but video and audio are the same.  If the video and audio
610 content takes up, say, 100Gb this means that the set of DCPs for every
611 translation would be about 1Tb with a lot of duplicated data.
612 </para>
613
614 <para>
615 The DCP format has a solution to this problem.  One DCP can refer to
616 the &lsquo;assets&rsquo; (picture, sound or subtitle) of another DCP.
617 For our translation example this means that we could have a
618 &lsquo;base&rsquo; DCP (often called the OV or Original Version)
619 containing video, audio and one set of subtitles and then any number
620 of overlay DCPs (often called VF or Version Files) which refer to the
621 base version and replace the original subtitles with their own.  <xref
622 linkend="fig-dcp-refer"/> shows this principle for one of our
623 translations.  The DCP that we make refers to the original content
624 DCP's video and audio rather than containing a copy.
625 </para>
626
627 <figure id="fig-dcp-refer">
628 <title>Creating a new DCP by referring to an existing one</title>
629 <mediaobject><imageobject><imagedata scale="100" fileref="diagrams/dcp-refer&dia;"/></imageobject></mediaobject>
630 </figure>
631
632 <para>
633 To play back the subtitled DCP the projectionist ingests both the base
634 (OV) DCP and the overlay (VF) DCP, then plays the VF one.
635 </para>
636
637 <para>
638 To make a DCP like this:
639 </para>
640
641 <itemizedlist>
642 <listitem>Import your &lsquo;Content DCP&rsquo; to a DCP-o-matic project.</listitem>
643 <listitem>Add whatever replacement you want in your new DCP (replacement subtitles or audio files, for example).</listitem>
644 <listitem>Select the DCP in the content list</listitem>
645 <listitem>Tick the <guilabel>Refer to existing DCP</guilabel> checkbox
646 in the tabs for the parts of the DCP that you want to refer to in your
647 new DCP.  For example, to refer to the &lsquo;Content DCP&rsquo;'s video and audio you would select the <guilabel>Video</guilabel> tab, click <guilabel>Refer to existing DCP</guilabel> then select the <guilabel>Audio</guilabel> tab and do the same.</listitem>
648 <listitem>Do <guilabel>Make DCP</guilabel> as usual and your VF DCP will be created.</listitem>
649 </itemizedlist>
650
651 </section>
652
653 </section>
654
655
656
657 </chapter>
658 <!-- ============================================================== -->
659
660
661 <!-- ============================================================== -->
662 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
663 <title>Content settings</title>
664
665 <para>
666 The previous chapters showed DCP generation using the default
667 settings.  DCP-o-matic offers a range of features to adjust the
668 content that goes into your DCP, and this chapter describes those
669 features in detail.
670 </para>
671
672 <section>
673 <title>Adding and removing content</title>
674
675 <para>
676 At the top of the <guilabel>Content</guilabel> tab is a list of the
677 content that will go into our DCP.  There can be as many pieces of
678 content as you like, and they can be of the following types:
679 </para>
680
681 <itemizedlist>
682 <listitem>Movie &mdash; a file containing some video, probably some
683 audio and possibly some embedded subtitles; for example, a MOV, MP4 or VOB.
684 </listitem>
685
686 <listitem>Sound &mdash; a file containing one or more channels of
687 audio; for example, a WAV or AIFF file.
688 </listitem>
689
690 <listitem>Still image &mdash; a file containing a single still image; for
691 example, a JPEG, PNG or TIFF file.
692 </listitem>
693
694 <listitem>Moving image &mdash; a directory containing many still
695 images which should be treated as the frames of a video.
696 </listitem>
697
698 <listitem>Subtitle &mdash; a file containing subtitle which will be
699 superimposed on the image of the DCP.  These can be
700 <guilabel>.srt</guilabel> or <guilabel>.xml</guilabel>
701 files.</listitem>
702
703 <listitem>DCP &mdash; an existing DCP.</listitem>
704 </itemizedlist>
705
706 <para>
707 To add one or more movie, sound, still-image or subtitle files, select
708 <guilabel>Add file(s)...</guilabel> and choose them from the selector.
709 </para>
710
711 <para>
712 To add a directory (folder) of images or a DCP, choose <guilabel>Add
713 folder...</guilabel> and choose the directory from the selector.  If
714 you select a folder of images DCP-o-matic will open a small dialogue
715 box where you can enter the frame rate that the image sequence should
716 be run at.
717 </para>
718
719 <para>
720 You can remove a piece of content by clicking on its name and then
721 clicking the <guilabel>Remove</guilabel> button.
722 </para>
723
724 </section>
725
726 <!-- ============================================================== -->
727 <section>
728 <title>Adding existing DCPs</title>
729
730 <para>Adding existing DCPs to a DCP-o-matic film is a little different
731 to adding other types of content.  Most content has to be converted to
732 JPEG2000, the compression scheme used by DCPs, which is a very
733 time-consuming process.  Existing DCPs are already in JPEG2000 format
734 so do not require conversion.  This means that, provided no settings
735 such as crop are used on the DCP content, picture and sound data will
736 be passed from existing to new DCP unaltered.
737 </para>
738
739 <para>Encrypted DCPs that are added as content will require a KDM
740 targeted at DCP-o-matic so that DCP-o-matic can decrypt them.  You
741 should ask the creator of the imported DCP to provide a KDM for
742 DCP-o-matic's decryption certificate, which can be obtained by
743 clicking <guilabel>Export DCP decryption certificate...</guilabel>
744 from the <guilabel>Keys</guilabel> tab of the
745 <guilabel>Preferences</guilabel> dialog (see <xref
746 linkend="sec-prefs-keys"/>).
747 </para>
748
749 </section>
750
751 <!-- ============================================================== -->
752 <section>
753 <title>Content Properties</title>
754
755 <para>
756 Below the content list are the controls to set content properties.  To
757 adjust the properties for a piece of content, click its name in the
758 content list.  The content property controls will then become active
759 for that piece of content.
760 </para>
761
762 <para>
763 If you want to change the properties for multiple pieces of content at
764 the same time, select the content in the list by clicking the first
765 piece then clicking the other pieces with <keycap>shift</keycap> key
766 held down.  Note that not all settings can be changed in this way.
767 </para>
768
769 <para>
770 The content properties are split up into four sections:
771 <guilabel>Video</guilabel>, <guilabel>Audio</guilabel>,
772 <guilabel>Subtitles</guilabel> and <guilabel>Timing</guilabel>.  Not
773 all of these sections will be active for all content types.  The controls
774 in each section are described below.
775 </para>
776
777 </section>
778
779
780 <!-- ============================================================== -->
781 <section>
782 <title>Video</title>
783
784 <para>
785 The <guilabel>Video</guilabel> tab controls properties of the image, as shown in <xref linkend="fig-video-tab"/>.
786 </para>
787
788 <figure id="fig-video-tab">
789   <title>Video settings tab</title>
790   <mediaobject>
791     <imageobject>
792        <imagedata fileref="screenshots/video-tab&scs;"/>
793     </imageobject>
794   </mediaobject>
795 </figure>
796
797
798 <!-- ============================================================== -->
799 <section>
800 <title>Image type</title>
801
802 <para>
803 The first option on this tab is the &lsquo;type&rsquo; of the video.
804 This specifies how DCP-o-matic should interpret the video's image.
805 <guilabel>2D</guilabel> is the default; this just takes the video
806 image as a standard 2D frame.  The <guilabel>3D
807 left/right</guilabel> option tells DCP-o-matic to interpret the frame as a
808 left-right pair, as shown in <xref linkend="fig-3d-left-right"/>.
809 </para>
810
811 <figure id="fig-3d-left-right">
812   <title>3D left/right image type</title>
813   <mediaobject>
814     <imageobject>
815        <imagedata scale="100" fileref="diagrams/3d-left-right&dia;"/>
816     </imageobject>
817   </mediaobject>
818 </figure>
819
820 <para>
821 Alternatively the <guilabel>3D top/bottom</guilabel> option tells
822 DCP-o-matic to see the frame as a top-bottom pair, as shown in <xref
823 linkend="fig-3d-top-bottom"/>.
824 </para>
825
826 <figure id="fig-3d-top-bottom">
827   <title>3D top/bottom image type</title>
828   <mediaobject>
829     <imageobject>
830        <imagedata scale="100" fileref="diagrams/3d-top-bottom&dia;"/>
831     </imageobject>
832   </mediaobject>
833 </figure>
834
835 <para>
836 Another option is <guilabel>3D alternate</guilabel> which takes the
837 first frame of the content as for the left eye, the second for the
838 right eye, the third for the left, and so on.  Finally, you can
839 specify <guilabel>3D left only</guilabel> or <guilabel>3D right
840 only</guilabel> if this content contains only the the left or right
841 eye images.  This is useful when you have the left and right eye image
842 sets in different files; you can specify one content as <guilabel>3D
843 left only</guilabel> and another as <guilabel>3D right only</guilabel>
844 and DCP-o-matic will pick up the appropriate frames from each.
845 </para>
846
847 </section>
848
849
850 <!-- ============================================================== -->
851 <section>
852 <title>Filtering</title>
853
854 <para>
855 The &lsquo;filters&rsquo; settings allow you to apply various video
856 filters to the image.  These may be useful to try to improve
857 poor-quality sources like DVDs.  You can set up the filters by clicking the
858 <guilabel>Edit</guilabel> button next to the filters entry in the
859 setup area of the DCP-o-matic window; this opens the filters selector
860 as shown in <xref linkend="fig-filters"/>.
861 </para>
862
863 <figure id="fig-filters">
864   <title>Filters selector</title>
865   <mediaobject>
866     <imageobject>
867       <imagedata fileref="screenshots/filters&scs;"/>
868     </imageobject>
869   </mediaobject>
870 </figure>
871
872 <para>
873 After changing the filters setup, you will need to regenerate the DCP
874 to see the effect on the cinema screen.  The preview in DCP-o-matic
875 will update itself whenever filters are changed, though of course this
876 image is much smaller and of lower resolution than a projected image!
877 </para>
878 </section>
879
880
881
882 <!-- ============================================================== -->
883 <section>
884 <title>Colour conversion</title>
885
886 <para>
887 The <guilabel>Colour conversion</guilabel> setting specifies what
888 colour transforms and gamma correction DCP-o-matic will use when
889 converting the selected content into the XYZ colourspace for the DCP.
890 </para>
891
892 <para>
893 The easiest way to select the required conversion is to choose one of
894 DCP-o-matic's presets.  DCP-o-matic knows how to convert from four
895 common colourspaces: sRGB, Rec. 601, Rec. 709 and P3.  If you do not
896 know which preset you should use, refer to the suggestions in <xref
897 linkend="tab-colour-conversion"/>.
898 </para>
899
900 <table id="tab-colour-conversion">
901 <title>Suggested colour conversion settings</title>
902 <tgroup cols='2' align='left' colsep='1' rowsep='1'>
903 <colspec colwidth='1*'/>
904 <colspec colwidth='5*'/>
905 <tbody>
906 <row>
907 <entry>sRGB</entry><entry>Still images in RGB, e.g. photographs</entry>.
908 </row>
909 <row>
910 <entry>Rec. 601</entry><entry>Standard-definition content (fewer than about 1000 pixels across) including DVD rips.</entry>
911 </row>
912 <row>
913 <entry>Rec. 709</entry><entry>High-definition content including Blu-Ray rips.</entry>
914 </row>
915 <row>
916 <entry>P3</entry><entry>Content explicitly graded to P3.</entry>
917 </row>
918 </tbody>
919 </tgroup>
920 </table>
921
922 <para>
923 For other required colour conversions, and if you know what you are
924 doing, you can choose <guilabel>Custom</guilabel> which will open the full
925 colour conversion editing dialogue box:
926 </para>
927
928 <figure id="fig-colour-conversion">
929   <title>Dialogue box for custom colour conversion</title>
930   <mediaobject>
931     <imageobject>
932       <imagedata fileref="screenshots/colour-conversion&scs;"/>
933     </imageobject>
934   </mediaobject>
935 </figure>
936
937 <para>
938 Alternatively, choose <guilabel>None</guilabel> if your source files
939 are already in the XYZ colour space and require no conversion.
940 </para>
941
942 <para>
943 DCP-o-matic's colour conversion processes are discussed in much more
944 detail in a separate document <ulink
945 url="http://dcpomatic.com/manual/colour.pdf">colour.pdf</ulink>.
946 </para>
947
948 </section>
949
950 <!-- ============================================================== -->
951 <section>
952 <title>Other settings</title>
953
954 <para>
955 The <guilabel>crop</guilabel> settings can be used to crop your content,
956 which can be used to remove black borders from round the edges of DVD
957 images, for example.  The specified number of pixels will be trimmed
958 from each edge, and the content image in the right of the window will
959 be updated to show the effect of the crop.
960 </para>
961
962 <para>
963 The <guilabel>fade in</guilabel> and <guilabel>fade out</guilabel>
964 settings can be used to apply linear fades into and out of a piece of
965 content.  Specify the time for each, clicking <guilabel>Set</guilabel>
966 after making any changes.
967 </para>
968
969 <para>
970 The <guilabel>Scale to</guilabel> option governs the shape that
971 DCP-o-matic will scale the content's image into.  Select the aspect
972 ratio that your content should be presented in.
973 </para>
974
975 </section>
976
977 <!-- ============================================================== -->
978 <section>
979 <title>Video description</title>
980
981 <para>
982 At the bottom of the video tab is a short description of what will
983 happen to your video with the current settings.  In the example of
984 <xref linkend="fig-video-tab"/>, DCP-o-matic is telling you that the
985 video file is 1920x1080 pixels and it has square pixels (a pixel
986 aspect ratio of 1.00) hence its display aspect ratio is 1.78:1.  Since
987 the controls specify &lsquo;16.9&rsquo; for the ratio, DCP-o-matic
988 does not scale the image but pads it to the DCP's container ratio of
989 1.85:1.  For a 2K DCP this is 1998x1080 pixels.
990 </para>
991
992 <para>
993 This description also gives the frame rate of the content and what
994 will happen to it when it is played at the DCP's frame rate.  See
995 <xref linkend="ch-frame-rates"/> for details of DCP-o-matic's
996 frame-rate conversion.
997 </para>
998
999 </section>
1000
1001 </section>
1002
1003
1004 <!-- ============================================================== -->
1005 <section>
1006 <title>Audio</title>
1007
1008 <para>
1009 The <guilabel>Audio</guilabel> tab controls properties of the image, as shown in <xref linkend="fig-audio-tab"/>.
1010 </para>
1011
1012 <figure id="fig-audio-tab">
1013   <title>Audio settings tab</title>
1014   <mediaobject>
1015     <imageobject>
1016        <imagedata fileref="screenshots/audio-tab&scs;"/>
1017     </imageobject>
1018   </mediaobject>
1019 </figure>
1020
1021
1022 <!-- ============================================================== -->
1023 <section>
1024 <title>The audio map</title>
1025
1026 <para>
1027 The section at the bottom of the audio tab is the &lsquo;audio
1028 map&rsquo;.  This governs how sound from the content will be arranged
1029 in the DCP.
1030 </para>
1031
1032 <para>
1033 Down the left-hand side of the map is the list of audio channels in
1034 the currently-selected piece of content.  These are labelled with two
1035 numbers; the first is the stream index within the content and the
1036 second is the channel number within that stream.  Some content will
1037 have different streams for different languages or audio mixes.  Along
1038 the top is each channel in the DCP.  A green box means that the
1039 corresponding content channel will be copied into the corresponding
1040 DCP channel.
1041 </para>
1042
1043 <para>
1044 When content channels are copied into DCP channels they can be done
1045 with variable gain.  If, for example, you want to copy a channel
1046 as-is, you can set a gain of 0dB.  Alternatively, if you want to mix
1047 two channels into one, you may want to use a gain of -6dB on each one
1048 to prevent clipping when the two channels are added.
1049 </para>
1050
1051 <para>
1052 The green boxes of the audio mapping view tell you (very roughly) how
1053 much gain is applied to each channel.  A full-height box means 0dB
1054 (i.e. unity) gain.  Any less height indicates lower gain.
1055 </para>
1056
1057 <para>
1058 To map one channel to another with 0dB gain, click in the empty box
1059 and it will turn green to reflect the mapping.  A second click will
1060 turn the mapping back off.  To set some other gain, right-click on the
1061 box to open the gain menu.  This allows you to set
1062 <guilabel>Off</guilabel> (no mapping or negative infinity gain),
1063 <guilabel>Full</guilabel> (0dB gain), -6dB gain or
1064 <guilabel>Edit</guilabel> which allows you to set the required gain
1065 precisely.
1066 </para>
1067
1068 <para>
1069 Consider, for example, the case in <xref linkend="fig-audio-map-eg1"/>.
1070 </para>
1071
1072 <figure id="fig-audio-map-eg1">
1073   <title>Audio map example 1</title>
1074   <mediaobject>
1075     <imageobject>
1076        <imagedata fileref="screenshots/audio-map-eg1&scs;"/>
1077     </imageobject>
1078   </mediaobject>
1079 </figure>
1080
1081 <para>
1082 Here, we have two channels in the source which are mapped to left and
1083 right, respectively, in the DCP.  The full green boxes show that the
1084 mapping is at unity gain (0dB) in each case.  Imagine that we modify
1085 the settings to those shown in <xref linkend="fig-audio-map-eg2"/>
1086 </para>
1087
1088 <figure id="fig-audio-map-eg2">
1089   <title>Audio map example 2</title>
1090   <mediaobject>
1091     <imageobject>
1092        <imagedata fileref="screenshots/audio-map-eg2&scs;"/>
1093     </imageobject>
1094   </mediaobject>
1095 </figure>
1096
1097 <para>
1098 We now have the content's streams mapped to left and right and also
1099 mixed together and placed in the DCP's centre channel.  The smaller
1100 green boxes on the centre mappings show that those channels are added
1101 with some non-unity gain; you can see by hovering the mouse pointer
1102 over those boxes that the gain for content channels 1 and 2 is -6dB
1103 when being sent to the centre channel and 0dB when being sent to left
1104 and right.
1105 </para>
1106
1107 <figure id="fig-audio-map-eg3">
1108   <title>Audio map example 3</title>
1109   <mediaobject>
1110     <imageobject>
1111        <imagedata fileref="screenshots/audio-map-eg3&scs;"/>
1112     </imageobject>
1113   </mediaobject>
1114 </figure>
1115
1116 <para>
1117 As a final example, the map in <xref linkend="fig-audio-map-eg3"/>
1118 shows the mapping of a 5.1 source into a 5.1 DCP.
1119 </para>
1120
1121 </section>
1122
1123
1124 <!-- ============================================================== -->
1125 <section>
1126 <title>Other controls</title>
1127
1128 <para>
1129 &lsquo;Audio Gain&rsquo; is used to alter the volume of the
1130 soundtrack.  The specified gain (in dB) will be applied to each sound
1131 channel of your content before it is written to the DCP.
1132 </para>
1133
1134 <para>
1135 If you use a sound processor that DCP-o-matic knows about, it can help
1136 you calculate changes in gain that you should apply.  Say, for
1137 example, that you make a test DCP and find that you have to run it at
1138 volume 5 instead of volume 7 to get a good sound level in the screen.
1139 If this is the case, click the <guilabel>Calculate...</guilabel>
1140 button next to the audio gain entry, and the dialogue box in <xref
1141 linkend="fig-calculate-audio-gain"/> will open.
1142 </para>
1143
1144 <figure id="fig-calculate-audio-gain">
1145   <title>Calculating audio gain</title>
1146   <mediaobject>
1147     <imageobject>
1148       <imagedata fileref="screenshots/calculate-audio-gain&scs;"/>
1149     </imageobject>
1150   </mediaobject>
1151 </figure>
1152
1153 <para>
1154 For our example, put 5 in the first box and 7 in the second and click
1155 <guilabel>OK</guilabel>.  DCP-o-matic will calculate the audio gain
1156 that it should apply to make this happen.  Then you can re-make the
1157 DCP (this will be reasonably fast, as the video data will already have
1158 been done) and it should play back at the correct volume with 7 on
1159 your sound-rack fader.
1160 </para>
1161
1162 <para>
1163 Current versions of DCP-o-matic only know about the Dolby CP650 and
1164 CP750.  If you use a different sound processor, and know the gain
1165 curve of its volume control, <ulink url="mailto:carl@dcpomatic.com">get in
1166 touch</ulink>.
1167 </para>
1168
1169 <para>
1170 <guilabel>Audio Delay</guilabel> is used to adjust the synchronisation
1171 between audio and video.  A positive delay will move the audio later
1172 with respect to the video, and a negative delay will move it earlier.
1173 </para>
1174
1175 </section>
1176 </section>
1177
1178
1179 <!-- ============================================================== -->
1180 <section>
1181 <title>Subtitles</title>
1182
1183 <para>
1184 The subtitles tab contains settings related to subtitles in your
1185 content, as shown in <xref linkend="fig-subtitles-tab"/>.
1186 </para>
1187
1188 <figure id="fig-subtitles-tab">
1189   <title>Subtitle settings tab</title>
1190   <mediaobject>
1191     <imageobject>
1192        <imagedata fileref="screenshots/subtitles-tab&scs;"/>
1193     </imageobject>
1194   </mediaobject>
1195 </figure>
1196
1197 <para>
1198 DCP-o-matic can either:
1199 </para>
1200
1201 <itemizedlist>
1202   <listitem>Extract &lsquo;image&rsquo; subtitles that are embedded in video files, or</listitem>
1203   <listitem>Use text subtitles from SubRip (<code>.srt</code>) or DCP XML files.</listitem>
1204 </itemizedlist>
1205
1206 <para>
1207 Image subtitles are represented using a set of bitmaps, as commonly
1208 used on DVD and BluRay.  Such subtitles can (currently) only be
1209 &lsquo;burnt&rsquo; into the DCP (that is, they are included in the
1210 image and not overlaid by the projector).
1211 </para>
1212
1213 <para>
1214 With text subtitles you have the choice to either burn-in or include
1215 the subtitles as separate subtitle &lsquo;asset&rsquo; within your DCP
1216 (in which case the projector overlays them onto the image on
1217 playback).  The difference between burn-in and overlay is
1218 illustrated by <xref linkend="fig-burn-in"/> and <xref
1219 linkend="fig-discrete"/>.
1220 </para>
1221
1222 <figure id="fig-burn-in">
1223   <title>Burnt-in subtitles</title>
1224   <mediaobject>
1225     <imageobject>
1226        <imagedata scale="100" fileref="diagrams/burn-in&dia;"/>
1227     </imageobject>
1228   </mediaobject>
1229 </figure>
1230
1231 <figure id="fig-discrete">
1232   <title>Separate subtitles</title>
1233   <mediaobject>
1234     <imageobject>
1235        <imagedata scale="100" fileref="diagrams/discrete&dia;"/>
1236     </imageobject>
1237   </mediaobject>
1238 </figure>
1239
1240 <para>
1241 The advantage of separate subtitles is that the same video content can
1242 be used for DCPs in many different languages.  This means that only a
1243 small text file needs to be changed for each target language, rather
1244 than a large video file.  It also means that the time-consuming video
1245 encoding need only be done once for the project rather than once for
1246 every language.
1247 </para>
1248
1249 <para>
1250 Select the <guilabel>Use Subtitles</guilabel> check-box to enable
1251 the subtitles in the selected content.
1252 </para>
1253
1254 <para>
1255 Select the <guilabel>Burn subtitles into image</guilabel> check-box to
1256 burn these subtitles into the image; if this is not ticked the
1257 subtitles will be included separately in the DCP to be rendered by the
1258 projector.  This check-box will always be ticked if you are using
1259 embedded &lsquo;image&rsquo; subtitles.
1260 </para>
1261
1262 <para>
1263 The <guilabel>X Offset</guilabel> and <guilabel>Y Offset</guilabel>
1264 controls move the subtitles around within the image.  The offsets are
1265 expressed as a percentage of the video frame size; 100% X offset is
1266 the entire width of the frame, and 100% Y offset is the entire height.
1267 Hence, to move the subtitles down by half the frame height you would
1268 use a Y offset of 50%.
1269 </para>
1270
1271 <para>
1272 The <guilabel>X Scale</guilabel> and <guilabel>Y Scale</guilabel>
1273 controls scale the subtitles.  Scale values of 1 make the subtitles
1274 the same size (relative to the size of the image) as they are on the
1275 original.  Values lower than 1 make them smaller, and values higher
1276 make them larger.  You can stretch the subtitles in either direction
1277 by specifying different values for X and Y scale.  Subtitles from DVD
1278 and Blu Ray sources are frequently larger (relative to the video
1279 frame) than those typically used for DCP, so it is often useful to
1280 scale such subtitles down using these controls.
1281 </para>
1282
1283 <para>
1284 The <guilabel>Stream</guilabel> control changes the subtitle stream
1285 that is used when the content has more than one.
1286 </para>
1287
1288 </section>
1289
1290
1291 <!-- ============================================================== -->
1292 <section>
1293 <title>Timing</title>
1294
1295 <para>
1296 The timing tab contains settings related to the timing of your
1297 content, as shown in <xref linkend="fig-timing-tab-detail"/>.
1298 </para>
1299
1300 <figure id="fig-timing-tab-detail">
1301   <title>Timing settings tab</title>
1302   <mediaobject>
1303     <imageobject>
1304        <imagedata fileref="screenshots/timing-tab&scs;"/>
1305     </imageobject>
1306   </mediaobject>
1307 </figure>
1308
1309 <para>
1310 Most of the timing tab's entries are <emphasis>time-codes</emphasis>.
1311 These are expressed as four numbers, as shown in <xref
1312 linkend="fig-timecode"/>.
1313 </para>
1314
1315 <figure id="fig-timecode">
1316   <title>Timecode</title>
1317   <mediaobject>
1318     <imageobject>
1319        <imagedata scale="100" fileref="diagrams/timecode&dia;"/>
1320     </imageobject>
1321   </mediaobject>
1322 </figure>
1323
1324 <para>
1325 <guilabel>Position</guilabel> is the time at which this piece of
1326 content should start within the DCP.  In most cases, this will be
1327 <code>0:0:0:0</code> to make the content start at the beginning of the
1328 DCP.
1329 </para>
1330
1331 <para>
1332 <guilabel>Full length</guilabel> is the length of the piece of
1333 content.  This can only be set for still-image content: for video or
1334 sound content, it is fixed by the nature of the content file.  If
1335 still-image content is being used you can set the length for which it
1336 should be displayed using this control.
1337 </para>
1338
1339 <para>
1340 <guilabel>Trim from start</guilabel> specifies the amount that should be trimmed from the start of the content.
1341 </para>
1342
1343 <para>
1344 <guilabel>Trim from end</guilabel> specifies the amount that should be trimmed from the end of the content.
1345 </para>
1346
1347 <para>
1348 <guilabel>Play length</guilabel> indicates how long this piece of
1349 content will be once the trims have been applied.  This will be equal
1350 to the full length minus <guilabel>trim-from-start</guilabel> and minus <guilabel>trim-from-end</guilabel>.
1351 </para>
1352
1353 <para>
1354 <guilabel>Video frame rate</guilabel> specifies the frame rate for
1355 still-image content.  It can also be used to override the detected
1356 frame rate of other content if DCP-o-matic has got it wrong.
1357 </para>
1358
1359 <para>
1360 Each timecode control has a <guilabel>Set</guilabel> which you should
1361 click when you have entered a new value for a timecode.  The
1362 <guilabel>Set</guilabel> button will make DCP-o-matic take account of
1363 any changes to the corresponding timecode.
1364 </para>
1365
1366 </section>
1367
1368
1369 <!-- ============================================================== -->
1370 <section>
1371 <title>Video processing pipeline</title>
1372
1373 <para>
1374 This section gives a little more detail about how DCP-o-matic process
1375 video as it takes it from a source and puts it into a DCP.
1376 </para>
1377
1378 <para>
1379 Consider, as a somewhat over-the-top example, that we have a 720 x 576
1380 image which is letterboxed with 36 black pixels each at the top and
1381 bottom, and the video content within the letterbox should be presented
1382 in the DCP at ratio of 2.39:1 within a 1.85:1 frame (such as might
1383 happen with a trailer).  The source image is shown in <xref
1384 linkend="fig-pipeline1"/>.
1385 </para>
1386
1387 <figure id="fig-pipeline1">
1388   <title>Example image to demonstrate video processing</title>
1389   <mediaobject>
1390     <imageobject>
1391        <imagedata scale="100" fileref="diagrams/pipeline1&dia;"/>
1392     </imageobject>
1393   </mediaobject>
1394 </figure>
1395
1396 <para>
1397 DCP-o-matic runs through the following steps when preparing an image for a DCP:
1398 </para>
1399
1400 <itemizedlist>
1401 <listitem>Crop</listitem>
1402 <listitem>Scale</listitem>
1403 <listitem>Place in container</listitem>
1404 </itemizedlist>
1405
1406 <para>
1407 First, some amount of the image can be cropped.  This is almost always
1408 used to remove black borders (letterboxing and/or pillarboxing) around
1409 images.
1410 </para>
1411
1412 <para>
1413 In our example image, we would use 36 pixels of crop from the top and
1414 bottom.  This would give the new image shown in <xref
1415 linkend="fig-pipeline2"/>.
1416 </para>
1417
1418 <figure id="fig-pipeline2">
1419   <title>Example image after cropping</title>
1420   <mediaobject>
1421     <imageobject>
1422        <imagedata scale="100" fileref="diagrams/pipeline2&dia;"/>
1423     </imageobject>
1424   </mediaobject>
1425 </figure>
1426
1427 <para>
1428 The next step is to scale the image.  Since this content should be
1429 presented in a 2.39:1 aspect ratio inside a 1.85:1 DCP we would select
1430 <guilabel>Scope</guilabel> from the <guilabel>Scale to</guilabel>
1431 option in the <guilabel>Video</guilabel> tab and
1432 <guilabel>Flat</guilabel> from the <guilabel>Container</guilabel>
1433 option in the <guilabel>DCP</guilabel> tab.
1434 </para>
1435
1436 <para>The <guilabel>Scale to</guilabel> option should always be set to
1437 the aspect ratio at which the content should be seen.  The
1438 <guilabel>Container</guilabel> option should be set to the preset that
1439 you want to use on the projector.  Of course, these two settings will
1440 often be the same.
1441 </para>
1442
1443 <para>
1444 Given the scaling and container information, DCP-o-matic will look at
1445 the DCP's container size, and then scale the source image up until one
1446 or both of its dimensions (width, height or both) fits the size of the
1447 container, all the while preserving the desired aspect ratio.
1448 </para>
1449
1450 <para>
1451 In our example here, the DCP's container is specified as 1.85:1 (so
1452 that the DCP will play back correctly using the projector's
1453 &lsquo;Flat&rsquo; preset).  At 2K, 1.85:1 is 1998 pixels by 1080.
1454 Scaling the source up whilst preserving its 1.85:1 aspect ratio will
1455 result in the image hitting the sides of the container first, at a
1456 size of 1998 x 836.  This gives us a new version of the image as shown
1457 in <xref linkend="fig-pipeline3"/>.
1458 </para>
1459
1460 <figure id="fig-pipeline3">
1461   <title>Example image after cropping and scaling</title>
1462   <mediaobject>
1463     <imageobject>
1464        <imagedata scale="100" fileref="diagrams/pipeline3&dia;"/>
1465     </imageobject>
1466   </mediaobject>
1467 </figure>
1468
1469 <para>
1470 The final step is to place the image into the DCP.  In this case,
1471 since we have a 2.39:1 image that should be presented as a 1.85:1 DCP,
1472 we have set the <guilabel>container</guilabel> in the
1473 <guilabel>DCP</guilabel> tab to be Scope.  Since the content has been
1474 scaled to 1998 x 836, and a Flat container is 1998 x 1080, there will
1475 be some black bars at the top and bottom of the image.  DCP-o-matic
1476 shares out this black equally, as shown in <xref
1477 linkend="fig-pipeline3"/>.
1478 </para>
1479
1480 <figure id="fig-pipeline4">
1481   <title>Example image in the DCP</title>
1482   <mediaobject>
1483     <imageobject>
1484        <imagedata scale="100" fileref="diagrams/pipeline4&dia;"/>
1485     </imageobject>
1486   </mediaobject>
1487 </figure>
1488
1489 </section>
1490
1491 </chapter>
1492
1493 <chapter xml:id="ch-dcp" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1494 <title>DCP settings</title>
1495
1496 <para>
1497 This chapter describes the settings that apply to the whole DCP.  The
1498 controls for these settings are in the <guilabel>DCP</guilabel> tab of
1499 the main window, as shown in <xref linkend="fig-dcp-tab"/>.
1500 </para>
1501
1502 <figure id="fig-dcp-tab">
1503   <title>DCP settings tab</title>
1504   <mediaobject>
1505     <imageobject>
1506        <imagedata fileref="screenshots/dcp-tab&scs;"/>
1507     </imageobject>
1508   </mediaobject>
1509 </figure>
1510
1511 <para>
1512 The first thing here is the name.  This is generally set to the title
1513 of the film that is being encoded.  If <guilabel>Use ISDCF
1514 name</guilabel> is not ticked, the name that you specify will be used
1515 as-is for the name of the DCP.  If <guilabel>Use ISDCF name</guilabel>
1516 is ticked, the name that you enter will be used as part of a
1517 ISDCF-compliant name.
1518 </para>
1519
1520 <para>
1521 Underneath the name field is a preview of the name that the DCP will
1522 get.  To use a ISDCF-compliant name, tick the <guilabel>Use ISDCF
1523 name</guilabel> check-box.  The ISDCF name will be composed using details
1524 of your content's soundtrack, the current date and other things that
1525 can be specified in the ISDCF name details dialogue box, which you can
1526 open by clicking on the <guilabel>Details</guilabel> button.
1527 </para>
1528
1529 <para>
1530 If you want to take the ISDCF-compliant name that DCP-o-matic
1531 generates and modify it, click <guilabel>Copy as name</guilabel> and
1532 the ISDCF name will be copied into the <guilabel>Name</guilabel> box.
1533 You can then edit it as you wish.  The DCP name should not matter (in
1534 that it should not affect how the DCP ingests or plays) but
1535 projectionists will appreciate it if you use the standard naming
1536 scheme as it makes it easier to identify details of the content.
1537 </para>
1538
1539 <para>
1540 The <guilabel>Content Type</guilabel> option can be
1541 &lsquo;feature&rsquo;, &lsquo;trailer&rsquo; or whatever; select the
1542 required type from the drop-down list.  On some projection systems
1543 this will affect where your content appears in the projector's server
1544 user interface, so take care to select an appropriate type.
1545 </para>
1546
1547 <para>
1548 The <guilabel>Signed</guilabel> check-box sets whether or not the DCP
1549 is signed.  This is rarely important; if in doubt, tick it.
1550 </para>
1551
1552 <para>
1553 The <guilabel>Encrypted</guilabel> check-box will set whether the DCP
1554 should be encrypted or not.  If this is ticked, the DCP will require a
1555 KDM to play back.  Encryption is discussed in <xref
1556 linkend="ch-encryption"/>.
1557 </para>
1558
1559 <para>
1560 If you use encryption DCP-o-matic will generate a random encryption
1561 key for you.  To specify your own key, click the
1562 <guilabel>Edit..</guilabel> button next to the key.
1563 </para>
1564
1565 <para>
1566 The <guilabel>Reels</guilabel> and <guilabel>Reel length</guilabel>
1567 controls specify how the DCP will be split up into
1568 &lsquo;reels&rsquo;.  See <xref linkend="sec-reels"/> below.
1569 </para>
1570
1571 <para>
1572 The <guilabel>Standard</guilabel> option specifies which of the two
1573 DCP standards DCP-o-matic should use.  If in doubt, use SMPTE (the
1574 more modern of the two).
1575 </para>
1576
1577 <para>
1578 At the bottom of the DCP tab are a further two tabs, one each to
1579 contain the settings for the DCP's video and audio parts.
1580 </para>
1581
1582 <para>
1583 The <guilabel>Container</guilabel> option sets the ratio of the image
1584 in the DCP.  If this ratio is different to the ratio used for any
1585 content, DCP-o-matic will pad the content with black.  In simple cases
1586 this should be set to the same ratio as that for the the primary piece
1587 of video content.  Alternatively, you might want to pillarbox a small
1588 format into a Flat container: in this case, select the small format
1589 for the content's ratio and &lsquo;Flat&rsquo; for the DCP.
1590 </para>
1591
1592 <para>
1593 The <guilabel>Frame Rate</guilabel> control sets the frame rate of
1594 your DCP.  This can be a little tricky to get right.  Ideally, you
1595 want it to be the same as the video content that you are using.  If it
1596 is not the same, DCP-o-matic must resort to some tricks to alter your
1597 content to fit the specified frame rate.  Frame rates are discussed in
1598 more detail in <xref linkend="ch-frame-rates"/>.
1599 </para>
1600
1601 <para>
1602 The <guilabel>Use best</guilabel> button sets the DCP video frame rate
1603 to what DCP-o-matic thinks is the best given the content that you have
1604 added.
1605 </para>
1606
1607 <para>
1608 The <guilabel>3D</guilabel> button will set your DCP to 3D mode if it
1609 is checked.  A 3D DCP will then be created, and any 2D content will be
1610 made 3D compatible by repeating the same frame for both left and right
1611 eyes.  A 3D DCP can be played back on many 3D systems (e.g. Dolby 3D,
1612 Real-D etc.) but not on a 2D system.
1613 </para>
1614
1615 <para>
1616 The <guilabel>Resolution</guilabel> tab allows you to choose the
1617 resolution for your DCP.  Use 2K unless you have content that is of
1618 high enough resolution to be worth presenting in 4K.
1619 </para>
1620
1621 <para>
1622 The <guilabel>JPEG2000 bandwidth</guilabel>; setting changes how big
1623 the final image files used within the DCP will be.  Larger numbers
1624 will give better quality, but correspondingly larger DCPs.  The
1625 bandwidth can be between 50 and 250 megabits per second (Mbit/s).
1626 Most commercial DCPs use bit rates between 75 and 125 MBit/s.
1627 </para>
1628
1629 <para>
1630 The <guilabel>Audio Channels</guilabel> control sets the number of
1631 audio channels that the DCP will have.  If the DCP has any channels
1632 for which there is no content audio they will be replaced by silence.
1633 You can only set an even number of channels here, since that is
1634 required by the DCI standard.  If you want an odd number of channels,
1635 set the DCP channel count to one greater than you need and the
1636 unused channel will be filled with silence.
1637 </para>
1638
1639 <para>
1640 The <guilabel>Processor</guilabel> control allows you to select a
1641 process to apply to the audio before it goes into the DCP.  Two processes are currently provided:
1642 </para>
1643
1644 <itemizedlist>
1645 <listitem>Mid-side decode &mdash; this will take a L/R
1646 stereo input and extract the common part (corresponding to the
1647 &lsquo;Mid&rsquo; in a mid-side signal) into the DCP's centre channel.
1648 The remaining L/R parts will be kept in the L/R channels of the DCP.
1649 This may be useful to make near-field L/R mixes more compatible with
1650 cinema audio systems.</listitem>
1651 <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:
1652 <itemizedlist>
1653 <listitem>DCP L is input L bandpass-filtered between 1.9kHz and 4.8kHz.</listitem>
1654 <listitem>DCP R is input R bandpass-filtered between 1.9kHz and 4.8kHz.</listitem>
1655 <listitem>DCP C is input L mixed with input R, taken down by 3dB and then bandpass-filtered between 150Hz and 1.9kHz.</listitem>
1656 <listitem>DCP Lfe is input L mixed with input R, taken down by 3dB and then bandpass-filtered between 20Hz and 150Hz.</listitem>
1657 <listitem>DCP Ls is input L bandpass-filtered between 4.8kHz and 20kHz.</listitem>
1658 <listitem>DCP Rs is input R bandpass-filtered between 4.8kHz and 20kHz.</listitem>
1659 </itemizedlist>
1660 <para>
1661 This upmixing algorithm is due to Gérald Maruccia.
1662 </para>
1663 </listitem>
1664 <listitem>Stereo to 5.1 up-mixer B &mdash; this uses a different approach:
1665 <itemizedlist>
1666   <listitem>DCP L is input L.</listitem>
1667   <listitem>DCP R is input R.</listitem>
1668   <listitem>DCP C is input L + input R taken down by 3dB.</listitem>
1669   <listitem>DCP Lfe is DCP C bandpass filtered between 20Hz and 150Hz.</listitem>
1670   <listitem>DCP Ls and Rs are input L - input R with a 20ms delay.</listitem>
1671 </itemizedlist>
1672 </listitem>
1673 </itemizedlist>
1674
1675 <!-- ============================================================== -->
1676 <section xml:id="sec-reels">
1677 <title>Reels</title>
1678
1679 <para>
1680 A &lsquo;reel&rsquo; in a DCP is a subsection of the DCP, in the same
1681 way as a 35mm reel is a section of a film.  A DCP can be split up into
1682 any number of reels and the joins (the equivalent to 35mm splices)
1683 between the reels are seamless.
1684 </para>
1685
1686 <para>
1687 There is no reason why you can't just use a single reel for the whole
1688 of your DCP, as there is no limit on their length.  Many people choose
1689 to do this.
1690 </para>
1691
1692 <para>
1693 There are, however, some possible advantages of splitting things up
1694 into reels:
1695 </para>
1696
1697 <itemizedlist>
1698 <listitem>
1699 The picture, sound and subtitle data of the DCP will be
1700 split up into more smaller files on disk, rather than fewer larger
1701 files.  This can be useful if the DCP is to be transferred on storage
1702 that have file size limits.  The FAT32 filesystem, for example, can
1703 only hold files smaller than 4Gb.  A 6Gb DCP with a single reel could
1704 not be transferred using a FAT32-formatted disk.  If that DCP were
1705 split up into two 3Gb reels it could be transferred.
1706 </listitem>
1707 <listitem>
1708 It is easier to re-use DCP components if they are in reels.  Consider,
1709 for example, a film company who wants to put a 5 second ident onto the
1710 beginning of DCPs that they distribute.  If they receive a feature
1711 film DCP they can modify it to add their ident as a separate reel.
1712 This is easier than attaching the picture data in the DCP.
1713 </listitem>
1714 </itemizedlist>
1715
1716 <para>
1717 DCP-o-matic offers three options for setting up the reels in your DCP:
1718 single reel, split by video content or custom.
1719 </para>
1720
1721 <para>
1722 <guilabel>Single reel</guilabel>, as its name suggests, keeps the whole DCP as one reel.
1723 This is a perfectly good option if you have no particular reason to
1724 need reels.
1725 </para>
1726
1727 <para>
1728 <guilabel>Split by video content</guilabel> puts each piece of source
1729 video content in its own reel, as shown in <xref linkend="fig-reels-by-video"/>.
1730 </para>
1731
1732 <figure id="fig-reels-by-video">
1733 <title>Making reels using split by video content</title>
1734 <mediaobject><imageobject><imagedata scale="100" fileref="diagrams/reels-by-video&dia;"/></imageobject></mediaobject>
1735 </figure>
1736
1737 <para>
1738 Here we have three video files (<code>ident.mp4</code>,
1739 <code>feature.ts</code> and <code>cred.mov</code>).  With
1740 <guilabel>split by video content</guilabel> DCP-o-matic makes a new
1741 reel to hold each video file.
1742 </para>
1743
1744 <para>
1745 <guilabel>Custom</guilabel> splits reels by the size of the files that
1746 will make up their video content.  With <guilabel>Custom</guilabel>
1747 you must specify a reel length in Gb.  Then no file in the DCP will be larger than this reel length.
1748 </para>
1749
1750 </section>
1751
1752
1753 <!-- ============================================================== -->
1754 <section>
1755 <title>Show audio</title>
1756
1757 <para>
1758 The <guilabel>Show Audio</guilabel> button will instruct DCP-o-matic
1759 to examine the audio in your content and plot a graph of its level
1760 over time.  This can be useful for getting a rough idea of how loud
1761 the sound will be in the cinema auditorium.  A typical plot is shown
1762 in <xref linkend="fig-audio-plot"/>
1763 </para>
1764
1765 <figure id="fig-audio-plot">
1766   <title>Audio plot</title>
1767   <mediaobject>
1768     <imageobject>
1769        <imagedata fileref="screenshots/audio-plot&scs;"/>
1770     </imageobject>
1771   </mediaobject>
1772 </figure>
1773
1774 <para>
1775 The plot gives the audio level (vertical axis, in dB) with time
1776 (horizontal axis).  0dB represents full scale, so if there is anything
1777 near this you are in danger of clipping the projector's audio outputs.
1778 </para>
1779
1780 <para>
1781 There are two plot types: the peak level and the RMS, which can be
1782 shown or hidden using the check-boxes on the right hand side of the
1783 window.
1784 </para>
1785
1786 <para>
1787 The channel check-boxes will show or hide the plot(s) for
1788 the corresponding channels in the DCP.
1789 </para>
1790
1791 <para>
1792 The smoothing slider applies a variable degree of temporal smoothing
1793 to the plots, which can make them easier to read in some cases.
1794 </para>
1795
1796 <para>
1797 Obviously the audio plot is no substitute for listening in an
1798 auditorium, but it can be useful to get levels in the right rough area.
1799 </para>
1800
1801 </section>
1802
1803 </chapter>
1804
1805 <chapter xml:id="ch-encryption" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1806 <title>Encryption</title>
1807
1808 <para>
1809 It is not required that DCPs be encrypted, but they can be.  This
1810 chapter discusses the basic principles of DCP encryption, and how
1811 DCP-o-matic can create encrypted DCPs and KDMs for them.
1812 </para>
1813
1814
1815 <!-- ============================================================== -->
1816 <section>
1817 <title>Basics</title>
1818
1819 <para>
1820 DCPs can be encrypted.  This means that the picture and sound data are
1821 encoded in such a way that only cinemas &lsquo;approved&rsquo; by the
1822 DCP's creators can read them.  In particular, this means copies of the
1823 DCP can be distributed by insecure means: if an ne'er-do-well called
1824 Mallory obtains a hard drive containing an encrypted DCP, there is no
1825 way that he can play it.  Only those cinemas who receive a correct key
1826 delivery message (KDM) can play the DCP.
1827 </para>
1828
1829
1830 <!-- ============================================================== -->
1831 <section>
1832 <title>How it works (in a nutshell)</title>
1833
1834 <para>
1835 This section attempts to summarise how DCP encryption works.  You can
1836 skip it if you like.  You may need some knowledge of encryption
1837 methods to understand it.
1838 </para>
1839
1840 <para>
1841 We suppose that we are trying to send a DCP to
1842 Alice's cinema without a troublemaker called Mallory being able to
1843 watch it himself.
1844 </para>
1845
1846 <para>
1847 There are two main families of encryption techniques.  The first,
1848 symmetric-key encryption, allows us to encode some data using some
1849 numeric key.  After encoding, no-one can decode the data unless they
1850 know the key.
1851 </para>
1852
1853 <para>
1854 The first step in a DCP encryption is to encode its data with some key
1855 using symmetric-key encryption.  The encrypted DCP can then be sent
1856 anywhere, safe in the knowledge that even if Mallory got hold of a
1857 copy, he could not decrypt it.
1858 </para>
1859
1860 <para>
1861 Alice, however, needs to know the key so she can play the DCP in her
1862 cinema.  A simple approach might be for us to send Alice the key.
1863 However, if Mallory can intercept the DCP, he might also be able to
1864 intercept our communication of the key to Alice.  Furthermore, if Alice
1865 happened to know Mallory, she could just send him a copy of the key.
1866 </para>
1867
1868 <para>
1869 The clever bit in the process requires the use of public-key
1870 encryption.  With this technique we can encrypt a block of data using
1871 some &lsquo;public&rsquo; key.  That data can then only be decrypted
1872 using a corresponding private key which is
1873 <emphasis>different</emphasis> to the public key.  The private and
1874 public keys form a pair which are related mathematically, but it is
1875 extremely hard (or rather, virtually impossible) to derive the private
1876 key from the public key.
1877 </para>
1878
1879 <para>
1880 Public-key encryption allows us to distribute the DCP's key to Alice
1881 securely.  The manufacturer of Alice's projector generates a public
1882 and private key.  They hide the private key deep inside the bowels of
1883 the projector (inside an integrated circuit) where no-one can read it.
1884 They then make the public key available to anyone who is interested.
1885 </para>
1886
1887 <para>
1888 We take our DCP's symmetric key and encrypt it using the public key of
1889 Alice's projector.  We send the result to Alice over email (using a
1890 format called a Key Delivery Message, or KDM).  Her projector then
1891 decrypts our message using its private key, yielding the magic
1892 symmetric key which can decrypt the DCP.
1893 </para>
1894
1895 <para>
1896 If is fine if Mallory intercepts our email to Alice, since the only
1897 key which can decrypt the message is the private key buried inside
1898 Alice's projector.  The projector manufacturer is very careful that
1899 no-one ever finds out what this key is.  Our DCP is secure: only Alice
1900 can play it back, since only her projector knows the key (even Alice
1901 does not).
1902 </para>
1903
1904 </section>
1905 </section>
1906
1907
1908 <!-- ============================================================== -->
1909 <section>
1910 <title>Encryption using DCP-o-matic</title>
1911
1912 <para>
1913 There are two steps to distributing an encrypted DCP.  First, the
1914 DCP's data must be encrypted, and secondly KDMs must be generated for
1915 those cinemas that are allowed to play the DCP.
1916 </para>
1917
1918 <para>
1919 The first part is simple: ticking the <guilabel>Encrypted</guilabel>
1920 box in the <guilabel>DCP</guilabel> tab will instruct DCP-o-matic to
1921 encrypt the DCP that it makes using a random key that DCP-o-matic
1922 generates.  The key will be written to the film's metadata file, which
1923 should be kept secure.
1924 </para>
1925
1926 <para>
1927 A DCP that is generated with the <guilabel>Encrypted</guilabel> box
1928 ticked will not play on any projector as-is (it will be marked as
1929 &lsquo;locked&rsquo;, or whatever the projector manufacturer's term
1930 is).
1931 </para>
1932
1933 <para>
1934 The second part of distributions is to generate KDMs for the cinemas
1935 that you wish to allow to play your DCP.  There are two approaches to
1936 this within DCP-o-matic: using the project, or using a DKDM.  These
1937 approaches are now described in turn.
1938 </para>
1939
1940 <section>
1941 <title>Creating KDMs from a DCP-o-matic project</title>
1942
1943 <para>
1944 You can create KDMs from inside a DCP-o-matic project using the
1945 <guilabel>Make KDMs</guilabel> option on the <guilabel>Jobs</guilabel>
1946 menu.  This will open the KDM dialogue box, as shown in <xref
1947 linkend="fig-kdm"/>.
1948 </para>
1949
1950 <figure id="fig-kdm">
1951   <title>KDM dialog</title>
1952   <mediaobject>
1953     <imageobject>
1954       <imagedata fileref="screenshots/kdm&scs;"/>
1955     </imageobject>
1956   </mediaobject>
1957 </figure>
1958
1959 <para>
1960 In order to generate KDMs for a particular projector, you need to know
1961 its <emphasis>certificate</emphasis>.  These are usually made
1962 available by the projector manufacturers as text files with a
1963 <code>.pem</code> extension.
1964 </para>
1965
1966 <para>
1967 DCP-o-matic can store these certificates along with details of their
1968 cinemas and screens within those cinemas.  Each screen has a
1969 certificate for its projector (and optionally certificates for other
1970 trusted devices, such as the sound processor).  DCP-o-matic can
1971 generate KDMs for any screens that it knows about.
1972 </para>
1973
1974 <para>
1975 To add a cinema, click <guilabel>Add Cinema...</guilabel>.  This opens
1976 a dialogue box into which you can enter the cinema's name, and
1977 optionally an email address.  This email address can be used to
1978 get DCP-o-matic to deliver KDMs via email.
1979 </para>
1980
1981 <para>
1982 Once you have added a cinema, select it by clicking on its name, then
1983 click <guilabel>Add Screen...</guilabel>.  The resulting dialogue
1984 allows you to enter a name for the screen and load in its certificate
1985 from a file.  The certificate should be in SHA256 PEM format.
1986 </para>
1987
1988 <para>
1989 Alternatively, certificates for projection systems made by some
1990 manufacturers can be downloaded from databases provided by the
1991 manufacturer.  Currently this is supported for Doremi and Dolby
1992 equipment.  If you are targeting a screen with equipment by one of
1993 these manufacturers you can click <guilabel>Download</guilabel> then
1994 enter the serial number of the server in the screen and click
1995 <guilabel>Download</guilabel> again and, all being well, the certificate
1996 will be fetched.
1997 </para>
1998
1999 <para>
2000 Using the download system you will need to know the serial number of
2001 the media server in use in the screen.  Most cinema projection or
2002 technical departments will know these serial numbers.
2003 </para>
2004
2005 <para>
2006 Note that the reliability of the manufacturers' certificate databases
2007 cannot be guaranteed.  It is vital that KDMs are tested by the
2008 destination cinema will in advance of show time to identify any
2009 problems.
2010 </para>
2011
2012 <para>
2013 Once you have set up all the screens that you need KDMs for, select
2014 the CPL that you want to create the KDM for.  You can use the
2015 drop-down list to select the CPLs in the current film project, or load
2016 a CPL from somewhere else.  Select the cinemas and/or screens that you
2017 want KDMs for and fill in the start and end dates and times.
2018 </para>
2019
2020 <para>
2021 You must also select the type of KDM that you want to generate.  If in
2022 doubt, use <guilabel>Modified Transitional 1</guilabel>.
2023 </para>
2024
2025 <para>
2026 Finally, choose what you want to do with the KDMs.  They can be
2027 written to disk, to a location that you can specify by clicking
2028 <guilabel>Browse</guilabel>.  Alternatively, if you choose
2029 <guilabel>Send by email</guilabel> the KDMs will be zipped up and
2030 emailed to the appropriate cinema email addresses.  Click OK to
2031 generate the KDMs.
2032 </para>
2033
2034 </section>
2035
2036 <section>
2037 <title>Creating KDMs using a DKDM</title>
2038 </section>
2039
2040 <para>
2041 It can be inconvenient to need a whole DCP-o-matic project just to
2042 create KDMs for its film.  Perhaps you want to archive the project to
2043 save space, or create KDMs on a different machine.  In such situations
2044 it is easier to use a DKDM.  This is a normal KDM, but instead of
2045 being targeted at a projection system (to allow it to decrypt the
2046 content) it is targeted at a particular users's certificate.  This
2047 means that the certificate owner can create new KDMs for other users.
2048 The DKDM holds everything that is required to create further KDMs.
2049 </para>
2050
2051 <para>
2052 Sometimes it is useful to create DKDMs that can be used by
2053 DCP-o-matic.  If you create such a DKDM you can keep it and then, at
2054 any point in the future, use DCP-o-matic's standalone KDM creator to
2055 make KDMs for the DKDM's film for any cinema.
2056 </para>
2057
2058 <para>
2059 In other cases a DKDM is sent to a 3rd party so that they can create
2060 KDMs for your films.  This can be useful if, for example, you have a
2061 distributor who provides 24-hour KDM support to cinemas and can create
2062 KDMs for anybody that requires them at short notice.
2063 </para>
2064
2065 <para>
2066 To create a DKDM for DCP-o-matic, open your encrypted project and
2067 select <guilabel>Make DKDM for DCP-o-matic...</guilabel> from the
2068 <guilabel>Jobs</guilabel> menu.  Select the CPL that you want to make
2069 the DKDM for and click <guilabel>OK</guilabel>.  This DKDM will then
2070 be available in the KDM creator.  This is a separate program which you
2071 can start from the same place that you start the &lsquo;Normal&rsquo;
2072 DCP-o-matic.  Its window is shown in <xref linkend="fig-kdm-creator"/>.
2073 </para>
2074
2075 <figure id="fig-kdm-creator">
2076   <title>The KDM creator</title>
2077   <mediaobject>
2078     <imageobject>
2079       <imagedata fileref="screenshots/kdm-creator&scs;"/>
2080     </imageobject>
2081   </mediaobject>
2082 </figure>
2083
2084 <para>
2085 To create KDMs, select the cinema(s) and/or screens that you want KDMs
2086 to be created for, the date range, the DCP that the KDMs are for and
2087 the destination for the KDMs and click <guilabel>Create
2088 KDMs</guilabel>.
2089 </para>
2090
2091 <para>
2092 By default the <guilabel>DKDM</guilabel> list will list any DCPs for
2093 which you have clicked <guilabel>Make DKDM for
2094 DCP-o-matic</guilabel>in the main DCP-o-matic program.  If you have
2095 other DKDMs you can add them by clicking <guilabel>Add...</guilabel> and
2096 specifying the file containing the DKDM.
2097 </para>
2098
2099 <para>
2100 If another organisation wants to send you a DKDM they will ask you for
2101 a target certificate.  You can get DCP-o-matic's target certificate by
2102 opening <guilabel>Preferences</guilabel> and clicking <guilabel>Export
2103 DCP decryption certificate...</guilabel> in the <guilabel>Keys</guilabel>
2104 tab.
2105
2106 </para>
2107
2108 </section>
2109
2110 <section>
2111 <title>Encryption overview</title>
2112
2113 <figure id="fig-encryption-overview">
2114   <title>Overview of encryption</title>
2115   <mediaobject>
2116     <imageobject>
2117       <imagedata fileref="diagrams/crypt&dia;"/>
2118     </imageobject>
2119   </mediaobject>
2120 </figure>
2121
2122 </section>
2123 </chapter>
2124
2125
2126
2127 <!-- ============================================================== -->
2128 <chapter xml:id="ch-preferences" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
2129 <title>Preferences</title>
2130
2131 <para>
2132 DCP-o-matic provides a few preferences which can be used to modify its
2133 behaviour.  This chapter explains those options.
2134 </para>
2135
2136
2137 <!-- ============================================================== -->
2138 <section>
2139 <title>The preferences dialogue</title>
2140
2141 <para>
2142 The preferences dialogue is opened by choosing
2143 <guilabel>Preferences...</guilabel> from the <guilabel>Edit</guilabel>
2144 menu.  The dialogue is split into seven tabs.
2145 </para>
2146
2147 <!-- ============================================================== -->
2148 <section>
2149 <title>General</title>
2150
2151 <para>
2152 The general tab is shown in <xref linkend="fig-prefs-general"/>.
2153 </para>
2154
2155 <figure id="fig-prefs-general">
2156   <title>General preferences</title>
2157   <mediaobject>
2158     <imageobject>
2159       <imagedata fileref="screenshots/prefs-general&scs;"/>
2160     </imageobject>
2161   </mediaobject>
2162 </figure>
2163
2164
2165 <!-- ============================================================== -->
2166 <section>
2167 <title>Language</title>
2168
2169 <para>
2170 If you tick the <guilabel>Set Language</guilabel> checkbox and choose
2171 a language from the list, that language will be used for DCP-o-matic.
2172 You will need to restart DCP-o-matic to see the new language.
2173 </para>
2174
2175 <para>
2176 The translations for DCP-o-matic have been contributed by helpful
2177 users.  If your language is not on the last, head to <ulink
2178 url="http://dcpomatic.com/i18n.php">the DCP-o-matic website</ulink> to
2179 read about how to contribute a translation.
2180 </para>
2181 </section>
2182
2183
2184 <!-- ============================================================== -->
2185 <section>
2186 <title>Threads</title>
2187
2188 <para>
2189 When DCP-o-matic is encoding DCPs it can use multiple parallel threads
2190 to speed things up.  Set this value to the number of threads
2191 DCP-o-matic should use.  This should normally be the number of
2192 processors (or processor cores) in your machine.  DCP-o-matic will try
2193 to set this up correctly when you run it for the first time.
2194 </para>
2195
2196 </section>
2197
2198 <!-- ============================================================== -->
2199 <section>
2200 <title>Updates</title>
2201
2202 <para>
2203 The <guilabel>Check for updates on startup</guilabel> option, if
2204 enabled, will tell DCP-o-matic to check on <ulink
2205 url="http://dcpomatic.com/">dcpomatic.com</ulink> to see if there any
2206 newer versions of DCP-o-matic then the one you are running.  If so, a
2207 dialogue box will open with a link to download the new version.
2208 available
2209 </para>
2210
2211 <para>
2212 The <guilabel>Check for testing updates as well as stable
2213 ones</guilabel> option will also check for test updates as well as
2214 those that are formally &lsquo;released&rsquo;. This is useful if you
2215 like to live on the bleeding edge!
2216 </para>
2217 </section>
2218
2219 <!-- ============================================================== -->
2220 <section>
2221 <title>Issuer and creator</title>
2222
2223 <para>
2224 With these controls you can set the issuer and creator strings that
2225 will be put into the DCPs which you create.
2226 </para>
2227 </section>
2228
2229 </section>
2230
2231 <!-- ============================================================== -->
2232 <section>
2233 <title>Defaults</title>
2234
2235 <para>
2236 The defaults tab is shown in <xref linkend="fig-prefs-defaults"/>.
2237 </para>
2238
2239 <figure id="fig-prefs-defaults">
2240   <title>Defaults preferences</title>
2241   <mediaobject>
2242     <imageobject>
2243       <imagedata fileref="screenshots/prefs-defaults&scs;"/>
2244     </imageobject>
2245   </mediaobject>
2246 </figure>
2247
2248 <para>
2249 The options in this tab simply allow you to set up default values for
2250 various properties of new films.
2251 </para>
2252
2253 </section>
2254
2255 <!-- ============================================================== -->
2256 <section>
2257 <title>Servers</title>
2258
2259 <para>
2260 The servers tab is shown in <xref linkend="fig-prefs-servers"/>.
2261 </para>
2262
2263 <figure id="fig-prefs-servers">
2264   <title>Servers preferences</title>
2265   <mediaobject>
2266     <imageobject>
2267       <imagedata fileref="screenshots/prefs-servers&scs;"/>
2268     </imageobject>
2269   </mediaobject>
2270 </figure>
2271
2272 <para>
2273 If <guilabel>Use all servers</guilabel> is ticked DCP-o-matic will
2274 locate encoding servers automatically (see <xref
2275 linkend="ch-servers"/>).
2276 </para>
2277
2278 <para>
2279 Instead of this (or in addition) servers can be specified explicitly.
2280 To add a server, click <guilabel>Add...</guilabel> and enter the host
2281 name or IP address of the server to use.
2282 </para>
2283
2284 </section>
2285
2286
2287 <!-- ============================================================== -->
2288 <section xml:id="sec-prefs-keys">
2289 <title>Keys</title>
2290
2291 <para>
2292 The Keys tab (shown in <xref linkend="fig-prefs-keys"/>) holds options
2293 related to the keys and certificates used in some parts of DCP
2294 creation.
2295 </para>
2296
2297 <figure id="fig-prefs-keys">
2298   <title>Keys preferences</title>
2299   <mediaobject>
2300     <imageobject>
2301       <imagedata fileref="screenshots/prefs-keys&scs;"/>
2302     </imageobject>
2303   </mediaobject>
2304 </figure>
2305
2306 <para>
2307 At the top of the tab is the chain of certificates that will be used
2308 to sign DCPs and KDMs.  DCP-o-matic creates a random chain when you
2309 first run it and if you are happy to use this chain you can ignore the
2310 preferences.  Otherwise, you can add or remove certificates from the
2311 chain using the <guilabel>Add...</guilabel> and
2312 <guilabel>Remove</guilabel> buttons.
2313 </para>
2314
2315 <para>
2316 If you want DCP-o-matic to re-create the certificate chain (using new,
2317 random certificates) click <guilabel>Re-make
2318 certificates...</guilabel> and specify your organisation and common
2319 names in the dialogue box that opens.
2320 </para>
2321
2322 <para>
2323 Underneath the certificate chain is the private key that corresponds
2324 to the leaf certificate in the chain.  You can specify your own
2325 private key by clicking <guilabel>Load...</guilabel>.  You must do
2326 this if you change the leaf certificate, so that the leaf private key
2327 corresponds to the public key held in the leaf certificate.
2328 </para>
2329
2330 <para>
2331 Underneath the details of the certificate chain and private key for
2332 signing of DCPs and KDMs is a second chain and key which is used by
2333 DCP-o-matic when you import an encrypted DCP as a piece of content.
2334 The leaf certificate of this chain contains the public key that should
2335 be used when targeting a KDM at DCP-o-matic.
2336 </para>
2337
2338 <para>
2339 If you want to import an encrypted DCP you will need to give the
2340 decryption certificate to the distributor of the DCP so that they can
2341 generate a DKDM for you.  You can save this certificate to disk by
2342 clicking <guilabel>Export DCP decryption certificate...</guilabel>.  As
2343 with the signing chain, DCP-o-matic will create a certificate chain
2344 and private key for you.  You can also choose to load your own
2345 certificates and key or re-make the chain and key with new, random
2346 values.
2347 </para>
2348
2349 </section>
2350
2351 <!-- ============================================================== -->
2352 <section xml:id="sec-prefs-tms">
2353 <title>TMS</title>
2354 <titleabbrev xml:id="sec-prefs-tms-short">TMS preferences</titleabbrev>
2355
2356 <para>
2357 The TMS tab (shown in <xref linkend="fig-prefs-tms"/>) gives some
2358 options for specifying details about your theatre management system
2359 (TMS).  If you do this, and your TMS accepts SSH or FTP connections,
2360 you can upload DCPs directly from DCP-o-matic to the TMS using the
2361 <guilabel>Send DCP to TMS</guilabel> option in the
2362 <guilabel>Jobs</guilabel> menu.
2363 </para>
2364
2365 <figure id="fig-prefs-tms">
2366   <title>TMS preferences</title>
2367   <mediaobject>
2368     <imageobject>
2369       <imagedata fileref="screenshots/prefs-tms&scs;"/>
2370     </imageobject>
2371   </mediaobject>
2372 </figure>
2373
2374 <para>
2375 <guilabel>Protocol</guilabel> should be set to SCP or FTP as
2376 appropriate for your TMS.  We know that the Arts Alliance Media (AAM)
2377 and the Doremi ranges uses SCP connections, and that Dolby's TMSs use
2378 FTP.  Do let us know if you use any other type of TMS with the
2379 <guilabel>Send DCP to TMS</guilabel> feature.
2380 </para>
2381
2382 <para>
2383 <guilabel>TMS IP address</guilabel> should be set to the IP address of
2384 your TMS, <guilabel>TMS target path</guilabel> to the place that DCPs
2385 should be uploaded to (which will be relative to the home directory of
2386 the SSH or FTP user).  Finally, the user name and password are the
2387 credentials required to log into the TMS via SSH or FTP.
2388 </para>
2389
2390 <para>
2391 Note that for this to work on Doremi servers you will need to set the
2392 <code>PasswordAuthentication</code> option in your server's
2393 <code>sshd_config</code> to <code>yes</code>.
2394 </para>
2395
2396 </section>
2397
2398
2399 <!-- ============================================================== -->
2400 <section>
2401 <title>KDM email</title>
2402
2403 <para>
2404 The KDM email is shown in <xref linkend="fig-prefs-kdm-email"/>.
2405 </para>
2406
2407 <figure id="fig-prefs-kdm-email">
2408   <title>KDM email preferences</title>
2409   <mediaobject>
2410     <imageobject>
2411       <imagedata fileref="screenshots/prefs-kdm-email&scs;"/>
2412     </imageobject>
2413   </mediaobject>
2414 </figure>
2415
2416 <para>
2417 This is a template for the email that is used to send KDMs out to
2418 cinemas.  You can change it to say whatever you like.  A few
2419 &lsquo;magic&rsquo; strings will be replaced by information from the
2420 KDM that is being sent:
2421 </para>
2422
2423 <table>
2424 <title>&lsquo;Magic&rsquo; KDM strings</title>
2425 <tgroup cols='2' align='left' colsep='1' rowsep='1'>
2426 <tbody>
2427 <row>
2428 <entry><code>$CPL_NAME</code></entry><entry>DCP title</entry>
2429 </row>
2430 <row>
2431 <entry><code>$CINEMA_NAME</code></entry><entry>Cinema name</entry>
2432 </row>
2433 <row>
2434 <entry><code>$SCREENS</code></entry><entry>Name of screen or screens that KDMs are being generated for</entry>
2435 </row>
2436 <row>
2437 <entry><code>$START_TIME</code></entry><entry>The time from which the KDMs are valid</entry>
2438 </row>
2439 <row>
2440 <entry><code>$END_TIME</code></entry><entry>The time until which the KDMs are valid</entry>
2441 </row>
2442 </tbody>
2443 </tgroup>
2444 </table>
2445
2446 <para>
2447 The <guilabel>Reset to default text</guilabel> will replace the current KDM email with DCP-o-matic's default.
2448 </para>
2449
2450 </section>
2451
2452
2453 <!-- ============================================================== -->
2454 <section xml:id="sec-prefs-advanced">
2455 <title>Advanced</title>
2456 <titleabbrev xml:id="sec-prefs-advanced-short">Advanced preferences</titleabbrev>
2457
2458 <para>
2459 The advanced preferences are shown in <xref linkend="fig-prefs-advanced"/>.
2460 </para>
2461
2462 <figure id="fig-prefs-advanced">
2463   <title>Advanced preferences</title>
2464   <mediaobject>
2465     <imageobject>
2466       <imagedata fileref="screenshots/prefs-advanced&scs;"/>
2467     </imageobject>
2468   </mediaobject>
2469 </figure>
2470
2471 <para>
2472 <guilabel>Maximum JPEG2000 bandwidth</guilabel> specifies the maximum
2473 bit-rate of JPEG2000 that DCP-o-matic will allow you to create.  You
2474 are advised to leave this at 250Mbit/s in normal use for maximum DCP
2475 compatibility.
2476 </para>
2477
2478 <para>
2479 <guilabel>Allow any DCP frame rate</guilabel> removes the limits on
2480 the DCP video frame rates that DCP-o-matic will create.  This may be
2481 useful for experimentation.  Again, you are strongly advised to leave
2482 this unticked for normal use.
2483 </para>
2484
2485 <para>
2486 <guilabel>Only servers encode</guilabel> makes DCP-o-matic encode
2487 JPEG2000 data only on encoding servers and not on the host.  We
2488 suggest you leave this un-ticked unless you have a good reason to do otherwise.
2489 </para>
2490
2491 <para>
2492 The four checkboxes labelled <guilabel>Log</guilabel> control what
2493 sort of messages DCP-o-matic writes to its log file when creating a
2494 DCP.  It is useful to leave <guilabel>General</guilabel>,
2495 <guilabel>Warnings</guilabel> and <guilabel>Errors</guilabel> ticked
2496 as this makes the log files useful for tracking down bugs.
2497 </para>
2498
2499 <para>
2500 The <guilabel>Timing</guilabel> checkbox will enable extra log entries
2501 to allow developers to investigate and optimize the speed of
2502 DCP-o-matic.  It will significantly increase the size of the log files
2503 that are generated, so in normal use it is best to leave this
2504 unticked.
2505 </para>
2506
2507 </section>
2508 </section>
2509 </chapter>
2510
2511 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en" xml:id="ch-frame-rates">
2512 <title>Frame rates</title>
2513
2514 <para>
2515 In an ideal world, a DCP would be created using content at the same
2516 video frame and audio sampling rates as the DCP.  This is not,
2517 however, always possible.
2518 </para>
2519
2520
2521 <!-- ============================================================== -->
2522 <section>
2523 <title>DCP frame rate limitations</title>
2524
2525 <para>
2526 There are some limitations to video and audio frame rates in DCPs.  This is
2527 complicated by the fact that not all projectors will play DCPs at the
2528 same frame rates.  It is possible to create a DCP which one projector will
2529 play fine, but another (of a different type) will refuse to play, or
2530 even refuse to ingest.
2531 </para>
2532
2533
2534 <!-- ============================================================== -->
2535 <section>
2536 <title>Guaranteed rates</title>
2537
2538 <para>
2539 The only rates that are (pretty much) guaranteed to work on all DCI
2540 projectors are 24 frames per second (fps) for video and 48kHz or 96kHz
2541 for audio.  If you are sending your DCPs to unknown places it wise to
2542 consider using these rates if at all possible.
2543 </para>
2544
2545 </section>
2546
2547
2548 <!-- ============================================================== -->
2549 <section>
2550 <title>Other often-supported rates</title>
2551 <para>
2552 Many projectors now in the wild support additional video frame rates:
2553 25, 30 and 48 fps.
2554 </para>
2555 </section>
2556
2557
2558 <!-- ============================================================== -->
2559 <section>
2560 <title>Adapting content to fit the DCP rate</title>
2561
2562 <para>
2563 DCP-o-matic has a few tricks to allow you to use content that is not
2564 in one of the &lsquo;approved&rsquo; rates.
2565 </para>
2566
2567 <para>
2568 Audio is easy: DCP-o-matic can resample to 48kHz from any source rate
2569 with minimal loss in quality.
2570 </para>
2571
2572 <para>
2573 Video rate conversion is harder.  DCP-o-matic's basic strategy to deal
2574 with a non-supported content rate is to run it at the wrong speed, and
2575 to adjust the audio to keep it in sync.
2576 </para>
2577
2578 <para>Let us consider the example of a 25fps source for which you want
2579 to create a 24fps DCP.  DCP-o-matic will put the frames from the
2580 source directly into the DCP without modification, but will tell the
2581 projector to play them back at 24fps.  This means that the DCP's video
2582 will run slightly slower than the original.
2583 </para>
2584
2585 <para>
2586 If DCP-o-matic did nothing else, the result of this would be that the
2587 audio would be running at the original speed with the video running
2588 slowly.  Hence the audio would drift slowly out of sync.  To avoid
2589 this, DCP-o-matic also resamples the audio such that the projector
2590 will play it too slow by the same amount.  Hence it will sound
2591 slightly different but will remain in sync with the video.
2592 </para>
2593
2594 <para>
2595 For very low or high frame rates, DCP-o-matic can also skip or duplicate frames.
2596 </para>
2597
2598 </section>
2599 </section>
2600
2601
2602 <!-- ============================================================== -->
2603 <section>
2604 <title>Setting up</title>
2605
2606 <para>
2607 The <guilabel>Frame Rate</guilabel> control in the
2608 <guilabel>DCP</guilabel> tab sets the video frame rate that the DCP
2609 will use.  Clicking <guilabel>Use best</guilabel> sets the rate to
2610 what DCP-o-matic thinks is the best for your content.  With this
2611 button, DCP-o-matic assumes that the whole range of frame rates (24,
2612 25, 30 and 48fps) are allowable.
2613 </para>
2614
2615 <para>
2616 After this, the <guilabel>Video</guilabel> tab for each piece of
2617 content will give a summary of what DCP-o-matic is doing with that
2618 content.
2619 </para>
2620
2621 <para>
2622 If you want to experiment with other non-standard frame rates, you can
2623 do so by ticking the <guilabel>Allow any DCP frame rate</guilabel> in
2624 the <guilabel>Advanced</guilabel> tab of the preferences dialogue (see the
2625 <xref linkend="sec-prefs-advanced" endterm="sec-prefs-advanced-short"/>).  You are strongly advised to
2626 use this only on your own equipment, and only for experimentation
2627 purposes.
2628 </para>
2629
2630 </section>
2631
2632 </chapter>
2633
2634
2635 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en" xml:id="ch-servers">
2636 <title>Encoding servers</title>
2637
2638 <para>
2639 One way to increase the speed of DCP encoding is to use more
2640 than one machine at the same time.  An instance of DCP-o-matic can
2641 offload some of the time-consuming JPEG2000 encoding to any number of
2642 other machines on a network.  To do this, one &lsquo;master&rsquo;
2643 machine runs DCP-o-matic, and the &lsquo;server&rsquo; machines run
2644 a small program called <code>dcpomatic_server</code>.
2645 </para>
2646
2647 <para>
2648 The master and server machines do not need to be the same type, so you
2649 can mix Windows PCs, Macs and Linux machines as you wish.
2650 </para>
2651
2652
2653 <!-- ============================================================== -->
2654 <section>
2655 <title>Running the servers</title>
2656
2657 <para>
2658 There are two options for the encoding server;
2659 <code>dcpomatic_server_cli</code>, which runs on the command line, and
2660 <code>dcpomatic_server</code>, which has a simple GUI.  The command line
2661 version is well-suited to headless servers, especially on Linux, and
2662 the GUI version works best on Windows where it will put an icon in the
2663 system tray.
2664 </para>
2665
2666 <para>
2667 To run the command line version, simply enter:
2668 </para>
2669
2670 <programlisting>
2671 dcpomatic2_server_cli
2672 </programlisting>
2673
2674 <para>
2675 at a command prompt.  If you are running the program on a machine with
2676 a multi-core processor, you can run multiple parallel encoding threads
2677 by doing something like:
2678 </para>
2679
2680 <programlisting>
2681 dcpomatic2_server_cli -t 4
2682 </programlisting>
2683
2684 <para>
2685 to run 4 threads in parallel.
2686 </para>
2687
2688 <para>
2689 To run the GUI version on windows, run the &lsquo;DCP-o-matic encode
2690 server&rsquo; from the start menu.  An icon will appear in the system
2691 tray; right-click it to open a menu from whence you can quit the
2692 server or open a window to show its status.
2693 </para>
2694
2695 <para>If you would rather not bother installing DCP-o-matic on your
2696 server computers, the other option is to use the live-CD
2697 image that you can download from the <ulink
2698 url="http://dcpomatic.com/">DCP-o-matic web site.</ulink></para>
2699
2700 <para>Either burn the image to CD, or write it to a USB stick (using
2701 something like <ulink
2702 url="http://unetbootin.sourceforge.net/">unetbootin</ulink>).  Boot a
2703 PC from the CD or USB stick and it becomes a DCP-o-matic server
2704 without touching your standard operating system install.
2705 </para>
2706
2707 </section>
2708
2709 <!-- ============================================================== -->
2710 <section>
2711 <title>Setting up DCP-o-matic</title>
2712
2713 <para>
2714 DCP-o-matic periodically looks on the local network for servers.  Any
2715 that it finds are given work to do during encodes.  Selecting
2716 <guilabel>Encoding Servers</guilabel> from the
2717 <guilabel>Tools</guilabel> menu brings up a window which shows that
2718 servers that DCP-o-matic has found.
2719 </para>
2720
2721 </section>
2722
2723 <!-- ============================================================== -->
2724 <section>
2725 <title>Some notes about encode servers</title>
2726
2727 <para>
2728 DCP-o-matic does not mind if servers come and go; if a server
2729 disappears, DCP-o-matic will stop sending work to it, and will check
2730 it every minute or so in case it has come back online.
2731 </para>
2732
2733 <para>
2734 You will probably find that using a 1Gb/s or faster network will
2735 provide a significant speed-up compared to a 100Mb/s network.
2736 </para>
2737
2738 </section>
2739
2740 </chapter>
2741
2742 <chapter xml:id="ch-files" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
2743 <title>Generated files</title>
2744
2745 <para>
2746 DCP-o-matic generates a number of files as it makes a DCP.  <xref
2747 linkend="fig-file-structure"/> shows the files that might be generated
2748 after you have created a DCP for a film called &lsquo;DCP Test&rsquo;.
2749 </para>
2750
2751 <figure id="fig-file-structure">
2752   <title>Creating a new film</title>
2753   <mediaobject>
2754     <imageobject>
2755       <imagedata scale="100" fileref="diagrams/file-structure&dia;"/>
2756     </imageobject>
2757   </mediaobject>
2758 </figure>
2759
2760 <para>
2761 The <code>DCP Test</code> folder is the one that you specify when you
2762 select the <guilabel>New Film</guilabel> option from DCP-o-matic's
2763 menu.  Everything is stored inside this folder.
2764 </para>
2765
2766 <para>
2767 DCP-o-matic generates some working files as it goes along.  These are as follows:
2768 <itemizedlist>
2769
2770 <listitem><code>log</code> is a list of notes that DCP-o-matic makes as it goes
2771 along.  This can be useful for debugging purposes if something goes
2772 wrong.</listitem>
2773
2774 <listitem><code>metadata</code> stores the settings that you have made
2775 for this film: things like cropping, output format and so on.</listitem>
2776
2777 <listitem><code>video</code> is where DCP-o-matic writes the DCP's
2778 video data as it encodes it.</listitem>
2779
2780 <listitem><code>analysis</code> is used to keep the results of audio analysis runs.</listitem>
2781
2782 <listitem><code>info</code> contains details of each video frame that
2783 DCP-o-matic has written so far.  This is used when an encoding
2784 operation is interrupted and DCP-o-matic must resume it.</listitem>
2785 </itemizedlist>
2786 </para>
2787
2788 <para>
2789 Following this is the DCP itself:
2790 <code>DCP-TEST_EN-XX_UK-U_51_2K_CSY_20130218_CSY_OV</code>.  This
2791 contains some small XML files, which describe the DCP, and two large
2792 MXF files, which contain the DCP's audio and video data.  This folder
2793 (<code>DCP-TEST_EN-XX_...</code>) is what you should ingest, or pass
2794 to the cinema which is showing your DCP.
2795 </para>
2796
2797 </chapter>
2798
2799 <chapter>
2800 <title>Loose ends</title>
2801
2802 <para>
2803 This chapter collects a few notes on bits of DCP-o-matic that do not fit elsewhere in the manual.
2804 </para>
2805
2806
2807 <!-- ============================================================== -->
2808 <section>
2809 <title>Resuming encodes</title>
2810
2811 <para>
2812 If you cancel a DCP encoding run half-way through, or your computer
2813 crashes... fear not.  DCP-o-matic takes care to ensure that, in most
2814 cases, it can resume encoding from where it left off.  When you
2815 re-start a DCP creation, using the same settings are a previous run,
2816 DCP-o-matic will first check that the existing picture frames are
2817 correct, and then resume from where it left off.  The checking of
2818 existing frames does take some time, but it is much faster than
2819 running a full re-encode.
2820 </para>
2821
2822 <para>
2823 This resumption is achieved by writing a digest (hash) to disk for
2824 every image frame that is written.  On resumption, the existing MXF
2825 file for image data is read and its contents checked against the
2826 hashes.
2827 </para>
2828
2829 </section>
2830
2831 </chapter>
2832
2833 </book>