Andrea addition of fary54 real world example + ffmpeg new plugins
[goodguy/cin-manual-latex.git] / parts / Plugins.tex
index 8d0304a345871d87b0b53298f88a7e5e42aeb79b..f2cdee0f066e44ed1a8a0ee90789718b00c7b9c8 100644 (file)
@@ -1792,7 +1792,7 @@ Uses a Bayer filter algorithm to interpolate (estimate) missing color informatio
 \subsubsection*{Theory}
 \label{ssub:theory}
 
-Each video has its own framerate. If we want to change it (for \textit{timelapse} or \textit{slowmotion}) the best thing is to shoot the scene with suitable framerate. But even in post production we can do something. The simplest method is to remove some frames to speed up the movie or add some to slow it down (from now on, for simplicity we will consider only the timelapse). Needless to say, the result is not smooth and the viewer will notice it immediately. A better method is to use the interpolation, mediating the pairs of frames that alternate. For example, if we have a sequence of frames $1, 2, 3, 4, 5, 6, 7, 8\dots$ we can make a timelapse mixing frames $1$ and $2$, $3$ and $4$, $5$ and $6$, $7$ and $8$ and so on. So we will have a new sequence of $4$ frames instead of the initial $8$: $\underline{12, 34, 56, 78}\dots$ We will get $50\%$ acceleration but it will always be of bad quality because of the too rough blending between the pairs of frames. Blending can be improved by weighing it differently by $50\% frame 1 + 50\% frame 2$, but the result is still unsatisfactory. Further improvements can be achieved by using $logarithmic$ or $exponential$ interpolation instead of $linear$ interpolation. But the most sophisticated methods that lead to better results are based on \textit{optical flow analysis}. These analyses the movement of circumscribed areas over a given period of time. With this method the intermediate frames do not derive from an approximate blending, but from the calculation of the \textit{vector} of the motion between two frames that determines the displacement (\textit{warping}) of the moving figure in the new intermediate frame. \textit{Interpolate Video} works this way.
+Each video has its own framerate. If we want to change it (for \textit{timelapse} or \textit{slow motion}) the best thing is to shoot the scene with suitable framerate. But even in post production we can do something. The simplest method is to remove some frames to speed up the movie or add some to slow it down (from now on, for simplicity we will consider only the timelapse). Needless to say, the result is not smooth and the viewer will notice it immediately. A better method is to use the interpolation, mediating the pairs of frames that alternate. For example, if we have a sequence of frames $1, 2, 3, 4, 5, 6, 7, 8\dots$ we can make a timelapse mixing frames $1$ and $2$, $3$ and $4$, $5$ and $6$, $7$ and $8$ and so on. So we will have a new sequence of $4$ frames instead of the initial $8$: $\underline{12, 34, 56, 78}\dots$ We will get $50\%$ acceleration but it will always be of bad quality because of the too rough blending between the pairs of frames. Blending can be improved by weighing it differently by $50\% frame 1 + 50\% frame 2$, but the result is still unsatisfactory. Further improvements can be achieved by using $logarithmic$ or $exponential$ interpolation instead of $linear$ interpolation. But the most sophisticated methods that lead to better results are based on \textit{optical flow analysis}. These analyses the movement of circumscribed areas over a given period of time. With this method the intermediate frames do not derive from an approximate blending, but from the calculation of the \textit{vector} of the motion between two frames that determines the displacement (\textit{warping}) of the moving figure in the new intermediate frame. \textit{Interpolate Video} works this way.
 
 \subsubsection*{Practice}
 \label{ssub:practice}
@@ -2156,7 +2156,9 @@ Key Presses for using the Perspective plugin:
 
 Note that the red color lines in the box show the composer boundary.
 
