734e13de54b5b53c87d3904e2d7d499904854308
[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 <!-- By good luck or good management, the scale parameter to imagedata
14      appears only to affect PDF output.  HTML scaling is done in the
15      Makefile.
16 -->
17
18 <bookinfo>
19 <title>DCP-o-matic</title>
20 <author><firstname>Carl</firstname><surname>Hetherington</surname></author>
21 </bookinfo>
22
23 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
24 <title>Introduction</title>
25
26 <para>
27 Hello, and welcome to DCP-o-matic!
28 </para>
29
30 <!-- ============================================================== -->
31 <section>
32 <title>What is DCP-o-matic?</title>
33
34 <para>
35 DCP-o-matic is a program to generate <ulink
36 url="http://en.wikipedia.org/wiki/Digital_Cinema_Package">Digital
37 Cinema Packages</ulink> (DCPs) from DVDs, Blu-Rays, video files such as MP4
38 and AVI, or still images.  The resulting DCPs will play on modern digital
39 cinema projectors.
40 </para>
41
42 <para>
43 You might find it useful to make DVDs easier to present, to encode
44 independently-shot feature films, or to generate local advertising for
45 your cinema.
46 </para>
47
48 </section>
49
50
51 <!-- ============================================================== -->
52 <section>
53 <title>Licence</title>
54
55 <para>
56 DCP-o-matic is licensed under the <ulink url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU GPL</ulink>.
57 </para>
58
59 </section>
60
61
62 <!-- ============================================================== -->
63 <section>
64 <title>Acknowledgements</title>
65
66 <para>
67 This manual uses icons from the <ulink url="http://tango.freedesktop.org/">Tango Desktop Project</ulink>, with thanks.
68 </para>
69
70 </section>
71 </chapter>
72
73 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
74 <title>Installation</title>
75
76
77 <!-- ============================================================== -->
78 <section>
79 <title>Windows</title>
80
81 <para>
82 To install DCP-o-matic on Windows, download the installer from
83 <ulink url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>
84 and double-click it.  Click through the installer wizard, and
85 DCP-o-matic will be installed onto your machine.
86 </para>
87
88 <para>
89 If you are using a 32-bit version of Windows, you will need the 32-bit
90 installer.  For 64-bit Windows, either installer will work, but I
91 suggest you used the 64-bit version as it will allow DCP-o-matic to
92 use more memory.  You may find that DCP-o-matic crashes if you run
93 many parallel encoding threads (more than 4) on the 32-bit
94 version.
95 </para>
96
97 </section>
98
99
100 <!-- ============================================================== -->
101 <section>
102 <title>Mac OS X</title>
103
104 <para>
105 DCP-o-matic will run on Mac OS X version 10.6 (Snow Leopard) and
106 higher.  To install it, download the <code>.dmg</code> from <ulink
107 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink> and double
108 click to open it.  Then drag the DCP-o-matic icon to your
109 <guilabel>Applications</guilabel> folder or wherever else you would
110 like to install it.
111 </para>
112
113 </section>
114
115 <section>
116 <title>Ubuntu Linux</title>
117
118 <para>
119 You can install DCP-o-matic on Ubuntu 12.04 (&lsquo;Precise
120 Pangolin&rsquo;) or 14.04 (&lsquo;Trusty Tahr&rsquo;) using <code>.deb</code> packages: download the
121 appropriate package from <ulink
122 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink> and
123 double-click it.  Ubuntu will install the necessary bits and pieces
124 and set DCP-o-matic up for you.
125 </para>
126
127 </section>
128
129
130 <!-- ============================================================== -->
131 <section>
132 <title>Debian Linux</title>
133 <para>
134 Packages are available for Debian 7 (squeeze) and unstable (sid) from <ulink
135 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>.
136 </para>
137 </section>
138
139
140 <!-- ============================================================== -->
141 <section>
142 <title>Centos Linux</title>
143 <para>
144 Packages are available for Centos 6.5 and 7 from <ulink
145 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>.
146 </para>
147 </section>
148
149
150 <!-- ============================================================== -->
151 <section>
152 <title>Arch Linux</title>
153 <para>
154 Packages for Arch Linux are available from <ulink
155 url="https://aur.archlinux.org/packages/dcpomatic/">https://aur.archlinux.org/packages/dcpomatic/</ulink>,
156 thanks to Stefan Karner.
157 </para>
158 </section>
159
160
161 <!-- ============================================================== -->
162 <section>
163 <title>Other Linux distributions</title>
164
165 <para>
166 Installation on non-Ubuntu Linux is currently a little involved, as
167 there are no packages available (yet); you will have to compile it
168 from source.  If you are using a non-Ubuntu distribution, do let me
169 know by <ulink url="mailto:carl@dcpomatic.com">email</ulink> and I will see about building some packages.
170 </para>
171
172 <para>
173 The following dependencies are required:
174 <itemizedlist>
175 <listitem><ulink url="http://ffmpeg.org/">FFmpeg</ulink></listitem>
176 <listitem><ulink url="http://www.mega-nerd.com/libsndfile/">libsndfile</ulink></listitem>
177 <listitem><ulink url="http://www.openssl.org/">OpenSSL</ulink></listitem>
178 <listitem><ulink url="http://www.openjpeg.org/">libopenjpeg</ulink></listitem>
179 <listitem><ulink url="http://www.imagemagick.org/script/index.php">ImageMagick</ulink></listitem>
180 <listitem><ulink url="http://www.boost.org/">Boost</ulink></listitem>
181 <listitem><ulink url="http://www.libssh.org/">libssh</ulink></listitem>
182 <listitem><ulink url="http://www.gtk.org/">GTK (on Linux)</ulink></listitem>
183 <listitem><ulink url="http://www.wxwidgets.org/">wxWidgets</ulink></listitem>
184 <listitem><ulink url="http://freecode.com/projects/libquickmail">libquickmail</ulink></listitem>
185 <listitem><ulink url="http://libxmlplusplus.sourceforge.net/">libxml++</ulink></listitem>
186 <listitem><ulink url="http://www.aleksey.com/xmlsec/">xmlsec</ulink></listitem>
187 <listitem><ulink url="http://curl.haxx.se/">curl</ulink></listitem>
188 <listitem><ulink url="http://www.nih.at/libzip/">libzip</ulink></listitem>
189 <listitem><ulink url="http://carlh.net/software/libdcp/">libdcp</ulink></listitem>
190 <listitem><ulink url="http://carlh.net/software/libcxml/">libcxml</ulink></listitem>
191 </itemizedlist>
192 </para>
193
194 <para>
195 Once you have installed the development packages for the dependencies,
196 download the source code from <ulink
197 url="http://dcpomatic.com/">http://dcpomatic.com/</ulink>,
198 unpack it and run the following commands from inside the source
199 directory:
200 </para>
201
202 <programlisting>
203 ./waf configure
204 ./waf build
205 sudo ./waf install
206 </programlisting>
207
208 <para>
209 With any luck, this will build and install DCP-o-matic on your system.  To run it, enter:
210 </para>
211
212 <programlisting>
213 dcpomatic
214 </programlisting>
215
216 <para>
217 in a shell.
218 </para>
219
220 </section>
221 </chapter>
222
223
224 <!-- ============================================================== -->
225 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
226 <title>Creating a video DCP</title>
227
228 <para>
229 In this chapter we will see how to create a video DCP using
230 DCP-o-matic.  We will gloss over the details and look at the basics.
231 </para>
232
233 <section>
234 <title>Creating a new film</title>
235
236 <para>
237 Let's make a very simple DCP to see how DCP-o-matic works.  First, we
238 need some content.  Download the low-resolution trailer for the open
239 movie <ulink url="http://sintel.org/">Sintel</ulink> from <ulink
240 url="http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.480p.DivX_Plus_HD.mkv">their
241 website</ulink>.  Generally, of course, one would want to use the
242 highest-resolution material available, but for this test we will use
243 the low-resolution version to save everyone's bandwidth bills.
244 </para>
245
246 <para>
247 Now, start DCP-o-matic and its window will open.  First, we will
248 create a new &lsquo;film&rsquo;.  A &lsquo;film&rsquo; is how DCP-o-matic refers to
249 some pieces of content, along with some settings, which we will make into
250 a DCP.  DCP-o-matic stores its data in a folder on your disk while it
251 creates the DCP.  You can create a new film by selecting
252 <guilabel>New</guilabel> from the <guilabel>File</guilabel> menu, as
253 shown in <xref linkend="fig-file-new"/>.
254 </para>
255
256 <figure id="fig-file-new">
257   <title>Creating a new film</title> 
258   <mediaobject>
259     <imageobject> 
260       <imagedata fileref="screenshots/file-new&scs;"/>
261     </imageobject> 
262   </mediaobject>
263 </figure>
264
265 <para>
266 This will open a dialogue box for the new film, as shown in <xref
267 linkend="fig-video-new-film"/>.
268 </para>
269
270 <figure id="fig-video-new-film">
271   <title>Dialogue box for creating a new film</title> 
272   <mediaobject>
273     <imageobject> 
274       <imagedata fileref="screenshots/video-new-film&scs;"/>
275     </imageobject> 
276   </mediaobject>
277 </figure>
278
279 <para>
280 In this dialogue box you can choose a name for the film.  This will be
281 used to name the folder to store its data in, and also as the initial
282 name for the DCP itself.  You can also choose whereabouts you want to create
283 the film.  In the example from the figure, DCP-o-matic will create a
284 folder called &lsquo;DCP Test&rsquo; inside my home folder (carl) into which it
285 will write its working files.
286 </para>
287
288 </section>
289
290
291 <!-- ============================================================== -->
292 <section>
293 <title>Adding content</title>
294
295 <para>
296 The next step is to add the content that you want to use.  DCP-o-matic
297 can make DCPs from multiple pieces of content, but in this simple
298 example we will just use a single piece.  Click the <guilabel>Add
299 file(s)...</guilabel> button, as shown in <xref
300 linkend="fig-add-file"/>, and a file chooser will open for you to
301 select the content file to use, as shown in <xref
302 linkend="fig-video-select-content-file"/>.
303 </para>
304
305 <figure id="fig-add-file"> 
306   <title>Adding content files</title> 
307   <mediaobject>
308     <imageobject> 
309       <imagedata fileref="screenshots/add-file&scs;"/>
310     </imageobject> 
311   </mediaobject>
312 </figure>
313
314 <figure id="fig-video-select-content-file"> 
315   <title>Selecting a video content file</title> 
316   <mediaobject>
317     <imageobject> 
318       <imagedata fileref="screenshots/video-select-content-file&scs;"/>
319     </imageobject> 
320   </mediaobject>
321 </figure>
322
323 <para>
324 Select your content file and click <guilabel>Open</guilabel>.  In this
325 case we are using the Sintel trailer that we downloaded earlier.
326 </para>
327
328 <para>
329 When you do this, DCP-o-matic will take a look at your file.  After a
330 short while (when the progress bar at the bottom right of the window
331 has finished), you can look through your content using the slider to
332 the right of the window, as shown in <xref linkend="fig-examine-content"/>.
333 </para>
334
335 <figure id="fig-examine-content"> 
336   <title>Examining the content</title>
337   <mediaobject>
338     <imageobject> 
339       <imagedata fileref="screenshots/examine-content&scs;"/>
340     </imageobject> 
341   </mediaobject>
342 </figure>
343
344 <para>
345 Dragging the slider will move through your video.  You can also click
346 the <guilabel>Play</guilabel> button to play the content back.  Note
347 that there will be no sound, and playback might not be entirely
348 accurate (it may be slightly slower or faster than it should be, for
349 example).  This player is really only intended for brief inspection of
350 content; if you need to check it more thoroughly, use another player
351 such as <ulink
352 url="http://projects.gnome.org/totem/index.html">Totem</ulink>, <ulink
353 url="http://www.mplayerhq.hu/design7/news.html">mplayer</ulink> or
354 <ulink url="http://www.videolan.org/vlc/index.html">VLC</ulink>.
355 </para>
356
357 </section>
358
359
360
361
362 <!-- ============================================================== -->
363 <section>
364 <title>Making the DCP</title>
365
366 <para>In most cases, some adjustments would be made to DCP-o-matic's
367 settings once the content has been added.  For our simple test,
368 however, the default values will suffice, so we can go straight onto
369 making the DCP.</para>
370
371 <para>
372 Choose <guilabel>Make DCP</guilabel> from the
373 <guilabel>Jobs</guilabel> menu.  DCP-o-matic will encode your DCP.
374 This may take some time (many hours in some cases).  While the job is
375 in progress, DCP-o-matic will update you on how it is getting on with
376 the progress bar in the bottom of its window, as shown in <xref
377 linkend="fig-making-dcp"/>.
378 </para>
379
380 <figure id="fig-making-dcp">
381   <title>Making the DCP</title>
382   <mediaobject>
383     <imageobject> 
384       <imagedata scale="30" fileref="screenshots/making-dcp&scs;"/>
385     </imageobject> 
386   </mediaobject>
387 </figure>
388
389 <para>
390 When it has finished, the DCP will end up on your disk inside the
391 film's folder.  You can then copy this to a projector via a USB
392 stick, hard-drive or network connection.  See <xref
393 linkend="ch-files"/> for details about the files that DCP-o-matic creates.
394 </para>
395
396 <para>
397 Alternatively, if you have a projector or TMS that is accessible via
398 SCP across your network, you can upload the content directly from
399 DCP-o-matic.  See the <xref linkend="sec-prefs-tms" endterm="sec-prefs-tms-short"/>.
400 </para>
401
402 </section>
403 </chapter>
404
405
406 <!-- ============================================================== -->
407 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
408 <title>Creating a still-image DCP</title>
409
410 <para>
411 DCP-o-matic can also be used to create DCPs of one or more still images, perhaps
412 for an advertisement or an on-screen announcement.  This chapter shows you
413 how to do it.
414 </para>
415
416 <para>
417 As with video DCPs, the first step is to create a new
418 &lsquo;Film&rsquo;; select <guilabel>New</guilabel> from the
419 <guilabel>File</guilabel> menu and the new film dialogue will open as
420 shown in <xref linkend="fig-still-new-film"/>.
421 </para>
422
423 <figure id="fig-still-new-film"> 
424   <title>Dialogue box for creating a new film</title> 
425   <mediaobject>
426     <imageobject> 
427       <imagedata fileref="screenshots/still-new-film&scs;"/>
428     </imageobject> 
429   </mediaobject>
430 </figure>
431
432 <para>
433 Enter a name and click <guilabel>OK</guilabel>.  Now we need to add
434 the content.  As before, click <guilabel>Add file(s)...</guilabel>.
435 For our example, we will add a single image file, as shown in <xref
436 linkend="fig-still-select-content-file"/>.
437 </para>
438
439 <figure id="fig-still-select-content-file"> 
440   <title>Selecting a still content file</title> 
441   <mediaobject>
442     <imageobject> 
443       <imagedata fileref="screenshots/still-select-content-file&scs;"/>
444     </imageobject> 
445   </mediaobject>
446 </figure>
447
448 <para>
449 As with video DCPs, most of the default settings will be fine for a
450 simple test.  The one thing that you might wish to change is the
451 length of the still.  Select the <guilabel>Timing</guilabel> tab and
452 you will see a <guilabel>Length</guilabel> setting, as shown in <xref
453 linkend="fig-timing-tab"/>.
454 </para>
455
456 <figure id="fig-timing-tab"> 
457   <title>The timing tab</title>
458   <mediaobject>
459     <imageobject> 
460       <imagedata fileref="screenshots/timing-tab&scs;"/>
461     </imageobject> 
462   </mediaobject>
463 </figure>
464
465 <para>
466 This length is a &lsquo;timecode&rsquo;: it consists of four numbers.
467 The first is hours, the second minutes, the third seconds, and the
468 fourth frames.  Enter the duration that you want and then click <guilabel>Set</guilabel>.
469 </para>
470
471 <para>
472 Finally, as with video, you can choose <guilabel>Make DCP</guilabel>
473 from the <guilabel>Jobs</guilabel> menu to create your DCP.  This will
474 be much quicker than creating a video DCP, as DCP-o-matic only needs
475 to encode a single frame which it can then repeat.
476 </para>
477
478 </chapter>
479
480
481 <!-- ============================================================== -->
482 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
483 <title>Content settings</title>
484
485 <para>
486 The previous chapters showed DCP generation using the default
487 settings.  DCP-o-matic offers a range of features to adjust the
488 content that goes into your DCP, and this chapter describes those features in
489 detail.
490 </para>
491
492 <section>
493 <title>Adding and removing content</title>
494
495 <para>
496 At the top of the <guilabel>Content</guilabel> tab is a list of the
497 content that will go into our DCP.  There can be as many pieces of
498 content as you like, and they can be of the following types:
499 </para>
500
501 <itemizedlist>
502 <listitem>Movie &mdash; a file containing some video, probably some
503 audio and possibly some subtitles; for example, a MOV, MP4 or VOB.
504 </listitem>
505
506 <listitem>Sound &mdash; a file containing one or more channels of
507 audio; for example, a WAV or AIFF file.
508 </listitem>
509
510 <listitem>Still image &mdash; a file containing a single still image; for
511 example, a JPEG, PNG or TIFF file.
512 </listitem>
513
514 <listitem>Moving image &mdash; a directory containing many still
515 images which should be treated as the frames of a video.
516 </listitem>
517 </itemizedlist>
518
519 <para>
520 To add one or more movie, sound or still-image files, select
521 <guilabel>Add file(s)...</guilabel> and choose them from the selector.
522 To add a directory of images, choose <guilabel>Add
523 directory...</guilabel> and do similar.
524 </para>
525
526 <para>
527 You can remove a piece of content by clicking on its name and then
528 clicking the <guilabel>Remove</guilabel> button.
529 </para>
530
531 </section>
532
533
534 <!-- ============================================================== -->
535 <section>
536 <title>Content Properties</title>
537
538 <para>
539 Below the content list are the controls to set content properties.  To
540 adjust the properties for a piece of content, click its name in the
541 content list.  The content property controls will then become active
542 for that piece of content.
543 </para>
544
545 <para>
546 The content properties are split up into four sections:
547 <guilabel>Video</guilabel>, <guilabel>Audio</guilabel>,
548 <guilabel>Subtitles</guilabel> and <guilabel>Timing</guilabel>.  Not
549 all of these sections will be active for all content types.  The controls
550 in each section are described below.
551 </para>
552
553 </section>
554
555
556 <!-- ============================================================== -->
557 <section>
558 <title>Video</title>
559
560 <para>
561 The <guilabel>Video</guilabel> tab controls properties of the image, as shown in <xref linkend="fig-video-tab"/>.
562 </para>
563
564 <figure id="fig-video-tab"> 
565   <title>Video settings tab</title>
566   <mediaobject>
567     <imageobject> 
568        <imagedata fileref="screenshots/video-tab&scs;"/>
569     </imageobject> 
570   </mediaobject>
571 </figure>
572
573
574 <!-- ============================================================== -->
575 <section>
576 <title>Image type</title>
577
578 <para>
579 The first option on this tab is the &lsquo;type&rsquo; of the video.
580 This specifies how DCP-o-matic should interpret the video's image.
581 <guilabel>2D</guilabel> is the default; this just takes the video
582 image as a standard 2D frame.  The <guilabel>3D
583 left/right</guilabel> option tells DCP-o-matic to interpret the frame as a
584 left-right pair, as shown in <xref linkend="fig-3d-left-right"/>.
585 </para>
586
587 <figure id="fig-3d-left-right"> 
588   <title>3D left/right image type</title>
589   <mediaobject>
590     <imageobject> 
591        <imagedata scale="100" fileref="diagrams/3d-left-right&dia;"/>
592     </imageobject> 
593   </mediaobject>
594 </figure>
595
596 <para>
597 Alternatively the <guilabel>3D top/bottom</guilabel> option tells
598 DCP-o-matic to see the frame as a top-bottom pair, as shown in <xref
599 linkend="fig-3d-top-bottom"/>.
600 </para>
601
602 <figure id="fig-3d-top-bottom"> 
603   <title>3D top/bottom image type</title>
604   <mediaobject>
605     <imageobject> 
606        <imagedata scale="100" fileref="diagrams/3d-top-bottom&dia;"/>
607     </imageobject> 
608   </mediaobject>
609 </figure>
610
611 <para>
612 Another option is <guilabel>3D alternate</guilabel> which takes the
613 first frame of the content as for the left eye, the second for the
614 right eye, the third for the left, and so on.  Finally, you can
615 specify <guilabel>3D left only</guilabel> or <guilabel>3D right
616 only</guilabel> if this content contains only the the left or right
617 eye images.  This is useful when you have the left and right eye image
618 sets in different files; you can specify one content as <guilabel>3D
619 left only</guilabel> and another as <guilabel>3D right only</guilabel>
620 and DCP-o-matic will pick up the appropriate frames from each.
621 </para>
622
623 </section>
624
625
626 <!-- ============================================================== -->
627 <section>
628 <title>Filtering</title>
629
630 <para>
631 The &lsquo;filters&rsquo; settings allow you to apply various video
632 filters to the image.  These may be useful to try to improve
633 poor-quality sources like DVDs.  You can set up the filters by clicking the
634 <guilabel>Edit</guilabel> button next to the filters entry in the
635 setup area of the DCP-o-matic window; this opens the filters selector
636 as shown in <xref linkend="fig-filters"/>.
637 </para>
638
639 <figure id="fig-filters"> 
640   <title>Filters selector</title> 
641   <mediaobject>
642     <imageobject> 
643       <imagedata fileref="screenshots/filters&scs;"/>
644     </imageobject> 
645   </mediaobject>
646 </figure>
647
648 <para>
649 After changing the filters setup, you will need to regenerate the DCP
650 to see the effect on the cinema screen.  The preview in DCP-o-matic
651 will update itself whenever filters are changed, though of course this
652 image is much smaller and of lower resolution than a projected image!
653 </para>
654 </section>
655
656
657
658 <!-- ============================================================== -->
659 <section>
660 <title>Colour conversion</title>
661
662 <para>
663 The <guilabel>Colour conversion</guilabel> setting specifies what
664 colour transforms and gamma correction DCP-o-matic will use when
665 converting the selected content into the XYZ colourspace for the DCP.
666 </para>
667
668 <para>
669 Clicking <guilabel>Edit...</guilabel> will open the colour conversion
670 dialogue box, as shown in <xref linkend="fig-colour-conversion"/>.
671 </para>
672
673 <figure id="fig-colour-conversion">
674   <title>Dialogue box for setting colour conversion</title> 
675   <mediaobject>
676     <imageobject> 
677       <imagedata fileref="screenshots/colour-conversion&scs;"/>
678     </imageobject> 
679   </mediaobject>
680 </figure>
681
682 <para>
683 In most cases, it is only necessary to select one of DCP-o-matic's
684 presets.  DCP-o-matic knows how to convert from two common
685 colourspaces: sRGB and Rec. 709, so if your content was graded using
686 one of those you can select the appropriate preset.
687 </para>
688
689 <para>
690 For other colour spaces you can edit the values in the lower half of
691 the dialogue box as you wish.  Alternatively, create a new colour
692 conversion preset using the preferences dialog, as described in <xref
693 linkend="sec-prefs-colour"/>.
694 </para>
695
696 <para>
697 Colour conversion is discussed in more detail in a separate document
698 <ulink url="http://dcpomatic.com/manual/colour.pdf">colour.pdf</ulink>.
699 </para>
700
701 </section>
702
703 <!-- ============================================================== -->
704 <section>
705 <title>Other settings</title>
706
707 <para>
708 The &lsquo;crop&rsquo; settings can be used to crop your content,
709 which can be used to remove black borders from round the edges of DVD
710 images, for example.  The specified number of pixels will be trimmed
711 from each edge, and the content image in the right of the window will
712 be updated to show the effect of the crop.
713 </para>
714
715 <para>
716 The <guilabel>Scale to</guilabel> option governs the shape that
717 DCP-o-matic will scale the content's image into.  Select the aspect
718 ratio that your content should be presented in.
719 </para>
720
721 </section>
722
723 <!-- ============================================================== -->
724 <section>
725 <title>Video description</title>
726
727 <para>
728 At the bottom of the video tab is a short description of what will
729 happen to your video with the current settings.  In the example of
730 <xref linkend="fig-video-tab"/>, DCP-o-matic is telling you that the
731 video file is 1920x1080 pixels (which is a ratio of 1.78:1).  Since
732 the controls specify &lsquo;Flat&rsquo; for the ratio, DCP-o-matic
733 scales the content image to 1998x1080, which is the DCI flat
734 resolution at 2K.
735 </para>
736
737 <para>
738 This description also gives the frame rate of the content and what
739 will happen to it when it is played at the DCP's frame rate.
740 <!-- XXX: link to more detailed discussion of this -->
741 </para>
742
743 </section>
744
745 </section>
746
747
748 <!-- ============================================================== -->
749 <section>
750 <title>Audio</title>
751
752 <para>
753 The <guilabel>Audio</guilabel> tab controls properties of the image, as shown in <xref linkend="fig-audio-tab"/>.
754 </para>
755
756 <figure id="fig-audio-tab"> 
757   <title>Audio settings tab</title>
758   <mediaobject>
759     <imageobject> 
760        <imagedata fileref="screenshots/audio-tab&scs;"/>
761     </imageobject> 
762   </mediaobject>
763 </figure>
764
765
766 <!-- ============================================================== -->
767 <section>
768 <title>Show audio</title>
769
770 <para>
771 The <guilabel>Show Audio</guilabel> button will instruct DCP-o-matic
772 to examine the audio in your content and plot a graph of its level
773 over time.  This can be useful for getting a rough idea of how loud
774 the sound will be in the cinema auditorium.  A typical plot is shown
775 in <xref linkend="fig-audio-plot"/>
776 </para>
777
778 <figure id="fig-audio-plot"> 
779   <title>Audio plot</title>
780   <mediaobject>
781     <imageobject> 
782        <imagedata fileref="screenshots/audio-plot&scs;"/>
783     </imageobject> 
784   </mediaobject>
785 </figure>
786
787 <para>
788 The plot gives the audio level (vertical axis, in dB) with time
789 (horizontal axis).  0dB represents full scale, so if there is anything
790 near this you are in danger of clipping the projector's audio outputs.
791 </para>
792
793 <para>
794 There are two plot types: the peak level and the RMS, which can be
795 shown or hidden using the check-boxes on the right hand side of the
796 window.
797 </para>
798
799 <para>
800 The channel check-boxes will show or hide the plot(s) for
801 the corresponding channels in the DCP.
802 </para>
803
804 <para>
805 The smoothing slider applies a variable degree of temporal smoothing
806 to the plots, which can make them easier to read in some cases.
807 </para>
808
809 <para>
810 Obviously the audio plot is no substitute for listening in an
811 auditorium, but it can be useful to get levels in the right rough area.
812 </para>
813
814 </section>
815
816
817 <!-- ============================================================== -->
818 <section>
819 <title>The audio map</title>
820
821 <para>
822 The section at the bottom of the audio tab is the &lsquo;audio
823 map&rsquo;.  This governs how sound from the content will be arranged
824 in the DCP.
825 </para>
826
827 <para>
828 Down the left-hand side of the map is the list of audio channels in
829 the currently-selected piece of content.  Along the top is each
830 channel in the DCP.  A green box means that the corresponding
831 content channel will be copied into the corresponding DCP channel.
832 </para>
833
834 <para>
835 When content channels are copied into DCP channels they can be done
836 with variable gain.  If, for example, you want to copy a channel
837 as-is, you can set a gain of 0dB.  Alternatively, if you want to mix
838 two channels into one, you may want to use a gain of -6dB on each one
839 to prevent clipping when the two channels are added.
840 </para>
841
842 <para>
843 The green boxes of the audio mapping view tell you (very roughly) how
844 much gain is applied to each channel.  A full-height box means 0dB
845 (i.e. unity) gain.  Any less height indicates lower gain.
846 </para>
847
848 <para>
849 To map one channel to another with 0dB gain, click in the empty box
850 and it will turn green to reflect the mapping.  A second click will
851 turn the mapping back off.  To set some other gain, right-click on the
852 box to open the gain menu.  This allows you to set
853 <guilabel>Off</guilabel> (no mapping or negative infinity gain),
854 <guilabel>Full</guilabel> (0dB gain), -6dB gain or
855 <guilabel>Edit</guilabel> which allows you to set the required gain
856 precisely.
857 </para>
858
859 <para>
860 Consider, for example, the case in <xref linkend="fig-audio-map-eg1"/>.
861 </para>
862
863 <figure id="fig-audio-map-eg1">
864   <title>Audio map example 1</title>
865   <mediaobject>
866     <imageobject> 
867        <imagedata fileref="screenshots/audio-map-eg1&scs;"/>
868     </imageobject> 
869   </mediaobject>
870 </figure>
871
872 <para>
873 Here, we have two channels in the source which are mapped to left and
874 right, respectively, in the DCP.  The full green boxes show that the
875 mapping is at unity gain (0dB) in each case.  Imagine that we modify
876 the settings to those shown in <xref linkend="fig-audio-map-eg2"/>
877 </para>
878
879 <figure id="fig-audio-map-eg2">
880   <title>Audio map example 2</title>
881   <mediaobject>
882     <imageobject> 
883        <imagedata fileref="screenshots/audio-map-eg2&scs;"/>
884     </imageobject> 
885   </mediaobject>
886 </figure>
887
888 <para>
889 We now have the content's streams mapped to left and right and also
890 mixed together and placed in the DCP's centre channel.  The smaller
891 green boxes on the centre mappings show that those channels are added
892 with some non-unity gain; you can see by hovering the mouse pointer
893 over those boxes that the gain for content channels 1 and 2 is -6dB
894 when being sent to the centre channel and 0dB when being sent to left
895 and right.
896 </para>
897
898 <figure id="fig-audio-map-eg3">
899   <title>Audio map example 3</title>
900   <mediaobject>
901     <imageobject> 
902        <imagedata fileref="screenshots/audio-map-eg3&scs;"/>
903     </imageobject> 
904   </mediaobject>
905 </figure>
906
907 <para>
908 As a final example, the map in <xref linkend="fig-audio-map-eg3"/>
909 shows the mapping of a 5.1 source into a 5.1 DCP.
910 </para>
911
912 </section>
913
914
915 <!-- ============================================================== -->
916 <section>
917 <title>Other controls</title>
918
919 <para>
920 &lsquo;Audio Gain&rsquo; is used to alter the volume of the
921 soundtrack.  The specified gain (in dB) will be applied to each sound
922 channel of your content before it is written to the DCP.
923 </para>
924
925 <para>
926 If you use a sound processor that DCP-o-matic knows about, it can help
927 you calculate changes in gain that you should apply.  Say, for
928 example, that you make a test DCP and find that you have to run it at
929 volume 5 instead of volume 7 to get a good sound level in the screen.
930 If this is the case, click the <guilabel>Calculate...</guilabel>
931 button next to the audio gain entry, and the dialogue box in <xref
932 linkend="fig-calculate-audio-gain"/> will open.
933 </para>
934
935 <figure id="fig-calculate-audio-gain"> 
936   <title>Calculating audio gain</title>
937   <mediaobject>
938     <imageobject> 
939       <imagedata fileref="screenshots/calculate-audio-gain&scs;"/>
940     </imageobject> 
941   </mediaobject>
942 </figure>
943
944 <para>
945 For our example, put 5 in the first box and 7 in the second and click
946 <guilabel>OK</guilabel>.  DCP-o-matic will calculate the audio gain
947 that it should apply to make this happen.  Then you can re-make the
948 DCP (this will be reasonably fast, as the video data will already have
949 been done) and it should play back at the correct volume with 7 on
950 your sound-rack fader.
951 </para>
952
953 <para>
954 Current versions of DCP-o-matic only know about the Dolby CP650 and
955 CP750.  If you use a different sound processor, and know the gain
956 curve of its volume control, <ulink url="mailto:carl@dcpomatic.com">get in
957 touch</ulink>.
958 </para>
959
960 <para>
961 <guilabel>Audio Delay</guilabel> is used to adjust the synchronisation
962 between audio and video.  A positive delay will move the audio later
963 with respect to the video, and a negative delay will move it earlier.
964 </para>
965
966 <para>
967 The <guilabel>Audio Stream</guilabel> option allows you to select the
968 audio stream to use, if the content contains more than one.  There
969 might be different soundtrack languages, for example.
970 </para>
971
972 </section>
973 </section>
974
975
976 <!-- ============================================================== -->
977 <section>
978 <title>Subtitles</title>
979
980 <para>
981 The subtitles tab contains settings related to subtitles in your
982 content, as shown in <xref linkend="fig-subtitles-tab"/>.
983 </para>
984
985 <figure id="fig-subtitles-tab"> 
986   <title>Subtitle settings tab</title>
987   <mediaobject>
988     <imageobject> 
989        <imagedata fileref="screenshots/subtitles-tab&scs;"/>
990     </imageobject> 
991   </mediaobject>
992 </figure>
993
994 <para>
995 DCP-o-matic will extract subtitles from the content, if present, and
996 they can be &lsquo;burnt into&rsquo; the DCP (that is, they are
997 included in the image and not overlaid by the projector).
998 </para>
999
1000 <para>
1001 Select the <guilabel>With Subtitles</guilabel> check-box to enable
1002 subtitles.
1003 </para>
1004
1005 <para>
1006 The <guilabel>X Offset</guilabel> and <guilabel>Y Offset</guilabel>
1007 controls move the subtitles around within the image.  The offsets are
1008 expressed as a percentage of the video frame size; 100% X offset is
1009 the entire width of the frame, and 100% Y offset is the entire height.
1010 Hence, to move the subtitles down by half the frame height you would
1011 use a Y offset of 50%.
1012 </para>
1013
1014 <para>
1015 The <guilabel>X Scale</guilabel> and <guilabel>Y Scale</guilabel>
1016 controls scale the subtitles.  Scale values of 1 make the subtitles
1017 the same size (relative to the size of the image) as they are on the
1018 original.  Values lower than 1 make them smaller, and values higher
1019 make them larger.  You can stretch the subtitles in either direction
1020 by specifying different values for X and Y scale.  Subtitles from DVD
1021 and Blu Ray sources are frequently larger (relative to the video
1022 frame) than those typically used for DCP, so it is often useful to
1023 scale such subtitles down using these controls.
1024 </para>
1025
1026 <para>
1027 The <guilabel>Stream</guilabel> control changes the subtitle stream
1028 that is used when the content has more than one.
1029 </para>
1030
1031 </section>
1032
1033
1034 <!-- ============================================================== -->
1035 <section>
1036 <title>Timing</title>
1037
1038 <para>
1039 The timing tab contains settings related to the timing of your
1040 content, as shown in <xref linkend="fig-timing-tab-detail"/>.
1041 </para>
1042
1043 <figure id="fig-timing-tab-detail"> 
1044   <title>Timing settings tab</title>
1045   <mediaobject>
1046     <imageobject> 
1047        <imagedata fileref="screenshots/timing-tab&scs;"/>
1048     </imageobject> 
1049   </mediaobject>
1050 </figure>
1051
1052 <para>
1053 Most of the timing tab's entries are <emphasis>time-codes</emphasis>.
1054 These are expressed as four numbers, as shown in <xref
1055 linkend="fig-timecode"/>.
1056 </para>
1057
1058 <figure id="fig-timecode"> 
1059   <title>Timecode</title>
1060   <mediaobject>
1061     <imageobject> 
1062        <imagedata fileref="diagrams/timecode&dia;"/>
1063     </imageobject> 
1064   </mediaobject>
1065 </figure>
1066
1067 <para>
1068 <guilabel>Position</guilabel> is the time at which this piece of
1069 content should start within the DCP.  In most cases, this will be
1070 <code>0:0:0:0</code> to make the content start at the beginning of the
1071 DCP.
1072 </para>
1073
1074 <para>
1075 <guilabel>Full length</guilabel> is the length of the piece of
1076 content.  This can only be set for still-image content: for video or
1077 sound content, it is fixed by the nature of the content file.  If
1078 still-image content is being used you can set the length for which it
1079 should be displayed using this control.
1080 </para>
1081
1082 <para>
1083 <guilabel>Trim from start</guilabel> specifies the amount that should be trimmed from the start of the content.
1084 </para>
1085
1086 <para>
1087 <guilabel>Trim from end</guilabel> specifies the amount that should be trimmed from the end of the content.
1088 </para>
1089
1090 <para>
1091 <guilabel>Play length</guilabel> indicates how long this piece of
1092 content will be once the trims have been applied.  This will be equal
1093 to the full length minus <guilabel>trim-from-start</guilabel> and minus <guilabel>trim-from-end</guilabel>.
1094 </para>
1095
1096 <para>
1097 <guilabel>Video frame rate</guilabel> specifies the frame rate for still-image content.
1098 </para>
1099
1100 <para>
1101 Each timecode control has a <guilabel>Set</guilabel> which you should
1102 click when you have entered a new value for a timecode.  The
1103 <guilabel>Set</guilabel> button will make DCP-o-matic take account of
1104 any changes to the corresponding timecode.
1105 </para>
1106
1107 </section>
1108
1109
1110 <!-- ============================================================== -->
1111 <section>
1112 <title>Video processing pipeline</title>
1113
1114 <para>
1115 This section gives a little more detail about how DCP-o-matic process
1116 video as it takes it from a source and puts it into a DCP.
1117 </para>
1118
1119 <para>
1120 Consider, as a somewhat over-the-top example, that we have a 720 x 576
1121 image which is letterboxed with 36 black pixels each at the top and
1122 bottom, and the video content within the letterbox should be presented
1123 in the DCP at ratio of 2.39:1 within a 1.85:1 frame (such as might
1124 happen with a trailer).  The source image is shown in <xref
1125 linkend="fig-pipeline1"/>.
1126 </para>
1127
1128 <figure id="fig-pipeline1"> 
1129   <title>Example image to demonstrate video processing</title>
1130   <mediaobject>
1131     <imageobject> 
1132        <imagedata scale="100" fileref="diagrams/pipeline1&dia;"/>
1133     </imageobject> 
1134   </mediaobject>
1135 </figure>
1136
1137 <para>
1138 DCP-o-matic runs through the following steps when preparing an image for a DCP:
1139 </para>
1140
1141 <itemizedlist>
1142 <listitem>Crop</listitem>
1143 <listitem>Scale</listitem>
1144 <listitem>Place in container</listitem>
1145 </itemizedlist>
1146
1147 <para>
1148 First, some amount of the image can be cropped.  This is almost always
1149 used to remove black borders (letterboxing and/or pillarboxing) around
1150 images.
1151 </para>
1152
1153 <para>
1154 In our example image, we would use 36 pixels of crop from the top and
1155 bottom.  This would give the new image shown in <xref
1156 linkend="fig-pipeline2"/>.
1157 </para>
1158
1159 <figure id="fig-pipeline2"> 
1160   <title>Example image after cropping</title>
1161   <mediaobject>
1162     <imageobject> 
1163        <imagedata scale="100" fileref="diagrams/pipeline2&dia;"/>
1164     </imageobject> 
1165   </mediaobject>
1166 </figure>
1167
1168 <para>
1169 The next step is to scale the image.  Since this content should be
1170 presented in a 2.39:1 aspect ratio inside a 1.85:1 DCP we would select
1171 <guilabel>Scope</guilabel> from the <guilabel>Scale to</guilabel>
1172 option in the <guilabel>Video</guilabel> tab and
1173 <guilabel>Flat</guilabel> from the <guilabel>Container</guilabel>
1174 option in the <guilabel>DCP</guilabel> tab.
1175 </para>
1176
1177 <para>The <guilabel>Scale to</guilabel> option should always be set to
1178 the aspect ratio at which the content should be seen.  The
1179 <guilabel>Container</guilabel> option should be set to the preset that
1180 you want to use on the projector.  Of course, these two settings will
1181 often be the same.
1182 </para>
1183
1184 <para>
1185 Given the scaling and container information, DCP-o-matic will look at
1186 the DCP's container size, and then scale the source image up until one
1187 or both of its dimensions (width, height or both) fits the size of the
1188 container, all the while preserving the desired aspect ratio.
1189 </para>
1190
1191 <para>
1192 In our example here, the DCP's container is specified as 1.85:1 (so
1193 that the DCP will play back correctly using the projector's
1194 &lsquo;Flat&rsquo; preset).  At 2K, 1.85:1 is 1998 pixels by 1080.
1195 Scaling the source up whilst preserving its 1.85:1 aspect ratio will
1196 result in the image hitting the sides of the container first, at a
1197 size of 1998 x 836.  This gives us a new version of the image as shown
1198 in <xref linkend="fig-pipeline3"/>.
1199 </para>
1200
1201 <figure id="fig-pipeline3"> 
1202   <title>Example image after cropping and scaling</title>
1203   <mediaobject>
1204     <imageobject> 
1205        <imagedata scale="100" fileref="diagrams/pipeline3&dia;"/>
1206     </imageobject> 
1207   </mediaobject>
1208 </figure>
1209
1210 <para>
1211 The final step is to place the image into the DCP.  In this case,
1212 since we have a 2.39:1 image that should be presented as a 1.85:1 DCP,
1213 we have set the <guilabel>container</guilabel> in the
1214 <guilabel>DCP</guilabel> tab to be Scope.  Since the content has been
1215 scaled to 1998 x 836, and a Flat container is 1998 x 1080, there will
1216 be some black bars at the top and bottom of the image.  DCP-o-matic
1217 shares out this black equally, as shown in <xref
1218 linkend="fig-pipeline3"/>.
1219 </para>
1220
1221 <figure id="fig-pipeline4"> 
1222   <title>Example image in the DCP</title>
1223   <mediaobject>
1224     <imageobject> 
1225        <imagedata scale="100" fileref="diagrams/pipeline4&dia;"/>
1226     </imageobject> 
1227   </mediaobject>
1228 </figure>
1229
1230 </section>
1231
1232 </chapter>
1233
1234 <chapter xml:id="ch-dcp" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1235 <title>DCP settings</title>
1236
1237 <para>
1238 This chapter describes the settings that apply to the whole DCP.  The
1239 controls for these settings are in the <guilabel>DCP</guilabel> tab of
1240 the main window, as shown in <xref linkend="fig-dcp-tab"/>.
1241 </para>
1242
1243 <figure id="fig-dcp-tab"> 
1244   <title>DCP settings tab</title>
1245   <mediaobject>
1246     <imageobject> 
1247        <imagedata fileref="screenshots/dcp-tab&scs;"/>
1248     </imageobject> 
1249   </mediaobject>
1250 </figure>
1251
1252 <para>
1253 The first thing here is the name.  This is generally set to the title
1254 of the film that is being encoded.  If <guilabel>Use ISDCF
1255 name</guilabel> is not ticked, the name that you specify will be used
1256 as-is for the name of the DCP.  If <guilabel>Use ISDCF name</guilabel>
1257 is ticked, the name that you enter will be used as part of a
1258 ISDCF-compliant name.  
1259 </para>
1260
1261 <para>
1262 Underneath the name field is a preview of the name that the DCP will
1263 get.  To use a ISDCF-compliant name, tick the <guilabel>Use ISDCF
1264 name</guilabel> check-box.  The ISDCF name will be composed using details
1265 of your content's soundtrack, the current date and other things that
1266 can be specified in the ISDCF name details dialogue box, which you can
1267 open by clicking on the <guilabel>Details</guilabel> button.
1268 </para>
1269
1270 <para>
1271 If the DCP name is long, it may not all be visible.  You can see the
1272 full name by hovering the mouse pointer over the partial name.
1273 </para>
1274
1275 <para>
1276 The <guilabel>Container</guilabel> option sets the ratio of the image
1277 in the DCP.  If this ratio is different to the ratio used for any
1278 content, DCP-o-matic will pad the content with black.  In simple cases
1279 this should be set to the same ratio as that for the the primary piece
1280 of video content.  Alternatively, you might want to pillarbox a small
1281 format into a Flat container: in this case, select the small format
1282 for the content's ratio and &lsquo;Flat&rsquo; for the DCP.
1283 </para>
1284
1285 <para>
1286 Next up is the content type.  This can be
1287 &lsquo;feature&rsquo;, &lsquo;trailer&rsquo; or whatever; select the
1288 required type from the drop-down list.
1289 </para>
1290
1291 <para>
1292 The <guilabel>Frame Rate</guilabel> control sets the frame rate of
1293 your DCP.  This can be a little tricky to get right.  Ideally, you
1294 want it to be the same as the video content that you are using.  If it
1295 is not the same, DCP-o-matic must resort to some tricks to alter your
1296 content to fit the specified frame rate.  Frame rates are discussed in
1297 more detail in <xref linkend="ch-frame-rates"/>.
1298 </para>
1299
1300 <para>
1301 The <guilabel>Signed</guilabel> check-box sets whether or not the DCP
1302 is signed.  This is rarely important; if in doubt, tick it.
1303 </para>
1304
1305 <para>
1306 The <guilabel>Encrypted</guilabel> check-box will set whether the DCP
1307 should be encrypted or not.  If this is ticked, the DCP will require a
1308 KDM to play back.  Encryption is discussed in <xref
1309 linkend="ch-encryption"/>.
1310 </para>
1311
1312 <para>
1313 The <guilabel>Use best</guilabel> button sets the DCP video frame rate
1314 to what DCP-o-matic thinks is the best given the content that you have
1315 added.
1316 </para>
1317
1318 <para>
1319 The <guilabel>Audio Channels</guilabel> control sets the number of
1320 audio channels that the DCP will have.  If the DCP has any channels
1321 for which there is no content audio they will be replaced by silence.
1322 </para>
1323
1324 <para>
1325 The <guilabel>3D</guilabel> button will set your DCP to 3D mode if it
1326 is checked.  A 3D DCP will then be created, and any 2D content will be
1327 made 3D compatible by repeating the same frame for both left and right
1328 eyes.  A 3D DCP can be played back on many 3D systems (e.g. Dolby 3D,
1329 Real-D etc.) but not on a 2D system.
1330 </para>
1331
1332 <para>
1333 The <guilabel>Resolution</guilabel> tab allows you to choose the
1334 resolution for your DCP.  Use 2K unless you have content that is of
1335 high enough resolution to be worth presenting in 4K.
1336 </para>
1337
1338 <para>
1339 The <guilabel>JPEG2000 bandwidth</guilabel>; setting changes how big the final
1340 image files used within the DCP will be.  Larger numbers will give
1341 better quality, but correspondingly larger DCPs.  The bandwidth can be
1342 between 50 and 250 megabits per second (Mbit/s).
1343 </para>
1344
1345 <para>
1346 The <guilabel>Standard</guilabel> option specifies which of the two
1347 DCP standards DCP-o-matic should use.  If in doubt, use SMPTE (the
1348 more modern of the two).
1349 </para>
1350
1351 <para>
1352 Finally, the <guilabel>Scaler</guilabel> is the method that will be used to scale up
1353 your content for the DCP, if required.  Bicubic is a fine choice in
1354 most situations.
1355 </para>
1356
1357 </chapter>
1358
1359 <chapter xml:id="ch-encryption" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1360 <title>Encryption</title>
1361
1362 <para>
1363 It is not required that DCPs be encrypted, but they can be.  This
1364 chapter discusses the basic principles of DCP encryption, and how
1365 DCP-o-matic can create encrypted DCPs and KDMs for them.
1366 </para>
1367
1368
1369 <!-- ============================================================== -->
1370 <section>
1371 <title>Basics</title>
1372
1373 <para>
1374 DCPs can be encrypted.  This means that the picture and sound data are
1375 encoded in such a way that only cinemas &lsquo;approved&rsquo; by the
1376 DCP's creators can read them.  In particular, this means copies of the
1377 DCP can be distributed by insecure means: if an ne'er-do-well called
1378 Mallory obtains a hard drive containing an encrypted DCP, there is no
1379 way that he can play it.  Only those cinemas who receive a correct key
1380 delivery message (KDM) can play the DCP.
1381 </para>
1382
1383
1384 <!-- ============================================================== -->
1385 <section>
1386 <title>How it works (in a nutshell)</title>
1387
1388 <para>
1389 This section attempts to summarise how DCP encryption works.  You can
1390 skip it if you like.  You may need some knowledge of encryption
1391 methods to understand it.
1392 </para>
1393
1394 <para>
1395 We suppose that we are trying to distribute a DCP to
1396 Alice's cinema without a troublemaker called Mallory being able to
1397 watch it himself.
1398 </para>
1399
1400 <para>
1401 There are two main families of encryption techniques.  The first,
1402 symmetric-key encryption, allows us to encode some data using some
1403 numeric key.  After encoding, no-one can decode the data unless they
1404 know the key.
1405 </para>
1406
1407 <para>
1408 The first step in a DCP encryption is to encode its data with some key
1409 using symmetric-key encryption.  The encrypted DCP can then be sent
1410 anywhere, safe in the knowledge that even if Mallory got hold of a
1411 copy, he could not decrypt it.
1412 </para>
1413
1414 <para>
1415 Alice, however, needs to know the key so she can play the DCP in her
1416 cinema.  A simple approach might be for us to send Alice the key.
1417 However, if Mallory can intercept the DCP, he might also be able to
1418 intercept our communication of the key to Alice.  Furthermore, if Alice
1419 happened to know Mallory, she could just send him a copy of the key.
1420 </para>
1421
1422 <para>
1423 The clever bit in DCP encryption requires the use of public-key
1424 encryption.  With this technique we can encrypt a block of data using
1425 some &lsquo;public&rsquo; key.  That data can then only be decrypted
1426 using a <emphasis>different</emphasis> &lsquo;private&rsquo; key.  The
1427 private and public keys are related mathematically, but it is
1428 extremely hard (or rather, virtually impossible) to derive the private
1429 key from the public key.
1430 </para>
1431
1432 <para>
1433 Public-key encryption allows us to distribute the DCP's key to Alice
1434 securely.  The manufacturer of Alice's projector generates a public
1435 and private key.  They hide the private key deep inside the bowels of
1436 the projector (inside an integrated circuit) where no-one can read it.
1437 They then make the public key available to anyone who is interested.
1438 </para>
1439
1440 <para>
1441 We take our DCP's symmetric key and encrypt it using the public key of
1442 Alice's projector.  We send the result to Alice over email (using a
1443 format called a Key Delivery Message, or KDM).  Her projector then
1444 decrypts our message using its private key, yielding the magic
1445 symmetric key which can decrypt the DCP.
1446 </para>
1447
1448 <para>
1449 If is fine if Mallory intercepts our email to Alice, since the only
1450 key which can decrypt the message is the private key buried inside
1451 Alice's projector.  The projector manufacturer is very careful that
1452 no-one ever finds out what this key is.  Our DCP is secure: only Alice
1453 can play it back, since only her projector knows the key (even Alice
1454 does not).
1455 </para>
1456
1457 </section>
1458 </section>
1459
1460
1461 <!-- ============================================================== -->
1462 <section>
1463 <title>Encryption using DCP-o-matic</title>
1464
1465 <para>
1466 There are two steps to distributing an encrypted DCP.  First, the
1467 DCP's data must be encrypted, and secondly KDMs must be generated for
1468 those cinemas that are allowed to play the DCP.
1469 </para>
1470
1471 <para>
1472 The first part is simple: ticking the <guilabel>Encrypted</guilabel>
1473 box in the <guilabel>DCP</guilabel> tab of DCP-o-matic will encrypt
1474 the DCP using a random key that DCP-o-matic generates.  The key will
1475 be written to the film's metadata file, which should be kept
1476 secure.
1477 </para>
1478
1479 <para>
1480 A DCP that is generated with the <guilabel>Encrypted</guilabel> box
1481 ticked will not play on any projector as-is (it will be marked as
1482 &lsquo;locked&rsquo;, or whatever the projector manufacturer's term
1483 is).
1484 </para>
1485
1486 <para>
1487 The second part is to generate KDMs for the cinemas that you wish to
1488 allow to play your DCP.  This is done using the <guilabel>Make
1489 KDMs</guilabel> option on the <guilabel>Jobs</guilabel> menu.  This
1490 will open the KDM dialogue box, as shown in <xref linkend="fig-kdm"/>.
1491 </para>
1492
1493 <figure id="fig-kdm">
1494   <title>KDM dialog</title> 
1495   <mediaobject>
1496     <imageobject> 
1497       <imagedata fileref="screenshots/kdm&scs;"/>
1498     </imageobject> 
1499   </mediaobject>
1500 </figure>
1501
1502 <para>
1503 In order to generate KDMs for a particular projector, you need to know
1504 its <emphasis>certificate</emphasis>.  These are usually made
1505 available by the projector manufacturers as text files with a
1506 <code>.pem</code> extension.
1507 </para>
1508
1509 <para>
1510 DCP-o-matic can store these certificates to make life easier.  It
1511 stores details of cinemas and screens within those cinemas.  Each
1512 screen has a certificate for its projector.  DCP-o-matic can generate
1513 KDMs for any screens that it knows about.
1514 </para>
1515
1516 <para>
1517 To add a cinema, click <guilabel>Add Cinema...</guilabel>.  This opens
1518 a dialogue box into which you can enter the cinema's name, and
1519 optionally an email address.  This email address can be used to
1520 get DCP-o-matic to deliver KDMs via email, but it is optional.
1521 </para>
1522
1523 <para>
1524 Once you have added a cinema, select it by clicking on its name, then
1525 click <guilabel>Add Screen...</guilabel>.  The resulting dialogue
1526 allows you to enter a name for the screen and load in its certificate
1527 from a file.  The certificate should be in SHA256 PEM format.
1528 </para>
1529
1530 <para>
1531 Once you have set up all the screens that you need KDMs for,
1532 DCP-o-matic can generate KDMs for the last DCP that you generated for
1533 the currently-loaded film.  Select the cinemas and/or screens that you
1534 want KDMs for and fill in the start and end dates and times.  
1535 </para>
1536
1537 <para>
1538 Finally, choose what you want to do with the KDMs.  They can be
1539 written to disk, to a location that you can specify by clicking
1540 <guilabel>Browse</guilabel>.  Alternatively, if you choose
1541 <guilabel>Send by email</guilabel> the KDMs will be zipped up and
1542 emailed to the appropriate cinema email addresses.  Click OK to
1543 generate the KDMs.
1544 </para>
1545
1546 </section>
1547
1548 </chapter>
1549
1550
1551
1552 <!-- ============================================================== -->
1553 <!-- PREFERENCES                                                    -->
1554 <!-- ============================================================== -->
1555
1556 <chapter xml:id="ch-preferences" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
1557 <title>Preferences</title>
1558
1559 <para>
1560 DCP-o-matic provides a few preferences which can be used to modify its
1561 behaviour.  This chapter explains those options.
1562 </para>
1563
1564
1565 <!-- ============================================================== -->
1566 <section>
1567 <title>The preferences dialogue</title>
1568
1569 <para>
1570 The preferences dialogue is opened by choosing
1571 <guilabel>Preferences...</guilabel> from the <guilabel>Edit</guilabel>
1572 menu.  The dialogue is split into eight tabs.
1573 </para>
1574
1575 <!-- ============================================================== -->
1576 <section>
1577 <title>General</title>
1578
1579 <para>
1580 The general tab is shown in <xref linkend="fig-prefs-general"/>.
1581 </para>
1582
1583 <figure id="fig-prefs-general"> 
1584   <title>General preferences</title> 
1585   <mediaobject>
1586     <imageobject> 
1587       <imagedata fileref="screenshots/prefs-general&scs;"/>
1588     </imageobject> 
1589   </mediaobject>
1590 </figure>
1591
1592
1593 <!-- ============================================================== -->
1594 <section>
1595 <title>Language</title>
1596
1597 <para>
1598 If you tick the <guilabel>Set Language</guilabel> checkbox and choose
1599 a language from the list, that language will be used for DCP-o-matic.
1600 You will need to restart DCP-o-matic to see the new language.
1601 </para>
1602
1603 <para>
1604 The translations for DCP-o-matic have been contributed by helpful
1605 users.  If your language is not on the last, head to <ulink
1606 url="http://dcpomatic.com/i18n.php">the DCP-o-matic website</ulink> to
1607 read about how to contribute a translation.
1608 </para>
1609 </section>
1610
1611
1612 <!-- ============================================================== -->
1613 <section>
1614 <title>Threads</title>
1615
1616 <para>
1617 When DCP-o-matic is encoding DCPs it can use multiple parallel threads
1618 to speed things up.  Set this value to the number of threads
1619 DCP-o-matic should use.  This should normally be the number of
1620 processors (or processor cores) in your machine.  DCP-o-matic will try
1621 to set this up correctly when you run it for the first time.
1622 </para>
1623
1624 </section>
1625
1626 <!-- ============================================================== -->
1627 <section>
1628 <title>Updates</title>
1629
1630 <para>
1631 The <guilabel>Check for updates on startup</guilabel> option, if
1632 enabled, will tell DCP-o-matic to check on <ulink
1633 url="http://dcpomatic.com/">dcpomatic.com</ulink> to see if there any
1634 newer versions of DCP-o-matic then the one you are running.  If so, a
1635 dialogue box will open with a link to download the new version.
1636 available
1637 </para>
1638
1639 <para>
1640 The <guilabel>Check for testing updates as well as stable
1641 ones</guilabel> option will also check for test updates as well as
1642 those that are formally &lsquo;released&rsquo;. This is useful if you
1643 like to live on the bleeding edge!
1644 </para>
1645 </section>
1646
1647 </section>
1648
1649 <!-- ============================================================== -->
1650 <section>
1651 <title>Defaults</title>
1652
1653 <para>
1654 The defaults tab is shown in <xref linkend="fig-prefs-defaults"/>.
1655 </para>
1656
1657 <figure id="fig-prefs-defaults">
1658   <title>Defaults preferences</title> 
1659   <mediaobject>
1660     <imageobject> 
1661       <imagedata fileref="screenshots/prefs-defaults&scs;"/>
1662     </imageobject> 
1663   </mediaobject>
1664 </figure>
1665
1666 <para>
1667 The options in this tab simply allow you to set up default values for
1668 various properties of new films.
1669 </para>
1670
1671 </section>
1672
1673 <!-- XXX: servers -->
1674
1675 <!-- ============================================================== -->
1676 <section xml:id="sec-prefs-colour">
1677 <title>Colour conversions</title>
1678
1679 <para>
1680 The colour conversions tab is shown in <xref linkend="fig-prefs-colour-conversions"/>.
1681 </para>
1682
1683 <figure id="fig-prefs-colour-conversions">
1684   <title>Colour conversions preferences</title> 
1685   <mediaobject>
1686     <imageobject> 
1687       <imagedata fileref="screenshots/prefs-colour-conversions&scs;"/>
1688     </imageobject> 
1689   </mediaobject>
1690 </figure>
1691
1692 <para>
1693 As part of the encoding process, DCP-o-matic has to convert the colour
1694 space of the source files that you use into XYZ, the colour space used
1695 by the DCI standard.
1696 </para>
1697
1698 <para>
1699 Colour conversion is discussed in more detail in a separate document
1700 <ulink url="http://dcpomatic.com/manual/colour.pdf">colour.pdf</ulink>.
1701 </para>
1702
1703 <para>
1704 These preferences control a list of presets which are suitable for
1705 converting from common input colour spaces to XYZ.
1706 </para>
1707
1708 </section>
1709
1710
1711 <!-- ============================================================== -->
1712 <section>
1713 <title>Keys</title>
1714
1715 <para>
1716 The Keys tab (shown in <xref linkend="fig-prefs-keys"/>) holds options
1717 related to the keys and certificates used in some parts of DCP
1718 creation.
1719 </para>
1720
1721 <figure id="fig-prefs-keys"> 
1722   <title>Keys preferences</title> 
1723   <mediaobject>
1724     <imageobject> 
1725       <imagedata fileref="screenshots/prefs-keys&scs;"/>
1726     </imageobject> 
1727   </mediaobject>
1728 </figure>
1729
1730 <para>
1731 At the top of the tab is the chain of certificates that will be used
1732 to sign DCPs and KDMs.  DCP-o-matic creates a random chain when you
1733 first run it, so if you are happy to use a randomly-generated chain
1734 you can ignore the preferences.  Otherwise, you can add or remove
1735 certificates from the chain using the <guilabel>Add...</guilabel> and
1736 <guilabel>Remove</guilabel> buttons.
1737 </para>
1738
1739 <para>
1740 If you want DCP-o-matic to re-create the certificate chain (using new,
1741 random certificates) click <guilabel>Re-make
1742 certificates...</guilabel> and specify your organisation and common
1743 names in the dialogue box that opens.
1744 </para>
1745
1746 <para>
1747 Underneath the certificate chain is the private key that corresponds
1748 to the leaf certificate in the chain.  You can specify your own
1749 private key by clicking <guilabel>Load...</guilabel>.  You must do
1750 this if you change the leaf certificate, so that the leaf private key
1751 corresponds to the public key held in the leaf certificate.
1752 </para>
1753
1754 <para>
1755 The bottom of the tab specifies the certificate and private key that
1756 is used to decrypt DCPs if they are imported as sources to
1757 DCP-o-matic.  If you want to import an encrypted DCP you will need to
1758 give the decryption certificate to the distributor of the DCP so that
1759 they can generate a DKDM for you.  As with the certificate chain,
1760 DCP-o-matic will create a certificate and private key for you.  You
1761 can also choose to load your own certificate and key.
1762 </para>
1763
1764 </section>
1765
1766 <!-- ============================================================== -->
1767 <section xml:id="sec-prefs-tms">
1768 <title>TMS</title>
1769 <titleabbrev xml:id="sec-prefs-tms-short">TMS preferences</titleabbrev>
1770
1771 <para>
1772 The TMS tab (shown in <xref linkend="fig-prefs-tms"/>) gives some
1773 options for specifying details about your theatre management system
1774 (TMS).  If you do this, and your TMS accepts SSH connections, you can
1775 upload DCPs directly from DCP-o-matic to the TMS using the
1776 <guilabel>Send DCP to TMS</guilabel> option in the
1777 <guilabel>Jobs</guilabel> menu.
1778 </para>
1779
1780 <figure id="fig-prefs-tms"> 
1781   <title>TMS preferences</title> 
1782   <mediaobject>
1783     <imageobject> 
1784       <imagedata fileref="screenshots/prefs-tms&scs;"/>
1785     </imageobject> 
1786   </mediaobject>
1787 </figure>
1788
1789 <para>
1790 <guilabel>TMS IP address</guilabel> should be set to the IP address of
1791 your TMS, <guilabel>TMS target path</guilabel> to the place that DCPs
1792 should be uploaded to (which will be relative to the home directory of
1793 the SSH user).  Finally, the user name and password are the
1794 credentials required to log into the TMS via SSH.
1795 </para>
1796 </section>
1797
1798
1799 <!-- ============================================================== -->
1800 <section>
1801 <title>KDM email</title>
1802
1803 <para>
1804 The KDM email is shown in <xref linkend="fig-prefs-kdm-email"/>.
1805 </para>
1806
1807 <figure id="fig-prefs-kdm-email"> 
1808   <title>KDM email preferences</title> 
1809   <mediaobject>
1810     <imageobject> 
1811       <imagedata fileref="screenshots/prefs-kdm-email&scs;"/>
1812     </imageobject> 
1813   </mediaobject>
1814 </figure>
1815
1816 <para>
1817 This is a template for the email that is used to send KDMs out to
1818 cinemas.  You can change it to say whatever you like.  A few
1819 &lsquo;magic&rsquo; strings will be replaced by information from the
1820 KDM that is being sent:
1821 </para>
1822
1823 <table>
1824 <title>&lsquo;Magic&rsquo; KDM strings</title>
1825 <tgroup cols='2' align='left' colsep='1' rowsep='1'>
1826 <tbody>
1827 <row>
1828 <entry><code>$CPL_NAME</code></entry><entry>DCP title</entry>
1829 </row>
1830 <row>
1831 <entry><code>$CINEMA_NAME</code></entry><entry>Cinema name</entry>
1832 </row>
1833 <row>
1834 <entry><code>$SCREENS</code></entry><entry>Name of screen or screens that KDMs are being generated for</entry>
1835 </row>
1836 <row>
1837 <entry><code>$START_TIME</code></entry><entry>The time from which the KDMs are valid</entry>
1838 </row>
1839 <row>
1840 <entry><code>$END_TIME</code></entry><entry>The time until which the KDMs are valid</entry>
1841 </row>
1842 </tbody>
1843 </tgroup>
1844 </table>
1845
1846 <para>
1847 The <guilabel>Reset to default text</guilabel> will replace the current KDM email with DCP-o-matic's default.
1848 </para>
1849
1850 </section>
1851
1852
1853 <!-- ============================================================== -->
1854 <section xml:id="sec-prefs-advanced">
1855 <title>Advanced</title>
1856 <titleabbrev xml:id="sec-prefs-advanced-short">Advanced preferences</titleabbrev>
1857
1858 <para>
1859 The advanced preferences are shown in <xref linkend="fig-prefs-advanced"/>.
1860 </para>
1861
1862 <figure id="fig-prefs-advanced"> 
1863   <title>Advanced preferences</title> 
1864   <mediaobject>
1865     <imageobject> 
1866       <imagedata fileref="screenshots/prefs-advanced&scs;"/>
1867     </imageobject> 
1868   </mediaobject>
1869 </figure>
1870
1871 <para>
1872 <guilabel>Maximum JPEG2000 bandwidth</guilabel> specifies the maximum
1873 bit-rate of JPEG2000 that DCP-o-matic will allow you to create.  You
1874 are advised to leave this at 250Mbit/s in normal use for maximum DCP
1875 compatibility.
1876 </para>
1877
1878 <para>
1879 <guilabel>Allow any DCP frame rate</guilabel> removes the limits on
1880 the DCP video frame rates that DCP-o-matic will create.  This may be
1881 useful for experimentation.  Again, you are strongly advised to leave
1882 this unticked for normal use.
1883 </para>
1884
1885 <para>
1886 The four checkboxes labelled <guilabel>Log</guilabel> control what
1887 sort of messages DCP-o-matic writes to its log file when creating a
1888 DCP.  It is useful to leave <guilabel>General</guilabel>,
1889 <guilabel>Warnings</guilabel> and <guilabel>Errors</guilabel> ticked
1890 as this makes the log files useful for tracking down bugs.
1891 </para>
1892
1893 <para>
1894 The <guilabel>Timing</guilabel> checkbox will enable extra log entries
1895 to allow developers to investigate and optimize the speed of
1896 DCP-o-matic.  It will significantly increase the size of the log files
1897 that are generated, so in normal use it is best to leave this
1898 unticked.
1899 </para>
1900
1901 </section>
1902 </section>
1903 </chapter>
1904
1905 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en" xml:id="ch-frame-rates">
1906 <title>Frame rates</title>
1907
1908 <para>
1909 In an ideal world, a DCP would be created using content at the same
1910 video frame and audio sampling rates as the DCP.  This is not,
1911 however, always possible.
1912 </para>
1913
1914
1915 <!-- ============================================================== -->
1916 <section>
1917 <title>DCP frame rate limitations</title>
1918
1919 <para>
1920 There are some limitations to video and audio frame rates in DCPs.  This is
1921 complicated by the fact that not all projectors will play DCPs at the
1922 same frame rates.  It is possible to create a DCP which one projector will
1923 play fine, but another (of a different type) will refuse to play, or
1924 even refuse to ingest.
1925 </para>
1926
1927
1928 <!-- ============================================================== -->
1929 <section>
1930 <title>Guaranteed rates</title>
1931
1932 <para>
1933 The only rates that are (pretty much) guaranteed to work on all DCI
1934 projectors is 24 frames per second (fps) for video and 48kHz or 96kHz
1935 for audio.  If you are sending your DCPs to unknown places it wise to
1936 consider using these rates if at all possible.
1937 </para>
1938
1939 </section>
1940
1941
1942 <!-- ============================================================== -->
1943 <section>
1944 <title>Other often-supported rates</title>
1945 <para>
1946 Many projectors now in the wild support additional video frame rates:
1947 25, 30 and 48 fps.
1948 </para>
1949 </section>
1950
1951
1952 <!-- ============================================================== -->
1953 <section>
1954 <title>Adapting content to fit the DCP rate</title>
1955
1956 <para>
1957 DCP-o-matic has a few tricks to allow you to use content that is not
1958 in one of the &lsquo;approved&rsquo; rates.
1959 </para>
1960
1961 <para>
1962 Audio is easy: DCP-o-matic can resample to 48kHz from any source rate
1963 with minimal loss in quality.
1964 </para>
1965
1966 <para>
1967 Video rate conversion is harder.  DCP-o-matic's strategy to deal
1968 with a non-supported content rate is to run it at the wrong speed, and
1969 to adjust the audio to keep it in sync.
1970 </para>
1971
1972 <para>Consider the example of a 25fps source for which you want
1973 to create a 24fps DCP.  DCP-o-matic will put the frames from the
1974 source directly into the DCP without modification, but will tell the
1975 projector to play them back at 24fps.  This means that the DCP's video
1976 will run slightly slower than the original.
1977 </para>
1978
1979 <para>
1980 If DCP-o-matic did nothing else, the result of this would be that the
1981 audio would be running at the original speed with the video running
1982 slowly.  Hence the audio would drift slowly out of sync.  To avoid
1983 this, DCP-o-matic also resamples the audio such that the projector
1984 will play it too slow by the same amount.  Hence it will sound
1985 slightly different but will remain in sync with the video.
1986 </para>
1987
1988 <para>
1989 For very low or high frame rates, DCP-o-matic can also skip or duplicate frames.
1990 </para>
1991
1992 </section>
1993 </section>
1994
1995
1996 <!-- ============================================================== -->
1997 <section>
1998 <title>Setting up</title>
1999
2000 <para>
2001 The <guilabel>Frame Rate</guilabel> control in the
2002 <guilabel>DCP</guilabel> tab sets the video frame rate that the DCP
2003 will use.  Clicking <guilabel>Use best</guilabel> sets the rate to
2004 what DCP-o-matic thinks is the best for your content.  With this
2005 button, DCP-o-matic assumes that the whole range of frame rates (24,
2006 25, 30 and 48fps) are allowable.
2007 </para>
2008
2009 <para>
2010 After this, the <guilabel>Video</guilabel> tab for each piece of
2011 content will give a summary of what DCP-o-matic is doing with that
2012 content.
2013 </para>
2014
2015 <para>
2016 If you want to experiment with other non-standard frame rates, you can
2017 do so by ticking the <guilabel>Allow any DCP frame rate</guilabel> in
2018 the <guilabel>Advanced</guilabel> tab of the preferences dialogue (see the
2019 <xref linkend="sec-prefs-advanced" endterm="sec-prefs-advanced-short"/>).  You are strongly advised to
2020 use this only on your own equipment, and only for experimentation
2021 purposes.
2022 </para>
2023
2024 </section>
2025
2026 </chapter>
2027
2028
2029 <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en" xml:id="ch-servers">
2030 <title>Encoding servers</title>
2031
2032 <para>
2033 One way to increase the speed of DCP encoding is to use more
2034 than one machine at the same time.  An instance of DCP-o-matic can
2035 offload some of the time-consuming JPEG2000 encoding to any number of
2036 other machines on a network.  To do this, one &lsquo;master&rsquo;
2037 machine runs DCP-o-matic, and the &lsquo;server&rsquo; machines run
2038 a small program called <code>dcpomatic_server</code>.
2039 </para>
2040
2041 <para>
2042 The master and server machines do not need to be the same type, so you
2043 can mix Windows PCs, Macs and Linux machines as you wish.
2044 </para>
2045
2046
2047 <!-- ============================================================== -->
2048 <section>
2049 <title>Running the servers</title>
2050
2051 <para>
2052 There are two options for the encoding server;
2053 <code>dcpomatic_server_cli</code>, which runs on the command line, and
2054 <code>dcpomatic_server</code>, which has a simple GUI.  The command line
2055 version is well-suited to headless servers, especially on Linux, and
2056 the GUI version works best on Windows where it will put an icon in the
2057 system tray.
2058 </para>
2059
2060 <para>
2061 To run the command line version, simply enter:
2062 </para>
2063
2064 <programlisting>
2065 dcpomatic_server_cli
2066 </programlisting>
2067
2068 <para>
2069 at a command prompt.  If you are running the program on a machine with
2070 a multi-core processor, you can run multiple parallel encoding threads
2071 by doing something like:
2072 </para>
2073
2074 <programlisting>
2075 dcpomatic_server_cli -t 4
2076 </programlisting>
2077
2078 <para>
2079 to run 4 threads in parallel.
2080 </para>
2081
2082 <para>
2083 To run the GUI version on windows, run the &lsquo;DCP-o-matic encode
2084 server&rsquo; from the start menu.  An icon will appear in the system
2085 tray; right-click it to open a menu from whence you can quit the
2086 server or open a window to show its status.
2087 </para>
2088
2089 <para>If you would rather not bother installing DCP-o-matic on your
2090 server computers, the other option is to use the live-CD
2091 image that you can download from the <ulink
2092 url="http://dcpomatic.com/">DCP-o-matic web site.</ulink></para>
2093
2094 <para>Either burn the image to CD, or write it to a USB stick (using
2095 something like <ulink
2096 url="http://unetbootin.sourceforge.net/">unetbootin</ulink>).  Boot a
2097 PC from the CD or USB stick and it becomes a DCP-o-matic server
2098 without touching your standard operating system install.
2099 </para>
2100
2101 </section>
2102
2103 <!-- ============================================================== -->
2104 <section>
2105 <title>Setting up DCP-o-matic</title>
2106
2107 <para>
2108 DCP-o-matic periodically looks on the local network for servers.  Any
2109 that it finds are given work to do during encodes.  Selecting
2110 <guilabel>Encoding Servers</guilabel> from the
2111 <guilabel>Tools</guilabel> menu brings up a window which shows that
2112 servers that DCP-o-matic has found.
2113 </para>
2114
2115 </section>
2116
2117 <!-- ============================================================== -->
2118 <section>
2119 <title>Some notes about encode servers</title>
2120
2121 <para>
2122 DCP-o-matic does not mind if servers come and go; if a server
2123 disappears, DCP-o-matic will stop sending work to it, and will check
2124 it every minute or so in case it has come back online.
2125 </para>
2126
2127 <para>
2128 You will probably find that using a 1Gb/s or faster network will
2129 provide a significant speed-up compared to a 100Mb/s network.
2130 </para>
2131
2132 </section>
2133
2134 </chapter>
2135
2136 <chapter xml:id="ch-files" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
2137 <title>Generated files</title>
2138
2139 <para>
2140 DCP-o-matic generates a number of files as it makes a DCP.  <xref
2141 linkend="fig-file-structure"/> shows the files that might be generated
2142 after you have created a DCP for a film called &lsquo;DCP Test&rsquo;.
2143 </para>
2144
2145 <figure id="fig-file-structure"> 
2146   <title>Creating a new film</title> 
2147   <mediaobject>
2148     <imageobject> 
2149       <imagedata fileref="diagrams/file-structure&dia;"/>
2150     </imageobject> 
2151   </mediaobject>
2152 </figure>
2153
2154 <para>
2155 The <code>DCP Test</code> folder is the one that you specify when you
2156 select the <guilabel>New Film</guilabel> option from DCP-o-matic's
2157 menu.  Everything is stored inside this folder.
2158 </para>
2159
2160 <para>
2161 DCP-o-matic generates some working files as it goes along.  These are as follows:
2162 <itemizedlist>
2163
2164 <listitem><code>log</code> is a list of notes that DCP-o-matic makes as it goes
2165 along.  This can be useful for debugging purposes if something goes
2166 wrong.</listitem>
2167
2168 <listitem><code>metadata</code> stores the settings that you have made
2169 for this film: things like cropping, output format and so on.</listitem>
2170
2171 <listitem><code>video</code> is where DCP-o-matic writes the DCP's
2172 video data as it encodes it.</listitem>
2173
2174 <listitem><code>analysis</code> is used to keep the results of audio analysis runs.</listitem>
2175
2176 <listitem><code>info</code> contains details of each video frame that
2177 DCP-o-matic has written so far.  This is used when an encoding
2178 operation is interrupted and DCP-o-matic must resume it.</listitem>
2179 </itemizedlist>
2180 </para>
2181
2182 <para>
2183 Following this is the DCP itself:
2184 <code>DCP-TEST_EN-XX_UK-U_51_2K_CSY_20130218_CSY_OV</code>.  This
2185 contains some small XML files, which describe the DCP, and two large
2186 MXF files, which contain the DCP's audio and video data.  This folder
2187 (<code>DCP-TEST_EN-XX_...</code>) is what you should ingest, or pass
2188 to the cinema which is showing your DCP.
2189 </para>
2190
2191 </chapter>
2192
2193 <chapter>
2194 <title>Loose ends</title>
2195
2196 <para>
2197 This chapter collects a few notes on bits of DCP-o-matic that do not fit elsewhere in the manual.
2198 </para>
2199
2200
2201 <!-- ============================================================== -->
2202 <section>
2203 <title>Resuming encodes</title>
2204
2205 <para>
2206 If you cancel a DCP encoding run half-way through, or your computer
2207 crashes... fear not.  DCP-o-matic takes care to ensure that, in most
2208 cases, it can resume encoding from where it left off.  When you
2209 re-start a DCP creation, using the same settings are a previous run,
2210 DCP-o-matic will first check that the existing picture frames are
2211 correct, and then resume from where it left off.  The checking of
2212 existing frames does take some time, but it is much faster than
2213 running a full re-encode.
2214 </para>
2215
2216 <para>
2217 This resumption is achieved by writing a digest (hash) to disk for
2218 every image frame that is written.  On resumption, the existing MXF
2219 file for image data is read and its contents checked against the
2220 hashes.
2221 </para>
2222
2223 </section>
2224
2225 </chapter>
2226
2227 </book>