\chapter{Editing: real-world usage cases}%
\label{cha:editing_real_world_usage}

This appendix includes descriptions of various real life workflows used by \CGG{} users. There may be links to some video explanations in various languages.
You can only follow these links from the online pdf version.

\section{Workflow with OpenEDL and Nested Clips}%
\label{sec:workflow_openedl_nested_clips}

This is a real world usage case\protect\footnote{credit fary54} that provides an excellent example of how OpenEDL has been a
revolution for \CGG{}. Advantages include: editing speed, clarity, ease of finding a specific item,
and movement of a subject block via \textit{Nest to media}.
The main concept of editing using OpenEDL in this real world case is to
reduce a large quantity of videos and shots to a few big clips by using
an OpenEDL session for each clip. Using the OpenEDL timeline is similar to
 using the normal timeline: you can add effects, cut and drag, add or delete
tracks, etc.

For more information on OpenEDL and Nested clips see sections \ref{sec:openedl} and \ref{sub:nested_clips}.

Scenario setup consists of making one hour video using 3 different cameras:

\begin{itemize}
	\item \textit{Footage 1:} A person uses camera 1 to shoot a general view of the subject.
	\begin{enumerate}
		\item[a)] Barcelona (e.g. a jazz group concert)
		\item[b)] Lisbon (e.g. Spanish concert)
	\end{enumerate}
	\item \textit{Footage 2:} Another person uses camera 2 to film a detail of a specific subject.
	\begin{enumerate}
		\item[a)] Barcelona (e.g. saxophonist or trumpet player)
		\item[b)] Lisbon (e.g. guitarist or double bassist)
	\end{enumerate}
	\item \textit{Footage 3:} Contains images of the journey between the subjects (action cam on the windshield of a moving car, on the helmet of a biker, on the handlebars of a bicycle, or on a boat).
\end{itemize}

\textit{Note:} Camera 1 and 2 are both filming the same subject so the number of hours for the footage from these two cameras easily reaches 20 hours, but the final movie can only be one hour maximum.  For this case, the final movie consists of all the subjects separated by camera 3 footage.

\textit{Workflow:} OpenEDL is used throughout the editing process with the timeline reserved as the workspace. Basically, every time you have to work on a clip (consisting of one or more tracks), you use OpenEDL instead of the classic method of bringing each clip to the timeline, before doing the necessary Drag and Drop or Cut and Paste operations between different tracks. When finished with each
OpenEDL clip session, save it outside of the OpenEDL layer at the top level of the main timeline.

See \href{https://youtu.be/0li5DdeQ6_o}{Video 1} (using French locale).


\subsubsection*{Pre-sorting of the footage}
\label{ssub:pre_sorting_footage}

	\begin{itemize}
		\item Load all the shots from camera 1 and create a single clip; do the same with cameras 2 and 3.
		\item Watch each clip and sort the images to keep (via OpenEDL); delete the blurred footage and the images you do not want to keep.
	\end{itemize}

\begin{figure}[htpb]
	\centering
	\includegraphics[width=0.8\linewidth]{openedl-01.png}
	\caption{three clips modified with OpenEDL}
	\label{fig:openedl-01}
\end{figure}

\textit{Camera 1} contains shots of Barcelona and Lisbon concert made by Camera 1.

\textit{Camera 2} contains shots of Barcelona and Lisbon concert made by Camera 2.

\textit{Camera 3} contains the images of the journey between the first subject and the second (e.g from Barcelona to Lisbon).

\subsubsection*{Extraction of the subjects}
\label{ssub:extraction_subjects}

Next extract each common subject from the camera 1 \& 2 footage and create a clip, for example - a place, a city, or a subject. In this case scenario, it is a concert in a specific city.
You end up with as many clips as there are subjects (e.g. Barcelona \& Lisbon).
 See figure ~\ref{fig:openedl-02}.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=0.8\linewidth]{openedl-02.png}
	\caption{a new clip for each subject: Barcelona and Lisbon}
	\label{fig:openedl-02}
\end{figure}

Each subject selected contains 2 video tracks and 4 audio tracks. See figure ~\ref{fig:openedl-03} of a Barcelona clip.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=1.0\linewidth]{openedl-03.png}
	\caption{Barcelona clip: 2 video tracks and 4 audio tracks}
	\label{fig:openedl-03}
\end{figure}

\subsubsection*{Editing of the subjects}
\label{ssub:editing_subjects}

Then edit each subject via OpenEDL. From the 2 tracks 1 \& 4 (camera 1 \& 2) you create a a single track (+ 2 audio tracks) as seen in figure ~\ref{fig:openedl-04}.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=1.0\linewidth]{openedl-04.png}
	\caption{Barcelona clip: 2 video tracks to 1 video track}
	\label{fig:openedl-04}
\end{figure}

\subsubsection*{Add sound effects and video/audio effects}
\label{ssub:add_sound_video_effects}

Next add the sound effects (such as birds or a water fountain) and video / audio effects for each subject; again via OpenEDL.