-In order to see endpoints that go off the screen, you can use the zoom slider which changes only the zoom view and does nothing else. The slider uses a logarithmic scale ranging from $\frac{1}{100} to 100$.
+In order to see endpoints that go off the screen, you can use the zoom slider which changes only the zoom view and does nothing else. The slider uses a logarithmic scale ranging from $\frac{1}{100} to 100$.  Although not shown in the 
+image here, each endpoint is labeled in yellow with 1-4 and the Current X
+endpoint is shown in the menu to make it easier to tell which point is in play.
 
 Figure~\ref{fig:perspective01} show the results of the 4 different smoothing options.
 
@@ -2205,6 +2207,13 @@ Most cameras take the light coming into the lens, and convert that into $3$ sets
 
 Radial blur is a \textit{Bokeh} effect that creates a whirlpool which simulates a swirling camera. You can vary the location, type, and quality of the blur.
 
+\begin{figure}[hbtp]
+       \centering
+       \includegraphics[width=0.8\linewidth]{radial.png}
+       \caption{For clarity of presentation only 2 fields are shown}
+       \label{fig:radial}
+\end{figure}
+
 \begin{description}
     \item[X,Y] center of the circle of movement.
     \item[Angle] angle of motion in one direction.
@@ -2214,12 +2223,6 @@ Radial blur is a \textit{Bokeh} effect that creates a whirlpool which simulates
 
 Figure~\ref{fig:radial} has the parameters: $Angle=-35$ and $Steps=2$.
 
-\begin{figure}[hbtp]
-    \centering
-    \includegraphics[width=0.8\linewidth]{radial.png}
-    \caption{For clarity of presentation only 2 fields are shown}
-    \label{fig:radial}
-\end{figure}
 
 \subsection{ReframeRT}%
 \label{sub:reframert}
@@ -2243,11 +2246,11 @@ to interpolation.
 
 Stretch mode multiplies the current frame number of its output by the \textit{scale factor} to arrive at the frame to read from its input. The scaling factor is not entered directly but using a number of \textit{input} frames to be divided by the number of \textit{output} frames.
 
-\vspace{1ex} \texttt{Scale factor = Input frames / Output frames}
+\vspace{1ex} \texttt{Scale factor (SF) = Input frames / Output frames}
 
-\[\frac{1}{8} \Rightarrow scale\, factor = 0.125 \qquad (slowmotion)\]
+\[\frac{1}{8} \Rightarrow scale\, factor = 0.125 \qquad (slow\, motion)\]
 
-That is, one input frame of the original movie corresponds to $8$ new output frames originated by interpolation. It is the opposite with regard to \textit{fast play}.
+For slow motion we leave 1 for the frames of the input and we increase the number of frames of the output (for example putting 8 for the output we have slow motion $8\times$, with $SF=\frac{1}{8}=0.125$). For fast motion we leave 1 for the output and we increase the number for the input (for example 8 to have $8\times$, with $SF=\frac{8}{1}=8$). Another possibility is to put the frame rate of the media (e.g 120 fps) in the input and the project frame rate in the output (e.g 30 fps) or the opposite.
 
 The stretch mode has the effect of changing the length of output video by the inverse of the scale factor. If the scale factor is greater than $1$, the output will end before the end of the sequence on the timeline. If it is less than $1$, the output will end after the end of the sequence on the timeline. The ReframeRT effect must be lengthened to the necessary length to accommodate the scale factor. Change the length of the effect by clicking on the endpoint of the effect and dragging.
 
@@ -2260,6 +2263,8 @@ in stretch mode with a value less than $1$.
 
 \textit{Example:} you have a clip that you want to put in slow motion. The clip starts at $33.792\, seconds$ and ends at $39.765$. The clip is $5.973\, seconds$ long. You want to play it at $\frac{4}{10}^{ths}$ normal speed. You divide the clip length by the playback speed ($5.973\div0.4$) to get a final clip length of $14.9325\,seconds$. You create an in point at the start of your clip: $33.792\,seconds$. You put an out point $14.9325\,seconds$ later, at $48.7245\,seconds$ ($33.792 + 14.9325$). You attach a \texttt{ReframeRT} effect, set it to $0.4$ and stretch. You change the out point at $48.7245$ to an in point. You start your next clip after the slow motion effect at the $48.7245$ out point. You can do this without making any calculations by first applying the effect and then lengthening or shortening the bar to where the stretched movie ends.
 
