Andrea/Phyllis plugins, shortcuts, and gang fixes
[goodguy/cin-manual-latex.git] / parts / Plugins.tex
index 671e5f5130266fcc35384c77cea6c308ef783cdc..29fa2d120855c022e44263207cc8d4dd1925cf5c 100644 (file)
@@ -294,16 +294,16 @@ Restart cin by changing \texttt{Settings$\rightarrow$ Preferences$\rightarrow$ A
 
 The \textit{Visibility} tool in the Resources window (figure~\ref{fig:visibility01}) gives you the ability to turn off or on any of several sets of plugins. If you left-click the Visibility box, you will see the various categories of plugins, such as \textit{ladspa}, \textit{ffmpeg}, \textit{audio}, \textit{lv2}, and \textit{video} (figure~\ref{fig:visibility02}).
 
-Highlight the set you want to turn on and a check mark appears to show it is active. Highlight again to toggle it off. See the next screenshot which illustrates that all of the plugins are turned off (not visible) except for audio. There is also the ability to add your own personal directory of plugins which will show up here. All you have to do to have these plugins become visible is to create a directory, with some name that is meaningful to you, and put your .png files in your: \\
-\texttt{cinelerra\_path bin/plugins/<your\_directory\_name>}.
-
 \begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.6\linewidth]{visibility02.png}
-    \caption{Screenshot showing the Visibility categories of plugins with all toggled on and audio highlighted.}
-    \label{fig:visibility02}
+       \centering
+       \includegraphics[width=0.6\linewidth]{visibility02.png}
+       \caption{Screenshot showing the Visibility categories of plugins with all toggled on and audio highlighted.}
+       \label{fig:visibility02}
 \end{figure}
 
+Highlight the set you want to turn on and a check mark appears to show it is active. Highlight again to toggle it off. See the next screenshot which illustrates that all of the plugins are turned off (not visible) except for audio. There is also the ability to add your own personal directory of plugins which will show up here. All you have to do to have these plugins become visible is to create a directory, with some name that is meaningful to you, and put your .png files in your: \\
+\texttt{cinelerra\_path bin/plugins/<your\_directory\_name>}.
+
 \subsection{Expanders for Plugin Subtrees in the Resources Window}%
 \label{sub:expanders_plugin_subtrees}
 
@@ -313,11 +313,18 @@ If there are recommendations for other relevant categories, they can be added. T
 
 The \texttt{expanders.txt} file has very specific requirements. The most specific is that there are no blanks -- you must use tabs only. A \# (pound sign) can be used in column 1 to indicate a comment. Here is a short example:
 
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.8\linewidth]{expander.png}
+       \caption{$\triangledown$,$\triangleright$ = expander; "-" = options}
+       \label{fig:expander}
+\end{figure}
+
 \begin{lstlisting}[style=sh]
 Video Effects
     - Color_Correction
         Blue Banana
-#\qquad \qquad Color 3 Way
+                         Color 3 Way
         Color Balance
 Audio Effects
     - Calf
@@ -327,13 +334,6 @@ Audio Effects
         L2_Calf Fluidsynth
 \end{lstlisting}
 
-\begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.8\linewidth]{expander.png}
-    \caption{$\triangledown$,$\triangleright$ = expander; "-" = options}
-    \label{fig:expander}
-\end{figure}
-
 \subsection{Speed-up of Ffmpeg plugin usage with OPTS files}%
 \label{sub:speedup_ffmpeg_plugin_opts}
 
@@ -1698,6 +1698,80 @@ Enable the \textit{Automatic} toggle to have the histogram calculate an automati
 \textit{Split output} is a checkbox that enables a diagonal split showing in the compositor.
 \textit{Reset} returns the four curves to their initial state (neutral) as well as the Value/RGB histogram buttons.
 