\subsubsection*{Compaction}
\label{ssub:compaction}

Each subject is converted to a nested clip by using the \textit{Nest to media} option, making it a group.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=0.8\linewidth]{openedl-05.png}
	\caption{two new nested clips: Barcelona and Lisbon}
	\label{fig:openedl-05}
\end{figure}

The subject converted to a nested clip is automatically moved from the Clip folder to the Media folder. See figure ~\ref{fig:openedl-05}.

See \href{https://youtu.be/kQ7sGq0o44U}{Video 2} (using French locale).

\subsubsection*{Final assembly}
\label{ssub:final_assembly}

Import each subject (Nested clip) on the main timeline. Converting using Nest to Media makes it easy to move and position each subject. You can move one subject after or before another.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=1.0\linewidth]{openedl-06.png}
	\caption{Barcelona and Lisbon nested clips on timeline}
	\label{fig:openedl-06}
\end{figure}

Insert the retained shots coming from \textit{camera 3} between the different subjects.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=1.0\linewidth]{openedl-07.png}
	\caption{camera 3 footage between Barcelona and Lisbon nested clips}
	\label{fig:openedl-07}
\end{figure}

See \href{https://youtu.be/9Hz0a-1i3I8}{Video 3} (using French locale).

Add background music and comments.

\begin{figure}[htpb]
	\centering
	\includegraphics[width=1.0\linewidth]{openedl-08.png}
	\caption{completion of the work}
	\label{fig:openedl-08}
\end{figure}

\subsubsection*{More editing}
\label{ssub:more_editing}

At this stage, each subject can still be edited and undergo any modification via OpenEDL (again ... and always)

\subsubsection*{Render your movie}
\label{ssub:render_movie}

All that remains is mastering the video with a render.

Ordinarily it it is very difficult to set up such a project but using tools such as OpenEDL and Nested clips makes it quite easy. These tools, in many cases, are essential and become standards for the development of important projects using \CGG{}.

\paragraph{Note}

Once converted to nest to media the clips disappear from the clips folder to end up in the media folder. You can always, if you wish to recover it in the clips folder do so via the \textit{EDL to clip} menu. In this case, the name of the clip can change but the reference of the clip can be found in the comment of the clip.

See \href{https://youtu.be/bfYaBqVbdCo}{Video 4} (using French locale).

\section{Workflow with multi-cam and external audio}%
\label{sec:workflow_multicam_external_audio}

More on the multi-cam can be found in section \nameref{sec:multicamera_mixer}

Let's take the case of a professional magician filmed in multicam while performing\protect\footnote{credit Armandux.}. Camera 1 records the magician's face; camera 2 the whole person and camera 3 the detail of the hands. There is also an external audio recorder to record the artist's voice in mono. So we will have three video tracks with their respective embedded audio tracks, plus an external audio track of good quality.

You can find the files to test the workflow that is described next at the following address:
%begin{latexonly}
\small{\url{https://cinelerra-gg.org/download/testing/cinelerra-forum.zip}}
%end{latexonly}
\begin{htmlonly}
\url{https://cinelerra-gg.org/download/testing/cinelerra-forum.zip}
  
\end{htmlonly}

[Media files are licensed under a \href{https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode}{CC 4.0 BY, NC, SA license}.]

Start \CGG{} to create an empty video track and two audio tracks (default). If you want you can create a new project (using the shortcut "n") with the desired settings or change the default one (\texttt{Settings $\rightarrow$ Format}).

\begin{enumerate}
	\item Load multimedia files ("o").
	\item \texttt{Settings $\rightarrow$ proxy settings}; mark \textit{use scale}, select scale 1/2, and check \textit{Auto proxy/scale loads}.
	\item Wait until the progress bar at bottom right of the main window finishes to create and load proxy clips in \texttt{Resources $\rightarrow$ proxy}.
	\item Move to the Resources and Multimedia sources window. Next select the sources, RMB click and \textit{open mixers}. This creates new tracks and loads it. Be sure that the Proxy clips are in use by checking that the word "proxy" is included on the Timeline title bar.
	\item \texttt{Audio $\rightarrow$ add track} (my master audio track is mono, because there are only voices and no music). Let us suppose this new track is audio 9.
	\item Drag your master audio track to the new audio track (audio 9).
	\item Open \texttt{Windows $\rightarrow$ mixers $\rightarrow$ Mixer Viewer}.
	\item Click in the new mixer to select it (you will see a white box drawn inside that window) and afterwards expand the master audio track (audio 9).
	\item Click into the expanded track (audio 9) and, while maintaining the new created mixer selected, click on the arrow on the left (\textit{Mixer}) that appears when expanding the track, and click on it to get it pointing upwards. That hooks the new mixer with the audio 9 track (in our example). Next lock this track.
	\item Select with the In/Out points tool ("[]") an audio fragment in audio 9 and afterwards click on "a" to select all the tracks.
	\item With all the tracks selected (only the three top ones that are empty are disarmed),\texttt{ Windows $\rightarrow$ mixers $\rightarrow$ align mixers}.
	\item Select as master track your main audio track (audio 9 in our example). It is important to note the position of this track because you want to move all the other clips to the right to get aligned with the main audio track (9). In short: the selected fragment should be more to the right than the rest of this same fragment on the other clips/tracks. Move this track to the right if you need to. The idea behind this is to allow the other tracks to move to the right in order to get them aligned.
	\item In the align mixer dialog select first \textit{adjust}. Wait for the program do its work. You can see the progress bar at the bottom right of the main window.
	\item Check the correctness of the alignment from column \textit{R}; the values of the various tracks must be close to 1. Then click on the \textit{apply} button. The tracks will move to the right and align.
	\item In the main timeline in the audio 9 track, click on the \textit{Play Track} button that is beside the \textit{Arm track} button to enable it (if it is not already). Then enable audio and you can hear the audio while editing.
	\item Position the windows mixers in a position you are comfortable with and next in the main window move the cursor to the beginning of the timeline. We can also resize the Mixers windows to your liking.
	\item Click on play (space bar) and stop when you want to insert the portion of the track you want in the main track. You do this by double clicking in the mixer.
	\item Go on starting, stopping and double clicking to insert new portions of the clips in the main track.
	\item When you finish, arm only the main video track and your main audio 9 track.
	\item Go to \texttt{tracks $\rightarrow$ delete tracks} and you will have only one video track and one audio track (in this example, the main audio track is mono).
\end{enumerate}

And that is it.

One more useful thing to keep in mind is that you can edit the new main track and adjust the beginning or ending of every clip (Trim) without disturbing the audio and the position of the other clips.
For example, if you are not happy with the cut between the three and the fourth clip.

So perhaps you want to have five more frames in clip three and five less in the fourth clip. Position the cursor arrow between the two clips and when the arrows shows, click the middle button of your mouse and drag in the direction you want to enlarge that particular clip and shorten the other one (trim mode: \textit{Slip}). If you also press the shift button, in the Compositor window you see a double view of the neighboring edits on which the trim acts allowing for greater precision and usability.

To render, do not forget to uncheck the P (proxy) button in the main program window.

\paragraph{Note:} If our files have Jam-syncing timecodes, we can speed up the workflow (steps 4 - 15) with the simple command : \texttt{Tracks $\rightarrow$ Align Timecodes}.

More info can be found in \nameref{sub:align_timecodes}.

\chapter{FAQ, Known Problems and Workarounds}%
\label{cha:faq_problems_workarounds}
\index{workarounds}

There are a few known problems that have not yet been fixed for which there are some workarounds presented here.

\paragraph{Workaround for the \textit{alpha channel not working as intended when using an EDL} inserted as a reference or when an EDL is nested.}
Using the Projector on the EDL within a Master Project follow these next steps.
\begin{itemize}
	\item Open your EDL with \textit{Open EDL} by using the MMB (Middle Mouse Button) on the Nested edit on its track.
	\item In this nested EDL, insert a new Video track below the last video track.
	\item Add the Alpha plugin to the new Video track for the entire length of the nested EDL.
	\item Change the value of the Alpha to 0.00. The Alpha Plugin may be disabled or left enabled.
	\item Close the EDL.
\end{itemize} This solves the alpha channel not working as expected and the Master Project now looks correct.

\paragraph{Workaround for using a transition, like Dissolve, between 2 edits with the plugin Motion51.}
In this case, the Motion51 plugin and the Dissolve transition are not seen during the transition phase
and is stopped at the cut point between 2 edits.
The left edit's plugin should be in effect until the end of that clip and should include the
dissolve.  Instead, there is a jump inside the dissolve, as if the plugin does not exist. There are
2 possible workarounds.  For example, extend the Motion51 plugin to cover both clips rather than
having a separate plugin for each clip.  Or another workaround is to use two tracks and have the 
plugin cover the cut point and use a Fade auto instead of the Dissolve transition.

\paragraph{The Fade auto in certain circumstances produces an unwanted black flash.}
When you insert an effect on an empty track the fade fades as if it were on a black background;
it interprets the alpha as black where there is transparency, which is what produces the fade.
So the problem in the case of text is that the letters appear as a black flash briefly in the first
few frames, then goes back to transparent, then the fade starts normally with the white color. 
To avoid the unwanted effect produced by the fade over black (because there is no content) leave
the fade in/out of the effect at 0 and use the fade line to perform the intended results to
avoid the problem with the alpha channel. The same problem occurs when using transparent PNG
images with fade video transitions and can be resolved in the same manner.
However this workaround can be quite tedious and complicated if you want to fade many snippets of text
and transparent PNGs on the same track, with always the same video transition filter set to the same 
duration. 

Just a side note here. Fade in/out in the Title plugin works fine if there is a clip/image above 
the plugin in the same track without an alpha channel but not if there is no clip/image.
And the Transition effect works fine when there is a transition between two clips/images without
an alpha channel.