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