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