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