Credit Andrea - clarified Render Farm section based on user suggestions
[goodguy/cin-manual-latex.git] / parts / Rendering.tex
index 23ff4514904238b8e9ebdceaa3bfb31e33d8089d..a76d6e06047ea15ffec12be9f60f88bcfc4fea5c 100644 (file)
@@ -2,6 +2,15 @@
 \label{cha:rendering}
 \index{rendering}
 
+To configure the render according to your needs and to obtain the desired output, you will need to check on what your settings are for these three items:
+
+\begin{enumerate}
+       \item \textbf{Timeline:} is the main starting point because, in addition to determining the range of frames that will be rendered, it is on the timeline that plugins and other editing features are applied, which will then be included in the rendered file. 
+       \item \textbf{Set Format:} is used to configure the fps, aspect ratio and frame size of the project     (= output). This can be found in the pulldown: \texttt{Settings $\rightarrow$ Format... (Shift + F)}.
+       See: \nameref{cha:project_and_media_attributes}.
+       \item \textbf{Render dialog:} this is under: \texttt{File $\rightarrow$ Render... (Shift + R)}. It contains all the rendering options that are documented in this chapter.
+\end{enumerate}
+
 Rendering takes a section of the timeline, \index{active region} performs all the editing,
 effects and compositing, and creates a new media file.  You can then
 delete all the source assets, play the rendered file, or bring it
@@ -13,7 +22,8 @@ in/out points are set, the affected region is rendered.  When no
 region is highlighted, everything after the insertion point is
 rendered.  By positioning the insertion point at the beginning of a
 track and unsetting all in/out points, the entire track is rendered.
-But you also have the choice to render \textit{one frame}.
+But you also have the choice to render \textit{one frame}. Reminder,
+\CGG{} does not do remuxing without rendering - see \nameref{sec:transcode}.
 
 \section{Single File Rendering}%
 \label{sec:single_file_rendering}
@@ -512,10 +522,12 @@ There are currently 6 specific variations within the ffmpeg (file format) / yout
 The first 3 below, plus any of the VP9 files under the file type of \textit{webm} are the recommended options to use because they are freely usable in any circumstance.
 
 \begin{center}
-       \begin{tabular}{l p{8cm}}
+       \begin{tabular}{lp{8cm}}
+               \hline
                sd.youtube & Standard Definition use with default audio/Opus stereo.youtube \\
                hd.youtube & High Definition “ “ \\
                uhd.youtube & Ultra High Definition “ “ \\
+               \hline
        \end{tabular}
 \end{center}
 