+The histogram plugin ordinarily applies a value for a single frame.  A
+new feature modifies histogram to show values for a selection of frames.
+You use several frames in a video that you want to use the \textit{average}
+color to determine the color you want the rest of the video to be.  When
+there is a large light or color variation within a range of a few frames,
+you spend a lot of time correcting each frame when it would be better to
+just get an average value to use.  If you want, then you can make a LUT for
+that set of frames instead of each frame.
+
+It works by selecting the area on the timeline for
+which you would like to see the Histogram averaged and then click on the
+\textit{Frames} button in the Histogram plugin.
+The parameters are:
+\textit{Linear to Log} slider: frequency in Linear range to Log range; default is 50\%, but if you want it to be the same as the Videoscope or Histogram Bezier, set the slider all the way to Log.  The variation is by 10\% steps.  Linear generally represents what the eye sees in the real world.  Log is an exponential look where the small numbers are represented more - that is, the leading digit.
+\textit{Frames} button: if a Selection is set on the timeline, the number of frames
+will be calculated and shown in the box next to it.
+\textit{Frame Count box}: type in the number of frames you want to be looked at
+starting at the insert marker or use the up/down counter.
+\textit{Clear Frames} icon: reset the frame count to the default value of 0.
+
+A side note: by using a number of frames, you can get a \textit{dissolve-like
+transition effect}.
+
+\paragraph{Theory:} 
+
+A histogram is a bunch of \textit{bins} (accumulators) that count the number of times a particular pixel channel intensity occurs in an image. Dim are on the left, bright on the right.
+
+The number of bins used depends on the color model bit depth:
+
+\begin{description}
+       \item[Histogram:] 256 for rgb8 and 65536 for all others.
+       \item[Bezier:] 256 for rgb8/yuv8 and 65536 for all others.
+       \item[Scopes:] always uses 65536
+\end{description}
+
+All of the bins are scanned when the graph is plotted.  What is shown
+depends on which plugin is used:
+
+\begin{description}
+       \item[Histogram:] was max of the bins in the pixel range, now is the sum
+       \item[Bezier:] is the max of the bins in the pixel range
+       \item[Scopes:] is the max of the bins in the pixel range
+\end{description}
+
+When the color space and the bin size are the same, all of the values
+increment the indexed bins.  When the color is the result of yuv $\rightarrow$ rgb conversion, the results \textit{spread} if there are more bins than colors.  This is the same effect you see when you turn on \textit{smoothing} in the vectorscope histogram.
+
+The \textit{total} pixels for each value is approximately the same, but the \textit{max} value depends on the color quantization.  More colors increment more bins.  Fewer colors increment fewer bins.  In both cases, the image size has the same
+number of pixels.  The fewer color case increments the used bins, and skips the
+unused bins.  This sums all of the pixels into fewer bins, and the bins have
+higher values. That is the \textit{rgb} vs \textit{yuv} case, fewer vs more bins are used.
+
+To report something more consistent, has been changed the reported value to
+the \textit{sum} of the accumulated counts for the bins reporting a pixel bar on the
+graph. The effect of this is to do this:
+
+\begin{center}
+       \begin{tabular}{ l l c r r }
+               \hline
+               1 &  & & & \\
+               1 &  & & 1 & \\
+               000100 & 3 pixels & vs & 001000& 3 pixels \\
+               \hline
+       \end{tabular}
+\end{center}
+
+On the left, the course color model piles all 3 pixels into one bin.  max
+value 3
+
+On the right, the fine color model puts the counts into 2 bins, max 2, sum 3
+
+So, by reporting the sum the shape of the results are more similar.
+
+
 \subsection{Histogram Bezier / Curves}%
 \label{sub:histogram_bezier_curves}
 
@@ -1740,20 +1814,19 @@ the beginning, to fix their values and prevent clipping.
 
 Curves are generally adjusted by introducing several control points, some to be kept fixed (as anchors) to prevent curve modification beyond them, and others to be dragged to make the desired correction. The power of the curves lies in being able to circumscribe a small interval at will and intervene only on this without involving the remaining parts of the frame. The precision with which you can work is such that you can almost arrive at a secondary color correction.
 
