+\begin{enumerate}
+ \item Start \CGG{}; usually you can do this by clicking on \CGG{} icon or key in \texttt{{cin\_path}/bin/cin}.
+ \item In the Program window on the lower left side of your screen, left mouse click the \textit{File} pulldown.
+ \item You will see \textit{Load files} as the second choice so left mouse click this and find your video file to
+ load, highlight it, and check the green checkmark in the lower left hand corner to get it loaded.
+ \item Edit your video in the Program window using the basic commands of:
+ \begin{itemize}
+ \item play and then stop using the space bar
+ \item move the mouse and then left click to move the insertion (location) pointer
+ \item cut a section out by holding down the left mouse and drag, then key in “x” to cut or “c” to copy
+ \item paste a copy or cut section by moving the insertion pointer, then key in “v”
+ \end{itemize}
+ \item Add a title by highlighting the \textit{Video Effects} in the right hand side Resources window; then
+ highlighting the \textit{Title} icon and dragging it to the Program window video track and dropping.
+ \item Click on the middle icon button (looks like a magnifying glass) on the brown colored Title bar to
+ bring up the Title window bottom text box and key in a title.
+ \item Use the \textit{File} pulldown to select \textit{Render} to create the desired video. In the \textit{Render} window just next to the empty box to the right of the \textit{ffmpeg} file format, click on the down arrow shown there
+ to see the choices and pick \textit{youtube}. Then move back up to key in the path and filename to render
+ to. It will pick all of the defaults automatically for you so then just click on the green checkmark to
+ have it start. There is a progress bar in the main window, very bottom of the right hand side.
+ \item Key in “q” in the main window to get out of \CGG{} and yes or no to save your edit session.
+\end{enumerate}
+
+Youtube will allow the upload of the resulting rendered file as named. However, Dailymotion requires that the file be named with an acceptable extension so you must rename the output file to have the extension of .webm instead of .youtube
+
+There are currently 6 specific variations within the ffmpeg (file format) / youtube (file type) for different video options. You see these when you click on the wrench to the right of the word Video and then the Compression down arrow in the Video Preset window. The first 3 are based on Webm/Vp9\protect\footnote{credit by Frederic Roenitz} and contain basic comments of usage and where to find more information.
+
+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}}
+ sd.youtube & Standard Definition use with default audio/Opus stereo.youtube \\
+ hd.youtube & High Definition “ “ \\
+ uhd.youtube & Ultra High Definition “ “ \\
+ \end{tabular}
+\end{center}
+
+For more details and options on VP9, see: {\small\url{https://developers.google.com/media/vp9}}
+
+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}}
+ sd\_h264.youtube & Standard Definition – must change to audio stereo\_with\_h264.youtube \\
+ hd\_h264.youtube & High Definition - “ “ \\
+ uhd\_u264.youtube & Ultra High Definition - “ “ \\
+ \end{tabular}
+\end{center}
+
+\subsection{Piping Video to a Command Line}%
+\label{sub:piping_video_command_line}
+\index{rendering!command line}
+
+You can pipe a video to any command line on the computer, such as
+ffmpeg. This can be especially useful with raw video files. Next
+is an example usage.
+
+\begin{enumerate}
+ \item on a terminal window create a named pipe file, for example:
+ \begin{lstlisting}[style=sh]
+ mknod /tmp/piper.yuv p
+ \end{lstlisting} load your video and do your editing
+ \item set up your Render (\texttt{Shift-R}), you can choose a raw
+ format such as \textit{yuv} or \textit{rgb}
+ \item for the filename \textit{Select a file to render to}, use the
+ named pipe as created in step 1 (\texttt{/tmp/piper.yuv})
+ \item for \textit{Insertion Strategy}, you will want to make sure to
+ select \textit{insert nothing}
+ \item click for OK on the green checkmark.(the \CGG{} gui will look
+ like it is hanging while waiting for a command line to use the
+ pipe.)
+ \item on the terminal window, keyin your command, for example:
+ \begin{lstlisting}[style=sh]
+ /mnt0/build5/cinelerra-5.1/thirdparty/ffmpeg-3.4.1/ffmpeg -f \
+ rawvideo -pixel_format yuv420p -video_size 1280x720 \
+ -framerate 30000/1001 -i /tmp/piper.yuv /tmp/pys.mov
+ \end{lstlisting}
+\end{enumerate}
+
+A slightly different option can be used instead that may be more
+familiar to some. In the render menu after choosing the File Format
+of \textit{ffmpeg}, use the pulldown to choose \textit{y4m} as the
+file type. This choice results in putting a header on the rendered
+output with some pertinent information that can be used for ffmpeg
+processing thus alleviating the requirement for
+\textit{pixel\_format}, \textit{video\_size}, and \textit{framerate}
+on the ffmpeg command line. In this case the format is
+\textit{yuv4mpegpipe} instead of \textit{rawvideo}. An example
+command line would look as follows (assuming the created pipe is
+called \texttt{piper.y4m}):
+\begin{lstlisting}[style=sh]
+ ffmpeg -f yuv4mpegpipe -i /tmp/piper.y4m -vcodec libx264 /tmp/test.mp4
+\end{lstlisting}
+
+\subsection{Faststart Option for MOV type files}%
+\label{sub:faststart_option_mov0}
+
+If you have mov video and want to be able to start playing without
+having to first load the entire video, \textit{-movflags=+faststart}
+is needed for ffmpeg to put the meta-data, known as the \textit{moov
+ atom}, at the beginning of the file. Otherwise, ffmpeg puts this
+atom at the end of the video file which means you have to wait to
+play until the whole video is loaded. Or worse yet, if the file
+becomes damaged in the middle and you can not get to the end, you
+won’t be able to play anything.
+
+Now you can have the \textit{moov atom} put on the front of the file
+(automatically via a second pass). To do this, when rendering using
+ffmpeg \& either the mp4 or qt format/container, click on the
+video/audio wrenches and choose \textit{faststart\_h264}. With the
+\textit{qt} format, settings will just be the default whereas the
+\textit{mp4} format uses the highest quality and lowest file size as
+possible, but you can easily modify these options in the associated
+Video Preset textbox.
+
+\section{Batch Rendering}%
+\label{sec:batch_rendering}
+\index{batch rendering}
+
+Batch Rendering automates the rendering of audio/video files in that
+you can establish a set of job parameters, save them, and use them
+repeatedly. It also allows for \CGG{} to be run by external
+programs, with no need for the user to manually interact with the
+user interface (figure~\ref{fig:batch01}).
+
+\begin{figure}[htpb] \centering
+ \includegraphics[width=1.0\linewidth]{batch01.png}
+ \caption{Example of the Batch Render menu}
+ \label{fig:batch01}
+\end{figure}
+
+If you want to render many projects \index{project} to media files without having to
+constantly set up the render dialog for each one, batch rendering is
+a more efficient method of rendering. To use this feature you need to
+understand certain concepts.
+
+\begin{enumerate}
+ \item You must define a list of Batches (\textit{Job} \index{job}) before starting the rendering. This is created using the \textit{New} button and displayed in \textit{Batches to Render} dialog.
+ \item Each batch consists of a source project already created in \CGG{}, e.g. \texttt{aaa.xml}, to which we assign the rendering parameters.
+ \begin{itemize}
+ \item to associate \texttt{aaa.xml} to the batch we use the \textit{EDL Path} input field.
+ \item we decide a name and path for the output file.
+ \item let's set the \textit{File Format} of the output file.
+ \item We configure the file with the Audio/Video \textit{wrench}.
+ \item we decide whether to create different files for each \textit{label} and whether to use a \textit{Render farm}.
+ \end{itemize}
+ \item Created the first batch, we will see it appear in the dialog \textit{Batches to Render}.
+ \item Using the \textit{New} button again we create a second batch for another source project (\texttt{bbb.xml}) and configure it at will.
+ \item We continue with the source projects \texttt{ccc.xml}, \texttt{ddd.xml}, etc. until we run out of projects that we want to render in batch.
+ \item Note that each batch has its own name, path and rendering parameters.
+ \item Now we have our \textit{Job}, a list of batches. We can still configure it or modify it if we want to change something. In addition we can delete a batch from the list or we can disable it in the \textit{Enabled} field so that it is not taken into account during rendering, but without deleting it.
+ \item Finally we start batch rendering with the \textit{Start} button.
+\end{enumerate}
+
+Let's see in detail how to set the Batch Rendering.
+
+The first thing to do when preparing to do batch rendering is to
+create one or more \CGG{} projects to be rendered and save them as a
+normal project, such as \texttt{aaa.xml}. The batch renderer
+requires a separate project file for every batch to be rendered.
+You can use the same \CGG{} project file if you are rendering to
+different output files, as in an example where you might be creating
+the same output video in different file formats.
+
+You do not have to render an entire projects. We can limit ourselves to an \textit{active region} \index{active region} that we can set through a selection in Cut and Paste mode, with labels or In/Out Points. Or the rendering will start from the Insert Point position until the end of the project. Remember: if we want to render the entire project (and not just one active region) it is important to bring the Insertion Point to the beginning of the timeline. This is the only way we are sure to include the whole project.
+
+With all the \CGG{} xml project files prepared with active regions,
+go to \texttt{File $\rightarrow$ Batch Render}. This brings up the
+batch render dialog. The interface for batch rendering is more
+complex than for single file rendering. A list of batches must be
+defined before starting a batch rendering operation. The table of
+batches appears on the bottom of the batch render dialog and is
+called \textit{Batches to render}. Above this are the configuration
+parameters for a single batch; a batch is simply a pairing of a
+project file with a choice of output file and render settings.
+
+Set the \textit{Output path}, \textit{File format}, \textit{Audio},
+\textit{Video}, and \textit{Create new file at each label}
+parameters as if you were rendering a single file. These parameters
+apply to only one batch. In addition to the standard rendering
+parameters, you must select the \textit{EDL Path} to be the project
+file (such as \texttt{aaa.xml}) that will be used in the batch
+job. In this case, \textit{EDL Path} is not related in anyway with
+the EDL files as created by \texttt{File/Export EDL}. In batch
+render mode the program will not overwrite an existing output file
+and will simply fail, so make sure that no files with the same name
+as the output files exist before starting.
+
+If the batches to render list is empty or nothing is highlighted,
+click \textit{New} to create a new batch. The new batch will contain
+all the parameters you just set. Repeatedly press the \textit{New}
+button to create more batches with the same parameters. When you
+highlight any batch, you can edit the configuration on the top of
+the batch render window. The highlighted batch is always
+synchronized to the information displayed. You can easily change
+the order in which the batch jobs are rendered, by clicking and
+dragging a batch to a different position. Hit \textit{Delete} to
+permanently remove a highlighted batch. In the list box is a column
+which enables or disables the batch with an \texttt{X} meaning the
+batch job is enabled and will be run. This way batches can be
+skipped without being deleted. Click on the \textit{Enabled} column
+in the list box to enable or disable a batch.
+
+The description of each of the columns in the batch list are as
+follows:
+
+\begin{description}
+\item[Enabled:] an X in this column means the batch job will be run.
+\item[Labeled:] an \texttt{X} in this column goes hand in hand with
+ create new file at each label.
+\item[Farmed:] to use or not the render farm.
+\item[Output:] path and filename for the generated output.
+\item[EDL:] the path and filename of the source EDL for the batch
+ job.
+\item[Elapsed:] the amount of time taken to render the batch if
+ finished. If field is empty, it did not run.
+\end{description} To start rendering from the first enabled batch,
+hit \textit{Start}. Once rendering, the main window shows the
+progress of the batch. After each batch finishes, the elapsed column
+in the batch list is updated and the next batch is rendered until
+all the enabled batches are finished. The currently rendering batch
+is always highlighted red. To stop rendering before the batches are
+finished without closing the batch render dialog, hit \textit{Stop}.
+To stop rendering before the batches are finished and close the
+batch render dialog, hit \textit{Close}. Or you can exit the batch
+render dialog whether or not anything is being rendered, by hitting
+\textit{Close}.
+
+You can automate \CGG{} batch renders from other programs. In the
+batch render dialog, once you have created your list of batch render
+jobs, you can click the button \textit{Save Jobs} and choose a file
+to save your batch render list to. Once you have created this file,
+you can start up a batch render without needing to interact with the
+\CGG{} user interface. From a shell prompt, from a script, or other
+program, execute:
+
+\begin{lstlisting}[style=sh]
+{path_to_cinelerra}/cin -r batchjob.xml
+\end{lstlisting} substituting your actual filename for
+\texttt{batchjob.xml}. When invoked with these parameters, \CGG{}
+will start up and perform the rendering jobs in that list, without
+creating its usual windows.
+
+\subsection{Command Line Rendering}%
+\label{sub:command_line_rendering}
+\index{rendering!command line}
+
+The command line rendering method consists of a way to load the
+current set of batch rendering jobs and process them without a
+GUI\@. This is useful if you want to do rendering on the other side
+of a low bandwidth network and you have access to a high powered
+computer located elsewhere. Setting up all the parameters for this
+operation is somewhat difficult. That is why the command line aborts
+if any output files already exist.
+
+To perform rendering from the command line, first run \CGG{} in
+graphical mode. Go to \texttt{File $\rightarrow$ Batch
+ Render}. Create the batches you intend to render in the batch window
+and close the window. This saves the batches in a file. Set up the
+desired render farm attributes in \texttt{Settings $\rightarrow$
+ Preferences} and quit out of \CGG{} if you want to use the Render
+Farm capability. These settings are used the next time command line
+rendering is used to process the current set of batch jobs without a
+GUI\@.