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