-\begin{figure}[htpb]
-    \centering
-    \includegraphics[width=0.8\linewidth]{ex-bezier.png}
-    \caption{Gain Up/Down; clamp; S-Shaped curve and Luma Key}
-    \label{fig:ex-bezier}
-\end{figure}
-
-
 The most used type of modification is to create a \textit{S curve}. There can be a lot of shapes that use the S curve; the simplest is to create a control point in the shadows, one in the midtones (anchors) and one in the highlights. Moving the highlight point upwards and the shadow point downwards increases the contrast, making the image sharper and improving the color rendering. With the type of \textit{linear} curve you can make hard adjustments, similar to the result of the use of \textit{Color 3 Way}, even if this acts on the color wheel (Hue) while the curves act on individual RGB channels.
 
 The \textit{Polynomial} and \textit{Bézier} types introduce \textit{control handles} that allow for more sophisticated and smoother adjustments. The quality of the result is much better, but they require more experience for their optimal use. Extending the handles away from the control point increases the \textit{radius} of the curve at that point. By varying the angle of the handles we change the \textit{tangent} and thus the curvature of the curve below. The difference between Polynomial and Bézier lies in the underlying mathematics, but for practical purposes the use is similar.
 
 Some examples of the use of curves to demonstrate the variety of possible interventions (figure~\ref{fig:ex-bezier}):
 
+\begin{figure}[htpb]
+       \centering
+       \includegraphics[width=0.8\linewidth]{ex-bezier.png}
+       \caption{Gain Up/Down; clamp; S-Shaped curve and Luma Key}
+       \label{fig:ex-bezier}
+\end{figure}
+
 \begin{itemize}
     \item Scale the image values by increasing the white point or decreasing the white point (gain up and gain down).
         You can decide the scaling value with the formula: $(Input \div Output) = Scale Factor$
@@ -1884,7 +1957,8 @@ Every time a keyframe is set in a loop effect, the keyframe becomes the beginnin
 \subsection{Motion51}%
 \label{sub:motion51}
 
-This plugin compensates for unwanted motion and stabilizes the picture. The \textit{Motion51} Plugin simplifies motion stabilization so that without a lot of tweaking you can easily achieve reasonable results, either by using the defaults or varying a single parameter. Since the motion in every clip is specific, there are some additional parameters useful to adjust the settings accordingly. Alternatively, the \textit{MotionCV} and \textit{MotionHV} plugins can still be used as the originals, if more control over specific parameters is needed. The Motion51 plugin uses different methods for tracking than the other motion plugins. Motion Stabilization is very useful if you have jittery video, for example when taken from a car window, or while walking.
+This plugin compensates for unwanted motion and stabilizes the picture. The \textit{Motion51} Plugin simplifies motion stabilization so that without a lot of tweaking you can easily achieve reasonable results, either by using the defaults or varying a single parameter. Since the motion in every clip is specific, there are some additional parameters useful to adjust the settings accordingly. 
+The Motion51 plugin uses different methods for tracking than the other motion plugins. Motion Stabilization is very useful if you have jittery video, for example when taken from a car window, or while walking.
 
 The better results require more samples. Setting the \textit{sample set size} is probably the most important setup change. Also, when computing motion compensation, the entire history of the image motion is important, and so it is desirable to enable the playback setting \textit{play every frame} in order to get good results. When every frame has to be processed, it can be time-consuming. Reasonable results are possible with small sample sets. After setup, the sample size can be increased to produce a high quality rendered result.
 
@@ -1934,7 +2008,14 @@ The \textit{motion tracker} is almost a complete application in itself. The moti
 
 Motion tracker works by using one region of the frame as the region to track (Match Box). It compares this region between $2$ frames to calculate the motion. This region can be defined anywhere on the screen. Once the motion between $2$ frames has been calculated, a number of things can be done with that \textit{motion vector}. It can be scaled by a user value and clamped to a maximum range. It can be thrown away or accumulated with all the motion vectors leading up to the current position.
 
