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