+Now in the timeline we have the affected part of the plugin where we see the slow/fast effect, and the continuation of the timeline from where the plugin ends. We then have to select the interval on which the plugin acts and render it or transform it into a nested clip or nested asset. In this way we can replace or overlap it with the part of the timeline that originally included all of the part we wanted to slow down/speed up.
+
 \subsubsection*{Downsample}%
 \label{ssub:downsample}
 
@@ -2271,10 +2276,11 @@ Downsample mode changes the frame rate of the input as well as the number of the
 \label{ssub:other_important_points}
 
 \begin{itemize}
-    \item ReframeRT uses the fps indicated in \texttt{Settings$\rightarrow$ Format$\rightarrow$ fps} project and not the \texttt{fps} of the assets.
+    \item ReframeRT uses the fps indicated in \texttt{Settings $\rightarrow$ Format $\rightarrow$ fps} project and not the \texttt{fps} of the assets.
     \item It can be associated with Nested Clips.
-    \item As an alternative to ReframeRT you can use the \textit{speed curve}, or change the framerate in \texttt{Resources$\rightarrow$ info} and in the \texttt{Project}.
+    \item As an alternative to ReframeRT you can use the \textit{speed curve}, or change the framerate in \texttt{Resources $\rightarrow$ info} and in the \texttt{Project}.
     \item It is keyframmable.
+    \item ResampleRT with the same settings is used to act on audio tracks.
 \end{itemize}
 
 \subsection{Reroute}%
@@ -3579,6 +3585,7 @@ The following is a list of the integrated audio plug-ins.
   the data.
 \item [F\_astats]~\\Shows time domain statistics about audio
   frames.
+\item [F\_asubboost]~\\Boost subwoofer frequencies.
 \item [F\_atempo]~\\Adjusts audio tempo.
 \item [F\_atrim]~\\Pick one continuous section from the input,
   drop the rest.
@@ -3663,6 +3670,7 @@ The following is a list of the integrated audio plug-ins.
 
 The following is a list of the integrated video plug-ins.
 \begin{description}
+\item [F\_addroi]~\\Mark a region of interest in a video frame.
 \item [F\_amplify]~\\Amplify changes between successive video
   frames.
 \item [F\_atadenoise]~\\Apply an Adaptive Temporal Averaging
@@ -3670,6 +3678,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_avgblur]~\\Apply average blur filter.
 \item [F\_bbox]~\\Compute bounding box for each frame.
 \item [F\_bench]~\\Benchmarks part of a filtergraph.
+\item [F\_bilateral]~\\Apply bilateral filter, spatial smoothing while preserving edges.
 \item [F\_bitplaneoise]~\\Measure bit plane noise.
 \item [F\_blackdetect]~\\Detect video intervals that are
   (almost) black.
@@ -3678,6 +3687,7 @@ The following is a list of the integrated video plug-ins.
   settings you are able to change the power and the radius of the
   boxblur applied to luma, chroma and alpha.
 \item [F\_bwdif]~\\Deinterlaces the input image.
+\item [F\_cas]~\\Apply Contrast Adaptive Sharpen filter to video.
 \item [F\_chromakey]~\\Turns a certain color into
   transparency. Operates on YUV colors.
 \item [F\_ciescope]~\\Video CIE scope.
@@ -3696,6 +3706,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_cropdetect]~\\Auto-detect crop size.
 \item [F\_curves]~\\Adjust components curves.
 \item [F\_datascope]~\\Video data analysis.
+\item [F\_dblur]~\\Apply Directional blur filter.
 \item [F\_dctdnoiz]~\\Denoise frames using $2D DCT$.
 \item [F\_deband]~\\Debands video.
 \item [F\_deblock]~\\Deblocks video.
@@ -3760,6 +3771,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_fspp]~\\Applies Fast Simple Post-processing filter.
 \item [F\_gblur]~\\Apply Gaussian Blur filter.
 \item [F\_gradfun]~\\Debands video quickly using gradients.