-To save time the motion result can be saved in a file for later reuse, recalled from a previous calculation, or discarded. The motion tracker has a notion of $2$ tracks, the \textit{master} layer and the \textit{target} layer. The \textit{master} layer is where the comparison between $2$ frames takes place. The \textit{target} layer is where motion is applied either to track or compensate for the motion in the \textit{master} layer.
+To save time the motion result can be saved in a file for later reuse, recalled from a previous calculation, or discarded. The motion tracker has a notion of $2$ tracks, the \textit{master} layer and the \textit{target} layer. The \textit{master} layer is where the comparison between $2$ frames takes place. The \textit{target} layer is where motion is applied either to track or compensate for the motion in the \textit{master} layer (figure~\ref{fig:motion}).
+
+\begin{figure}[ht]
+       \centering
+       \includegraphics[width=0.9\linewidth]{motion.png}
+       \caption{Motion plugin GUI}
+       \label{fig:motion}
+\end{figure}
 
 Motion tracking parameters:
 
@@ -1948,13 +2029,7 @@ Motion tracking parameters:
     \item[Block X, Y] These coordinates determine the center of the translation block based on percentages of the width and height of the image. The center of the block should be part of the image which is visible at all times.
     \item[Maximum absolute offset] The amount of motion detected by the motion tracker is unlimited if this is $100$. If it is under $100$ the amount of motion is limited by that percentage of the image size.
     \item[Motion settling speed] The motion detected between every frame can be accumulated to form an absolute motion vector. Settling speed determines how fast the accumulated translation fades away, and the image resettles to its actual appearance. If the settling speed is 0\% the total absolute vector is added to the next frame. So every frame that is processed accumulates the whole motion of the past. If the settling speed is 100\% the absolute vector is cancelled completely, adding no past translation to the next frame. If the settling speed is intermediate between 0\% and 100\% the absolute vector is downscaled by (100 $-$ settling amount) before being added to the next frame.
-    \item[Track rotation] Enables rotation operations. The motion tracker tracks rotation in the \textit{master} layer and adjusts rotation in the \textit{target} layer.
-    \item[Rotation block size] For rotation operations a single block is compared to
-    equally sized blocks, each rotated by a different amount.  This is the size
-    of the rotation block.  In this implementation of the \textit{Motion} plugin the same
-    block is used to track both translation and rotation, and this parameter is
-    not used.  However, in some other implementations, like \hyperref[sub:motioncv]{MotionCV}, \textit{Rotation
-    block size} is specified explicitly via this extra parameter.
+    \item[Track rotation] Enables rotation operations. The motion tracker tracks rotation in the \textit{master} layer and adjusts rotation in the \textit{target} layer.    
     \item[Rotation search radius] This is the maximum angle of rotation from the starting frame the rotation scanner can detect. The rotation scan is from this angle counterclockwise to this angle clockwise. Thus the \textit{Rotation search radius} is half the total range scanned.
     \item[Rotation search steps] Ideally every possible angle would be tested to get the rotation. To speed up the rotation search, the \textit{Rotation search radius} is divided into a finite number of angles and only those angles compared to the starting frame. Then the search radius is narrowed and an equal number of angles is compared in the smaller radius until the highest possible accuracy is achieved. Normally you need one search step for every degree scanned. Since the rotation scanner scans the \textit{Rotation search radius} in two directions, you need two steps for every degree in the search radius to search the complete range.
     \item[Rotation center] Usually this parameter is zero, and the rotation search
@@ -2265,7 +2340,7 @@ C - has only object2 visible
 \subsection{Motion 2 Point}%
 \label{sub:motion_2_point}
 
-Motion stabilization using 2 pass tracking. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
+Motion plugin using 2 \textit{Match box} for tracking. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
 
 \subsection{Motion Blur}%
 \label{sub:motion_blur}
@@ -2276,16 +2351,6 @@ Uses X/Y camera automation vectors to apply a linear blur trailing camera direct
     \item[Steps] number of blur steps to be used in the calculation. Increasing the number takes more CPU.
 \end{description}
 
