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