@@ -524,10 +536,12 @@ For more details and options on VP9, see: {\small\url{https://developers.google.
 Alternatives based on h264 and for non-commercial use are listed below.  For Dailymotion, these must be renamed to have a different extension of .mp4 instead of .youtube before uploading.
 
 \begin{center}
-       \begin{tabular}{l p{8cm}}
+       \begin{tabular}{lp{8cm}}
+               \hline
                sd\_h264.youtube & Standard Definition – must change to audio stereo\_with\_h264.youtube \\
                hd\_h264.youtube & High Definition -          “ “ \\
                uhd\_u264.youtube & Ultra High Definition - “ “ \\
+               \hline
        \end{tabular}
 \end{center}
 
@@ -565,11 +579,13 @@ Bitrate (bit rate)
 
 \textit{mode:}
 
-\begin{tabular}{p{6cm} p{10cm}}
+\begin{tabular}{p{6cm}p{10cm}}
+       \hline
        Constant Quantizer (Q) & Allows you to specify a fixed quantizer value; bitrate will vary \\
        Constrained Quality (CQ) & Allows you to set a maximum quality level. Quality may vary within bitrate parameters\\
        Variable Bitrate (VBR) & Balances quality and bitrate over time within constraints on bitrate\\
        Constant Bitrate (CBR) & Attempts to keep the bitrate fairly constant while quality varies\\
+       \hline
 \end{tabular}
 
 CQ mode is recommended for file-based video (as opposed to streaming). The following FFMpeg command-line parameters are used for CQ mode:
@@ -577,11 +593,13 @@ CQ mode is recommended for file-based video (as opposed to streaming). The follo
 \textit{FFMpeg}:
 
 \begin{center}
-       \begin{tabular}{{p{4cm} p{10cm}}}
+       \begin{tabular}{p{4cm}p{10cm}}
+               \hline
                -b:v <arg> & Sets target bitrate (e.g. 500k)\\
                -minrate <arg> & Sets minimum bitrate.\\
                -maxrate <arg> & Sets maximum bitrate.\\
                -crf <arg> & sets maximum quality level. Valid values are 0-63, lower numbers are higher quality.\\
+               \hline
        \end{tabular}
 \end{center}
 
@@ -999,7 +1017,9 @@ the \texttt{Preferences} window. It has one interactive function
 sets the point where background rendering starts up to the position
 of the insertion point. If any video exists, a red bar appears in
 the time ruler showing what has been background rendered
-(figure~\ref{fig:back-ren02}).
+(figure~\ref{fig:back-ren02}).  Because this creates a very large number 
+of files, a Shell Command script is available to delete them if in the
+default location.
 
 \begin{figure}[htpb] \centering
   \includegraphics[width=1.0\linewidth]{back-ren02.png}
@@ -1038,7 +1058,10 @@ rates (figure~\ref{fig:back-ren}).
   created, ls commands will not work in the background rendering
   directory. The browse button for this option normally will not work
   either, but the configuration button for this option works. The
-  default value will be /tmp/brender .
+  default value will be /tmp/brender .  Because using background
+  rendering creates a voluminous number of brender numbered files,
+  a Shell Command script is available to delete them if they are
+  in the default /tmp/brender format.
 \item[File format] The file format for background rendering has to
   be a sequence of images. The format of the image sequences
   determines the quality and speed of playback. JPEG generally works
@@ -1095,20 +1118,23 @@ Let's take the example of a network with 2 PCs: the master and the client. On th
   \begin{itemize}
   \item check the \textit{Use render farm} box;
   \item in the \textit{Hostname} box, keyin your hostname or ip
-    address such as 192.168.1.12 or \textit{localhost};
+    address such as 192.168.1.12 or \textit{localhost} when using a single computer with a multicore CPU;
   \item enter in a port number such as 401--405 (only a root user
     can use privileged ports) or $10650...$ for non-root and click on \textit{Add Nodes}. To find a range of free ports to use you can look at the file \texttt{/etc/services};
   \item you will see something like the following in the Nodes
     listbox to the right:\newline
-    \begin{tabular}{lllc} On & Hostname & Port & Framerate
-      \\\midrule
-      X & 192.168.1.12 & 10650 & 0.0 \\
-      X & 192.168.1.12 & 10651 & 0.0 \\
-      X & 192.168.1.12 & 10652 & 0.0 \\
-      X & 192.168.1.12 & 10653 & 0.0 \\
-      X & 192.168.1.12 & 10654 & 0.0 \\
-      X & localhost & 10655 & 0.0 \\
-      X & localhost & 10656 & 0.0 \\
+    \begin{tabular}{lllc}
+       \hline
+       On & Hostname & Port & Framerate\\
+        \hline
+        X & 192.168.1.12 & 10650 & 0.0 \\
+        X & 192.168.1.12 & 10651 & 0.0 \\
+        X & 192.168.1.12 & 10652 & 0.0 \\
+        X & 192.168.1.12 & 10653 & 0.0 \\
+        X & 192.168.1.12 & 10654 & 0.0 \\
+        X & localhost & 10655 & 0.0 \\
+        X & localhost & 10656 & 0.0 \\
+        \hline
     \end{tabular}
   \item set the Total number of jobs to create. This number only pertains to client nodes, so we do not need to consider the master node;
   \item click OK on the bottom of the Preferences window.
@@ -1116,7 +1142,8 @@ Let's take the example of a network with 2 PCs: the master and the client. On th
 \item For external network nodes, now we must join the nodes created to instances of \CGG{}. On the client computers ($192.168.1.12$), on the terminal, start 5 background  \CGG{} tasks via:
 \begin{lstlisting}[style=sh]
 cd {path_to_cinelerra}
-cin -d 10650 cin -d 10651
+cin -d 10650 
+cin -d 10651
 ...
 cin -d 10654
 \end{lstlisting}
@@ -1130,7 +1157,11 @@ cin -d 10656
 Similar to the previous point, the cursor positions itself in a new line ready to enter the next command, without exiting the task.
 \item When your video is ready, setup a render job via \texttt{File
     $\rightarrow$ Render} or \texttt{File $\rightarrow$ Batch Render}
-  and check OK.
+  and check OK. You should check "Project" for the "Render range", but if
+you check "Selection" or "In/Out points" instead, although rendering will
+always start at the beginning of the timeline, it will end at the Out Point
+or the end of the Selection thereby saving some time.  In this case, the
+first render file created will usually be empty.
 \item The results will be in the shared file \texttt{path/filename}
   that you selected in the render menu with the additional numbered
   job section on the end as $001, 002, 003, \dots 099$ (example,
@@ -1240,6 +1271,21 @@ render farm session to restart with a good balance.
 {path_to_cinelerra}/cin -h  # displays some of the options.
 \end{lstlisting}
 
+\subsection{Multi-core CPU Setup (Localhost)}%
+\label{sub:multi_core_render_farm_setup}
+\index{render farm!multi core CPU}
+
+If you are lucky enough to have a computer with a large cpu core
+count, setting up a render farm can really take advantage of using
+all of the cores at 100\%. This is much faster than the default automatic
+threading capability. Since you don’t need to communicate with other
+computers, you will not have to be concerned about TCP communication
+or shared disks/files; only localhost nodes. On the terminal you will need to open many instances of \CGG{} by connecting them to the jobs created. The number of such jobs can be the total number of CPU threads (-1) or not. When you are going to be doing other work
+simultaneously while rendering a large job, you will want to leave
+some of the cpus available for that.  Be sure to set \textit{Project SMP cpus} in the \texttt{Settings $\rightarrow$ Preferences, Performance} tab to your CPU
+count.  Follow the steps outlined in ~\ref{sub:basic_steps_start_render_farm}
+but skip the step "For external network nodes".
+
 \subsection{Detailed Setup Description}%
 \label{sub:detailed_setup_description}
 \index{render farm!setup}
@@ -1266,7 +1312,7 @@ line before using.
   the location of your project on the master computer can be done with
   NFS as described next.  Alternatively, you can look up on the
   internet how to use Samba to share a directory.
-\item[Create a shared filesystem and mount using NFS] All nodes in
+\item[Create a shared filesystem and mount using NFS] (only for Network) All nodes in
   the render farm should use the same filesystem with the same paths
   to the project files on all of the master and client nodes.  This is
   easiest to do by setting up an NFS shared disk system.
@@ -1495,20 +1541,6 @@ want to bother setting up NFS for a shared disk.
   node or use RenderMux shell script.
 \end{enumerate}
 
-\subsection{Multi-core Computers Render Farm Setup}%
-\label{sub:multi_core_render_farm_setup}
-\index{render farm!multi core CPU}
-
-If you are lucky enough to have a computer with a large cpu core
-count, setting up a render farm can really take advantage of using
-all of the cores at 100\%. This is much faster than the default automatic
-threading capability. Since you don’t need to communicate with other
-computers, you will not have to be concerned about TCP communication
-or shared disks/files; only localhost nodes. On the terminal we will open many instances of \CGG{} by connecting them to the jobs created. The number of such jobs can be the total number of CPU threads (-1) or not. When you are going to be doing other work
-simultaneously while rendering a large job, you will want to leave
-some of the cpus available for that.  Be sure to set \textit{Project SMP
-cpus} in the \texttt{Settings $\rightarrow$ Preferences, Performance} tab to your CPU
-count.
 
 \subsection{Troubleshooting Tips and Warnings}%
 \label{sub:troubleshhoting_tips_warnings}