-\subsection{MotionCV}%
-\label{sub:motioncv}
-
-Extended motion tracking/stabilization from the community version of \CGG{}. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
-
-\subsection{MotionHV}%
-\label{sub:motionhv}
-
-Updated motion tracking/stabilization of 2017 from the original author of \CGG{}. For theory and explanations refer to the \hyperref[sub:motion]{Motion} plugin.
-
 \subsection{Oil painting}%
 \label{sub:oil_painting}
 
@@ -2779,6 +2844,11 @@ Inside the time average effect is an accumulation buffer and a divisor. A number
     \item[Don’t buffer frames] in order to represent the accumulation of only the specified number of frames, the time average retains all the previous frames in memory and subtracts them out as it plays forward. It would run out of memory if it had to accumulate thousands of frames. By disabling subtraction the previous frames are not stored in memory and only the average function is affected by the frame count.
 \end{description}
 
+\subsection{TimeBlur}%
+\label{sub:timeblur}
+
+The TimeBlur plugin provides a way to blur a number of \textit{Frames}.
+
 \subsection{Timefront}%
 \label{sub:timefront}
 
@@ -2846,9 +2916,9 @@ If the video is displayed on a consumer TV, the outer border is going to be crop
 \label{ssub:some_recently_added_options}
 
 \begin{description}
-    \item[Drag] initial default checkbox is \textit{off} so that the Title plugin will work as it always has.
+    \item[Drag] initial default checkbox is \textit{off} so that the Title plugin will work as it always has. With Drag active, we can create a box that works as a region to the title; we can resize and translate it as we wish, and we can add a background image to it. See later how to use the background image.
     \begin{description}
-        \item[Anchors] When you turn on the Drag feature, nine different anchors/handles will appear on compositor window. The \textit{middle anchor} allows you to drag your title wherever you want in the compositor window ($X, Y$ coordinates). The other 8 handles, drawn as arrows in each corner and in the middle of each side, let you change the size of the drag area box so that your title is within that area if it fits and as it is directed.  If you need to clear the Drag enabled, you can easily do this with \textit{Allow keyframe spanning} whose use is described in \nameref{sec:allow_keyframes_spanning}.
+        \item[Anchors] When you turn on the Drag feature, nine different anchors/handles will appear on compositor window. The \textit{middle anchor} allows you to drag your title wherever you want in the compositor window ($X, Y$ coordinates). The other 8 handles, drawn as arrows in each corner and in the middle of each side, let you change the size of the drag area box so that your title is within that area if it fits and as it is directed.  If you need to clear the Drag enabled, you can easily do this with \textit{Allow keyframe spanning} whose use is described in \nameref{sec:allow_keyframes_spanning}. Another way to reset the box to default, i.e. the entire frame, is to set X and Y to 0 and W and H to the frame resolution (e.g. 1920x1080 for FullHD).
         \item[W/H] the values in these 2 boxes specify the size of the drag area box measured in pixels as shown in the compositor window. You can set these manually and if you can't see the location of your box or find your handles, set them to zero because $0$ sets it to the same as the width/height of the media.
         The Drag effect ignores all boundaries, including the \textit{Title Safe Region} of the Compositor so that if you drag your titles off the screen, it will look like they disappeared completely. Reset X and Y to reasonable values to have it reappear. The Title \textit{text}, \textit{background}, and \textit{pngs} are applied on a single layer so that they will drag together as an entity. All of the Title capabilities work in conjunction with dragging so if you want to justify the title, you can still use the \textit{Left/Center/Right/Top/Mid/Bottom} within the drag area. Be sure to turn off Drag when rendering or the box will show in the video; keep in mind that drag bars do not appear until there is some text in the text box and you can not actually drag until the Title window controls are available.
     \end{description}
