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