From: Carl Hetherington Date: Tue, 31 Jul 2012 15:59:41 +0000 (+0100) Subject: Update for newer libdcp; add start of manual. X-Git-Tag: v2.0.48~1784 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=75be8cbd1d3307ea62fe8e79543ca518f4ee7bc2 Update for newer libdcp; add start of manual. --- diff --git a/.gitignore b/.gitignore index 31dbd5e1f..757f42ece 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ src/lib/version.cc *.exe alignment sync +doc/manual/html +doc/manual/pdf +doc/manual/extensions.ent \ No newline at end of file diff --git a/doc/manual/Makefile b/doc/manual/Makefile new file mode 100644 index 000000000..9c4681998 --- /dev/null +++ b/doc/manual/Makefile @@ -0,0 +1,121 @@ +# DVD-o-matic manual makefile + +all: html pdf + +DIAGRAMS := + +SCREENSHOTS := file-new.png new-film.png click-content-selector.png select-content-file.png examine-thumbs.png setup.png + +XML := dvdomatic.xml + +GRAPHICS := + +# +# For the HTML, default to copying the screenshots direct +# +html/screenshots/%.png: screenshots/%.png + mkdir -p html/screenshots + cp $< $@ + +# +# Some need resizing... +# +html/screenshots/editor.png: screenshots/editor.png + mkdir -p html/screenshots + convert -resize 50% $< $@ +html/screenshots/mixer.png: screenshots/mixer.png + mkdir -p html/screenshots + convert -resize 50% $< $@ +html/screenshots/default-folder-for-new-sessions.png: screenshots/default-folder-for-new-sessions.png + mkdir -p html/screenshots + convert -resize 75% $< $@ +html/screenshots/welcome-to-ardour.png: screenshots/welcome-to-ardour.png + mkdir -p html/screenshots + convert -resize 75% $< $@ +html/screenshots/monitoring-choices.png: screenshots/monitoring-choices.png + mkdir -p html/screenshots + convert -resize 75% $< $@ +html/screenshots/monitor-section.png: screenshots/monitor-section.png + mkdir -p html/screenshots + convert -resize 75% $< $@ +html/screenshots/audio-midi-setup-device.png: screenshots/audio-midi-setup-device.png + mkdir -p html/screenshots + convert -resize 75% $< $@ +html/screenshots/new-session.png: screenshots/new-session.png + mkdir -p html/screenshots + convert -resize 75% $< $@ +html/screenshots/export-dialogue.png: screenshots/export-dialogue.png + mkdir -p html/screenshots + convert -resize 75% $< $@ + +# For HTML: convert graphics from SVG to PNG +graphics/%.png: graphics/%.svg + inkscape -z -f $< --export-png $@ --export-area-drawing + +# For LaTeX/PDF: convert graphics from SVG to PDF +graphics/%.pdf: graphics/%.svg + inkscape -z -f $< --export-pdf $@ --export-area-drawing + +# For HTML: convert diagrams from SVG to PNG +diagrams/%.png: diagrams/%.svg + inkscape -z -f $< --export-png $@ --export-area-drawing + +# For LaTeX/PDF: convert diagrams from SVG to PDF +diagrams/%.pdf: diagrams/%.svg + inkscape -z -f $< --export-pdf $@ --export-area-drawing + +# +# HTML +# + +html: $(XML) dvdomatic-html.xsl extensions-html.ent dvdomatic.css \ + $(addprefix html/screenshots/,$(SCREENSHOTS)) \ + $(subst .svg,.png,$(addprefix diagrams/,$(DIAGRAMS))) \ + $(subst .svg,.png,$(addprefix graphics/,$(GRAPHICS))) \ + +# The DocBook needs to know what file extensions to look for +# for screenshots and diagrams; use the correct file to tell it. + cp extensions-html.ent extensions.ent + +# DocBoox -> html + xmlto html -m dvdomatic-html.xsl dvdomatic.xml --skip-validation -o html + +# Copy graphics and CSS in +# mkdir -p html/diagrams html/graphics +# cp diagrams/*.png html/diagrams +# cp graphics/*.png html/graphics + cp dvdomatic.css html + +# +# PDF +# + +pdf: $(XML) dvdomatic-pdf.xsl extensions-pdf.ent screenshots/*.png $(subst .svg,.pdf,$(addprefix diagrams/,$(DIAGRAMS))) + +# The DocBook needs to know what file extensions to look for +# for screenshots and diagrams; use the correct file to tell it. + cp extensions-pdf.ent extensions.ent + + mkdir -p pdf + + dblatex -p dvdomatic-pdf.xsl -s dvdomatic.sty -r pptex.py -T native dvdomatic.xml -t pdf -o pdf/dvdomatic.pdf + + +# +# LaTeX (handy for debugging) +# + +tex: $(XML) dvdomatic-pdf.xsl extensions-pdf.ent + +# The DocBook needs to know what file extensions to look for +# for screenshots and diagrams; use the correct file to tell it. + cp extensions-pdf.ent extensions.ent + + mkdir -p tex + +# -P removes the revhistory table + dblatex -P doc.collab.show=0 -P latex.output.revhistory=0 -p dvdomatic-pdf.xsl -s dvdomatic.sty -r pptex.py -T native dvdomatic.xml -t tex -o tex/dvdomatic.tex + + +clean:; rm -rf html pdf diagrams/*.pdf diagrams/*.png graphics/*.png *.aux dvdomatic.cb dvdomatic.cb2 dvdomatic.glo dvdomatic.idx dvdomatic.ilg + rm -rf dvdomatic.ind dvdomatic.lof dvdomatic.log dvdomatic.tex dvdomatic.toc extensions.ent dvdomatic.out diff --git a/doc/manual/dvdomatic-html.xsl b/doc/manual/dvdomatic-html.xsl new file mode 100644 index 000000000..2b896046a --- /dev/null +++ b/doc/manual/dvdomatic-html.xsl @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/doc/manual/dvdomatic-pdf.xsl b/doc/manual/dvdomatic-pdf.xsl new file mode 100644 index 000000000..414fb64b8 --- /dev/null +++ b/doc/manual/dvdomatic-pdf.xsl @@ -0,0 +1,17 @@ + + + + +colorlinks,linkcolor=black,urlcolor=black + + +0 +0 + + +scale=0.6 + + +3 + + diff --git a/doc/manual/dvdomatic.css b/doc/manual/dvdomatic.css new file mode 100644 index 000000000..eb366b5fd --- /dev/null +++ b/doc/manual/dvdomatic.css @@ -0,0 +1,18 @@ +body { + font-family: luxi sans, sans-serif; + margin-left: 4em; + margin-right: 4em; + margin-top: 1em; + margin-bottom: 1em; +} + +div.sidebar { + margin-left: 1em; + margin-right: 1em; + padding-left: 1em; + padding-right: 1em; + border-color: #000000; + border-width: 2px; + border-style: solid; + background-color: #0E9E75; +} diff --git a/doc/manual/dvdomatic.sty b/doc/manual/dvdomatic.sty new file mode 100644 index 000000000..272640bb8 --- /dev/null +++ b/doc/manual/dvdomatic.sty @@ -0,0 +1,68 @@ +%% +%% This style is derivated from the docbook one +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{ardour}[2007/04/04 My DocBook Style] + +%% Just use the original package and pass the options +\RequirePackageWithOptions{docbook} + +% Use a nice font +\usepackage{lmodern} + +% Define \dbend as the dangerous bend sign +\font\manual=manfnt +\def\dbend{{\manual\char127}} + +% Redefine sidebar environment to use the dangerous bend style +% Danger, Will Robinson! +\def\sidebar{\begin{trivlist}\item[]\noindent% +\begingroup\hangindent=2pc\hangafter=-2%\clubpenalty=10000% +\def\par{\endgraf\endgroup}% +\hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces} +\def\endsidebar{\par\end{trivlist}} + + +% Futz with the title page; basically a copy of +% /usr/share/texmf/tex/latex/dblatex/style/dbk_title.sty +% with authors added. + +\def\DBKcover{ +\ifthenelse{\equal{\DBKedition}{}}{\def\edhead{}}{\def\edhead{Ed. \DBKedition}} + +\pagestyle{empty} + +% interligne double +\setlength{\oldbaselineskip}{\baselineskip} +\setlength{\baselineskip}{2\oldbaselineskip} +\textsf{ +\vfill +\vspace{2.5cm} +\begin{center} + \huge{\textbf{\DBKtitle}}\\ % + \ \\ % + \ \\ % + \Large{\DBKauthor}\\ % + \ifx\DBKsubtitle\relax\else% + \underline{\ \ \ \ \ \ \ \ \ \ \ }\\ % + \ \\ % + \huge{\textbf{\DBKsubtitle}}\\ % + \fi +\end{center} +\vfill +\setlength{\baselineskip}{\oldbaselineskip} +\hspace{1cm} +\vspace{1cm} +\begin{center} +\begin{tabular}{p{7cm} p{7cm}} +\Large{\DBKreference{} \edhead} & \\ +\end{tabular} +\end{center} +} + +% Format for the other pages +\newpage +\setlength{\baselineskip}{\oldbaselineskip} +\chead[]{\DBKcheadfront} +\lfoot[]{} +} diff --git a/doc/manual/dvdomatic.xml b/doc/manual/dvdomatic.xml new file mode 100644 index 000000000..70480bfef --- /dev/null +++ b/doc/manual/dvdomatic.xml @@ -0,0 +1,313 @@ + + + + +%dbcent; + +%extensions; +]> + + + +DVD-o-matic +CarlHetherington + + + +Introduction + + +Hello, and welcome to DVD-o-matic! + + +
+What is DVD-o-matic? + + +DVD-o-matic is a program to generate Digital +Cinema Packages (DCPs) from DVDs, Blu-Rays, video files such as MP4 +and AVI, or still images. The resulting DCPs will play on modern digital +cinema projectors. + + + +You might find it useful to make DVDs easier to present, to encode +independently-shot feature films, or to generate local advertising for +your cinema. + + +
+
+ + +Installation + +
+Windows + + +To install DVD-o-matic on Windows, simply download the installer from +http://carlh.net +and double-click it. Click through the installer wizard, and +DVD-o-matic will be installed to your machine. + + +
+ +
+Linux + + +Installation on Linux is currently a little involved, as there are no +packages available (yet); you will have to compile it from source. + + + +The following dependencies are required: + +FFmpeg +libsndfile +OpenSSL +libopenjpeg +ImageMagick +Boost +libssh +GTK +wxWidgets +libdcp + + + + +Once you have installed the development packages for the dependencies, +download the source code from http://carlh.net, +unpack it and run the following commands from inside the source +directory: + + + +./waf configure +./waf build +sudo ./waf install + + + +With any luck, this will build and install DVD-o-matic on your system. To run it, enter: + + + +dvdomatic + + + +in a shell. + + +
+
+ + +Creating a video DCP with DVD-o-matic + + +In this chapter we will see how to create a video DCP using DVD-o-matic. + + +
+Creating a new film + + +Let's make a very simple DCP to see how DVD-o-matic works. First, we +need some content. Download the low-resolution trailer for the open +movie Sintel from their +website. Generally, of course, one would want to use the +highest-resolution material available, but for this test we will use +the low-resolution version to save everyone's bandwidth bills. + + + +Now, start DVD-o-matic and its window will open. First, we will +create a new film. A ‘film’ is how DVD-o-matic refers to +a piece of content, along with some settings, which we will make into +a DCP. DVD-o-matic stores its data in a folder on your disk while it +creates the DCP. will use to store its working files while it creates +your DCP. You can create a new film by selecting +New from the File menu, as +shown in . + + +
+ Creating a new film + + + + + +
+ + +This will open a dialogue box for the new film, as shown in . + + +
+ Dialogue box for creating a new film + + + + + +
+ + +In this dialogue box you can choose a name for the DCP. This will be +used to name the folder to store its data in, and also as the initial +name for the DCP itself). You can also set where you want to create +the film. In the example from the figure, DVD-o-matic will create a +folder called ‘DCP Test’ inside my home folder (carl) into which it +will write its working files. + + +
+ +
+Selecting content + + +The next step is to set the content that you want to use. Click the +content selector, as shown in and the a file chooser will +open for you to select the content file to use, as shown in . + + +
+ Opening the content selector + + + + + +
+ +
+ Selecting the content file + + + + + +
+ + +Select your content file and click Open. In this +case, we are using the Sintel trailer that we downloaded earlier. + + + +When you do this, DVD-o-maticw will take a look at your file. After a +short while (when the progress bars at the bottom right of the window +have finished), you can look through your content using the slider to +the right of the window, as shown in . + + +
+ Examining the content + + + + + +
+ + +Dragging the slider will move through your video. + + +
+ +
+Setting up + + +Now there are a few things to set up to describe how the DCP should be +created, as shown in . + + +
+ Setting up + + + + + +
+ + +The first thing is the content type. This can be +‘feature’, ‘trailer’ or whatever; select the +required type from the drop-down list. + + + +Next is the format. This will govern the shape that DVD-o-matic will +make your image into. Select the aspect ratio that your content +should be presented in. The ‘4:3 within Flat’ and +‘16:9 within Flat’ settings will put the image at the +specified ratio within a Flat (1.85:1) frame, so that you can project +the DCP using your projector's Flat preset. + + + +The remaining options can often be left alone, but may sometimes be +useful. The ‘crop’ settings can be used to crop your +content, which can be useful to remove black borders from round the +edges of DVD images, for example. The L, +R, T and +B settings correspond to the left, right, top and +bottom of the image respectively. The specified number of pixels will +be trimmed from each edge, and your content image in the right of the +window will be updated to show the cropping in action. + + + +The ‘filters’ settings allow you to apply various video +filters to the image. These may be useful to try to improve +poor-quality sources like DVDs. We will discuss filtering later in the manual. + + + + +The ‘scaler’ is the method that will be used to scale up +your content to the required size for the DCP, if required. We will +discuss the options in more detail later; Bicubic is a fine choice in +most situations. + + + + +‘Audio Gain’ is used to alter the volume of the +soundtrack. The specified gain (in dB) will be applied to each sound +channel before it is written to the DCP. + + + +‘Audio Delay’ is used to adjust the synchronisation +between audio and video. A positive delay will move the audio later +with respect to the video, and a negative delay will move it earlier. + + + + + + +
+ +
+ +
diff --git a/doc/manual/extensions-html.ent b/doc/manual/extensions-html.ent new file mode 100644 index 000000000..7cfd79043 --- /dev/null +++ b/doc/manual/extensions-html.ent @@ -0,0 +1,3 @@ + + + diff --git a/doc/manual/extensions-pdf.ent b/doc/manual/extensions-pdf.ent new file mode 100644 index 000000000..75cb16435 --- /dev/null +++ b/doc/manual/extensions-pdf.ent @@ -0,0 +1,3 @@ + + + diff --git a/doc/manual/pptex.py b/doc/manual/pptex.py new file mode 100755 index 000000000..85653e5a5 --- /dev/null +++ b/doc/manual/pptex.py @@ -0,0 +1,35 @@ +#!/usr/bin/python + +# Farcical script to remove newlines after +# \begin{sidebar} in dblatex' .tex output; +# +# farcical because I'm sure this can be done +# in 1 line of sed, and also because I'm sure +# the whole need for this script could be fixed +# in the ardour.sty (but I don't know how). + +import sys +import os +import tempfile +import shutil + +f = open(sys.argv[1]) +t = tempfile.NamedTemporaryFile(delete = False) +remove_next = False +while 1: + l = f.readline() + if l == '': + break + + if not remove_next: + print>>t,l, + + remove_next = False + + if l.strip() == '\\begin{sidebar}': + remove_next = True + +f.close() +t.close() +shutil.move(t.name, sys.argv[1]) + diff --git a/doc/manual/screenshots/click-content-selector.png b/doc/manual/screenshots/click-content-selector.png new file mode 100644 index 000000000..556232e35 Binary files /dev/null and b/doc/manual/screenshots/click-content-selector.png differ diff --git a/doc/manual/screenshots/examine-thumbs.png b/doc/manual/screenshots/examine-thumbs.png new file mode 100644 index 000000000..bd52e6648 Binary files /dev/null and b/doc/manual/screenshots/examine-thumbs.png differ diff --git a/doc/manual/screenshots/file-new.png b/doc/manual/screenshots/file-new.png new file mode 100644 index 000000000..d9c6d0204 Binary files /dev/null and b/doc/manual/screenshots/file-new.png differ diff --git a/doc/manual/screenshots/job-make-dcp.png b/doc/manual/screenshots/job-make-dcp.png new file mode 100644 index 000000000..0e91b63d1 Binary files /dev/null and b/doc/manual/screenshots/job-make-dcp.png differ diff --git a/doc/manual/screenshots/making-dcp.png b/doc/manual/screenshots/making-dcp.png new file mode 100644 index 000000000..b08c6862d Binary files /dev/null and b/doc/manual/screenshots/making-dcp.png differ diff --git a/doc/manual/screenshots/new-film.png b/doc/manual/screenshots/new-film.png new file mode 100644 index 000000000..6d93e756a Binary files /dev/null and b/doc/manual/screenshots/new-film.png differ diff --git a/doc/manual/screenshots/select-content-file.png b/doc/manual/screenshots/select-content-file.png new file mode 100644 index 000000000..a422386de Binary files /dev/null and b/doc/manual/screenshots/select-content-file.png differ diff --git a/doc/manual/screenshots/setup.png b/doc/manual/screenshots/setup.png new file mode 100644 index 000000000..897590ff3 Binary files /dev/null and b/doc/manual/screenshots/setup.png differ diff --git a/src/lib/dcp_content_type.cc b/src/lib/dcp_content_type.cc index 03712cb0d..1f50c8dc4 100644 --- a/src/lib/dcp_content_type.cc +++ b/src/lib/dcp_content_type.cc @@ -28,9 +28,9 @@ using namespace std; vector DCPContentType::_dcp_content_types; -DCPContentType::DCPContentType (string p, libdcp::DCP::ContentType c) +DCPContentType::DCPContentType (string p, libdcp::ContentKind k) : _pretty_name (p) - , _libdcp_type (c) + , _libdcp_kind (k) { } @@ -38,16 +38,16 @@ DCPContentType::DCPContentType (string p, libdcp::DCP::ContentType c) void DCPContentType::setup_dcp_content_types () { - _dcp_content_types.push_back (new DCPContentType ("Feature", libdcp::DCP::FEATURE)); - _dcp_content_types.push_back (new DCPContentType ("Short", libdcp::DCP::SHORT)); - _dcp_content_types.push_back (new DCPContentType ("Trailer", libdcp::DCP::TRAILER)); - _dcp_content_types.push_back (new DCPContentType ("Test", libdcp::DCP::TEST)); - _dcp_content_types.push_back (new DCPContentType ("Transitional", libdcp::DCP::TRANSITIONAL)); - _dcp_content_types.push_back (new DCPContentType ("Rating", libdcp::DCP::RATING)); - _dcp_content_types.push_back (new DCPContentType ("Teaser", libdcp::DCP::TEASER)); - _dcp_content_types.push_back (new DCPContentType ("Policy", libdcp::DCP::POLICY)); - _dcp_content_types.push_back (new DCPContentType ("Public Service Announcement", libdcp::DCP::PUBLIC_SERVICE_ANNOUNCEMENT)); - _dcp_content_types.push_back (new DCPContentType ("Advertisement", libdcp::DCP::ADVERTISEMENT)); + _dcp_content_types.push_back (new DCPContentType ("Feature", libdcp::FEATURE)); + _dcp_content_types.push_back (new DCPContentType ("Short", libdcp::SHORT)); + _dcp_content_types.push_back (new DCPContentType ("Trailer", libdcp::TRAILER)); + _dcp_content_types.push_back (new DCPContentType ("Test", libdcp::TEST)); + _dcp_content_types.push_back (new DCPContentType ("Transitional", libdcp::TRANSITIONAL)); + _dcp_content_types.push_back (new DCPContentType ("Rating", libdcp::RATING)); + _dcp_content_types.push_back (new DCPContentType ("Teaser", libdcp::TEASER)); + _dcp_content_types.push_back (new DCPContentType ("Policy", libdcp::POLICY)); + _dcp_content_types.push_back (new DCPContentType ("Public Service Announcement", libdcp::PUBLIC_SERVICE_ANNOUNCEMENT)); + _dcp_content_types.push_back (new DCPContentType ("Advertisement", libdcp::ADVERTISEMENT)); } DCPContentType const * diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index 2c6d1879b..cb858cf5a 100644 --- a/src/lib/dcp_content_type.h +++ b/src/lib/dcp_content_type.h @@ -31,15 +31,15 @@ class DCPContentType { public: - DCPContentType (std::string, libdcp::DCP::ContentType); + DCPContentType (std::string, libdcp::ContentKind); /** @return user-visible `pretty' name */ std::string pretty_name () const { return _pretty_name; } - libdcp::DCP::ContentType libdcp_type () const { - return _libdcp_type; + libdcp::ContentKind libdcp_kind () const { + return _libdcp_kind; } static DCPContentType const * from_pretty_name (std::string); @@ -50,7 +50,7 @@ public: private: std::string _pretty_name; - libdcp::DCP::ContentType _libdcp_type; + libdcp::ContentKind _libdcp_kind; /** All available DCP content types */ static std::vector _dcp_content_types; diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc index a6d0c2d10..4f42e13f1 100644 --- a/src/lib/make_dcp_job.cc +++ b/src/lib/make_dcp_job.cc @@ -84,7 +84,7 @@ MakeDCPJob::run () break; } - libdcp::DCP dcp (_fs->dir (_fs->name), _fs->name, _fs->dcp_content_type->libdcp_type (), rint (_fs->frames_per_second), frames); + libdcp::DCP dcp (_fs->dir (_fs->name), _fs->name, _fs->dcp_content_type->libdcp_kind (), rint (_fs->frames_per_second), frames); dcp.Progress.connect (sigc::mem_fun (*this, &MakeDCPJob::dcp_progress)); descend (0.9);