@@ -2937,7 +3007,7 @@ Figure~\ref{fig:title03}.
 \paragraph{Special Characters (< > / \textbackslash \#)} Besides the previously described <, >, and / characters, there are two special characters: backslash “\textbackslash”, and the pound sign “\#”. The backslash character is used for two things. With the advent of the attribute name and value, your line may become quite long so you can use “\textbackslash” followed by the carriage return to continue on the next line as if it is just a single line. It also can be used to designate that the following character does not represent the beginning of an attribute. For example, if you want to use the opening angle character “<“ as a title character, precede it with the backslash character. The pound sign, “\#”, designates the whole line as a comment or if in the middle of the line, then the rest of the line is a comment (this includes the carriage return).
 
 \begin{description}
-    \item[Background] in this box you can keyin the name of a file of the type that \CGG{} accepts and use that file as a background for your Title characters. This will be seen in the compositor window on top of the video that is loaded in the main track canvas. Besides typing in the filename, you must also check the checkbox. This makes it easy to turn it \textit{On} and \textit{Off} to see what it looks like. Next to the background box is a \textit{Loop} checkbox. If the background file takes less time than the main track canvas video to run, you can turn on the loop checkbox so that it runs over and over again to match the time size of your video.
+    \item[Background] in this box you can keyin the name of a file of the type that \CGG{} accepts and use that file as a background for your Title characters (media video or image). This will be seen in the compositor window on top of the video that is loaded in the main track canvas. Besides typing in the filename, you must also check the checkbox. This makes it easy to turn it \textit{On} and \textit{Off} to see what it looks like. Next to the background box is a \textit{Loop} checkbox. If the background file takes less time than the main track canvas video to run, you can turn on the loop checkbox so that it runs over and over again to match the time size of your video. By default the background image will occupy the whole frame, but if we activate drag mode and create a box of the desired size, the image will occupy only the box leaving the rest of the frame visible.
     \item[Stroker] to add \textit{pen strokes} to the text letters, adjust the stroke width numerically. This looks particularly nice on certain fonts and with a negative adjustment of the \textit{Drop shadow}.
     \item[Unicode Insertion] if you want to enter a special character like the mathematical \textit{summation} symbol, you can use the unicode equivalent to do so. Press Ctrl-Shift-U followed by $2022$ and a carriage return is an example of the bullet. Refer to section \hyperref[sec:textbox_non_std_character_unicode]{17.5} for details.
     \item[Popup Helper] put your cursor where you want to add an attribute, then right mouse will bring up a list of the available attributes for you to choose, along with a submenu to choose from. The program will insert that attribute for you and all you have to add is a value when required! (see figure~\ref{fig:title02}).
@@ -3274,18 +3344,18 @@ Modify the 411 yuv to look like 420 color space instead. If the edit to which th
 \subsection{YUVShift}%
 \label{sub:yuvshift}
 
+\begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=0.8\linewidth]{yuvshift.png}
+       \caption{Before and after YUVShift adjusting}
+       \label{fig:yuvshift}
+\end{figure}
+
 This effect is used for YUV input video from older cameras using $3$ sensors. It is possible to have misalignment of the $3$ sets of numbers: \textit{Y}, which represents the luminance or brightness component, and for \textit{U} and \textit{V} representing the chrominance (color) components. If they were misaligned in the video, you can use \textit{YUVShift} to realign. To move a specific component up/down, modify the \textit{dy} value using the slider bar in the RGBShift window. To move a component left/right, modify the corresponding \textit{dx} value. With the Clear buttons we can bring the slider to default values without affecting the other parameters. If you are using an RGB color space, you will want to use the \textit{RGBShift} effect instead.
 
 Figure~\ref{fig:yuvshift} (top) shows the blue \textit{U} component aligned too far to the left. And the red \textit{V} component is misaligned too far to the right. Note the \textit{U\_dx} current slider bar set to $0$ as shown by the yellow box value in the YUVShift plugin window. All components are currently at zero.
 A corrected video image is shown in the bottom. Now the red and blue colors are correctly aligned. Note how \textit{U\_dx} is now at $+20$ and \textit{V\_dx} is now negative to realign the image.
 
-\begin{figure}[hbtp]
-    \centering
-    \includegraphics[width=0.8\linewidth]{yuvshift.png}
-    \caption{Before and after YUVShift adjusting}
-    \label{fig:yuvshift}
-\end{figure}
-
 \subsection{Zoom Blur}%
 \label{sub:zoom_blur}