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