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