add missing paragraph to Overlay plugin
[goodguy/cin-manual-latex.git] / parts / Advanced.tex
index 23cd3ccb44e8577fac5b4e0921807d33c4a048bd..007499393e1a053d5025229b528e6548a79dc53c 100644 (file)
@@ -11,7 +11,7 @@ When we want to render the project, remember to remove the proxy to return to th
 
 To use the proxy in a classic way, i.e. as a scaling, select \texttt{Settings $\rightarrow$ Proxy settings} and change the Scale factor from Original size to your downsized choice.  You can choose ffmpeg as the File Format \index{file format} and a choice of various codecs associated with that.  A good choice is the default of mpeg which can usually be quite fast.  In addition, to modify values for that codec, click on the wrench icon.
 
-We can use the \textit{Proxy 1:1} in two ways: setting "1" as \textit{Scale factor}, or check the \textit{Rescaled to project size (FFMPEG only)}  button. In this mode we don't have scaling, i.e. downsize, but only variations of the codec parameters that allow to maintain the original resolution. The advantage is that you can use filters that require the original size to work well. NB: if we set any scaling, by activating the \textit{Rescaled to project size (FFMPEG only)} button we automatically lose scaling and enter Proxy 1:1 mode.
+We can use the \textit{Proxy 1:1} in two ways: setting "1" as \textit{Scale factor}, or check the \textit{Rescaled to project size (FFMPEG only)}  button. In this mode we don't have scaling, i.e. downsize, but only variations of the codec parameters that allow to maintain the original resolution. The advantage is that you can use filters that require the original size to work well. Please note that if we set any scaling, by activating the \textit{Rescaled to project size (FFMPEG only)} button we automatically lose scaling and enter Proxy 1:1 mode.
 
 When you have completed your choices, just click OK, and then the video tracks will be rendered. This may take some time, but previous proxy renders will be reused.
 
@@ -64,7 +64,7 @@ Quality:      -1
 Pixels:                yuv420p
 \end{lstlisting}
 
-If you get errors for some videos, such as those with strange variable bit rate or some types of files made on a smartphone, an usually reliable alternative is to change the following parameters:
+If you get errors for some videos, such as those with strange variable bit rate or some types of files made on a smartphone, a usually reliable alternative is to change the following parameters:
 
 \begin{lstlisting}[numbers=none]
 File Format:   FFMPEG - mov
@@ -80,6 +80,32 @@ If you get error messages \index{proxy!error} when creating proxies, check the V
 
 More specific information on which plugins need to use \textit{Proxy 1:1}. is provided here next. If the keyframe data uses coordinate data that is absolute, then the Factor scale = 1 should be used.  If the data is normalized (like always $0-100\%$) then the proxy can be done with downsize (i.e. classic \textit{Proxy}).  The session geometry format, shown in \texttt{Settings $\rightarrow$ Format} as $width \times height$, is changed if scale factor $\neq$ 1 is used to cause all of the data to be in the reduced format.  If this affects the plugin operation, then \textit{Proxy 1:1} should be used.  Examples of plugins that need the \textit{Proxy 1:1} are: Title, AutoScale, Scale, ScaleRatio, and Translate.  Most others are safe to use with downsize.
 
+A faster method of creating the proxy file outiside of \CGG{} for users who have
+vaapi hardware acceleration capability on their graphics board is via a script.  Speed
+up could potentially be 10 to 30 times faster depending on the parameter values you choose
+and the size of your video file.  This script is included in the doc subdirectory as 
+vaapi\_proxy.sh for users not using an AppImage version and is shown below.  You will
+have to tune it to your specific needs for the vaapi\_device name (currently set to
+/dev/dri/renderr128), file type (currently set to h264 and mp4), and proxy size (now is 6). 
+Once you have created the proxy file, you then start Cinelerra, load the original un-proxied
+video, use the Settings pulldown and choose the Proxy settings options as you would normally,
+but because you already have created the existing proxy file with the correct name, it will
+be automatically loaded and will not have to create it.  The filename of the proxy file
+must be in the same location as the original video and have the exact required naming
+conventions and scale factor.
+
+\begin{lstlisting}[numbers=none]
+#!/bin/bash
+filename="$1"
+fileout="${filename%.*}"
+proxy="6"
+# Hardware encode AMD
+ffmpeg -threads 2 -hwaccel vaapi  -vaapi_device /dev/dri/renderD128 \
+ -i  "$1" -c:v h264_vaapi -vf "format=nv12,hwupload,scale_vaapi=iw/'$proxy':ih/'$proxy'" \
+ -vcodec h264_vaapi  -preset fast -c:a copy \
+ -bf 0 -profile:v 66 "$fileout".proxy"$proxy"-mp4.mp4
+\end{lstlisting}
+
 \subsection{Proxies with Alpha channel}%
 \label{sub:proxies_alpha_channel}
 
@@ -1124,7 +1150,7 @@ Operation of Align Timecodes includes the following options to help in your setu
        rate as a time standard.
        \item Time Code Start in the Resources window on the bottom of \textit{Info} for the media if the timecode for that
        asset has been scanned and is known. You can scan the asset’s Timecode by using the middle mouse
-       button on its track which then displays the timecode for that on the timebar (\texttt{MMB $rightarrow$ Timecode}). Or you can use the shortcut \texttt{ctrl +!}, after selecting the edit/track on the timeline.
+       button on its track which then displays the timecode for that on the timebar (\texttt{MMB $\rightarrow$ Timecode}). Or you can use the shortcut \texttt{Ctrl+!}, after selecting the edit/track on the timeline.
 \end{itemize}
 
 \paragraph*{Notes}