+\item [F\_gradients]~\\Draws a transparent gradient.
 \item [F\_graphmonitor]~\\Show various filtergraph stats.
 \item [F\_greyedge]~\\Estimates scene illumination by grey
   edge assumption.
@@ -3801,6 +3813,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_mandelbrot]~\\Render a Mandelbrot fractal.
 \item [F\_mcdeint]~\\Applies motion compensating
   deinterlacing.
+\item [F\_median]~\\Pick median pixel from rectangle defined by radius.
 \item [F\_mestimate]~\\Generate motion vectors.
 \item [F\_mpdecimate]~\\Remove near-duplicate frames.
 \item [F\_mptestsrc]~\\Generate various test pattern.
@@ -3821,6 +3834,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_perms]~\\Set permissions for the output video frame.
 \item [F\_perspective]~\\Corrects the perspective of video.
 \item [F\_phase]~\\Phases shift fields.
+\item [F\_photosensitivity]~\\Filter out photosensitive epilepsy seizure-inducing flashes.
 \item [F\_pixscope]~\\Pixel data analysis for checking color
   and levels. It will display sample values of color channels.
 \item [F\_pp]~\\Filters video using libpostproc.
@@ -3844,6 +3858,8 @@ The following is a list of the integrated video plug-ins.
 \item [F\_sab]~\\Applies shape adaptive blur.
 \item [F\_scale]~\\Scale the input video size and/or convert
   the image format.
+\item [F\_scdet]~\\Detect video scene change.
+\item [F\_scroll]~\\Scroll input video horizontally and/or vertically by constant speed.
 \item [F\_separatefields]~\\Split input video frames into
   fields.
 \item [F\_setparams]~\\Force field, or color property for the
@@ -3853,6 +3869,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_showpalette]~\\Display frame palette.
 \item [F\_shuffleframes]~\\Shuffles video frames.
 \item [F\_shuffleplanes]~\\Shuffles video planes.
+\item [F\_sierpinski]~\\Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
 \item [F\_signalstats]~\\Separates statistics from video
   analysis.
 \item [F\_smartblur]~\\Blurs the input video without impacting
@@ -3870,15 +3887,19 @@ The following is a list of the integrated video plug-ins.
 \item [F\_tblend]~\\Blend successive frames.
 \item [F\_testsrc]~\\Generate test pattern.
 \item [F\_testsrc2]~\\Generate another test pattern.
+\item [F\_thistogram]~\\Compute and draw a color distribution histogram for the input video across time.
 \item [F\_tile]~\\Tile several successive frames together.
 \item [F\_tinterlace]~\\Performs temporal field interlacing.
 \item [F\_tlut2]~\\Compute and apply a lookup table from 2
   successive frames.
+\item [F\_tmedian]~\\Pick median pixels from successive frames.
 \item [F\_tmix]~\\Mix successive video frames.
 \item [F\_transpose]~\\Transposes input video.
 \item [F\_unsharp]~\\Sharpen or blur the input videlo.
+\item [F\_untile]~\\Untile a frame into a sequence of frames.
 \item [F\_uspp]~\\Applies Ultra Simple/Slow Post-processing
   filter.
+\item [F\_v360]~\\Convert 360 videos between various formats.
 \item [F\_vaguedenoiser]~\\Applies a Wavelet based Denoiser.
 \item [F\_vectorscope]~\\Video vectorscope.
 \item [F\_vflip]~\\Flips the input video vertically.
@@ -3894,6 +3915,7 @@ The following is a list of the integrated video plug-ins.
 \item [F\_weave]~\\Weaves input video fields into frames.
 \item [F\_xbr]~\\Scales the input using $xBR$ algorithm.
 \item [F\_yadif]~\\Deinterlaces the input image.
+\item [F\_yaepblur]~\\Yet another edge preserving blur filter.
 \item [F\_yuvtestsrc]~\\Generate YUV test pattern.
 \item [F\_zoompan]~\\Applies Zoom \& Pan effect.
 \end{description}