fix missing Rendering piece by Andrea
[goodguy/cin-manual-latex.git] / parts / Rendering.tex
index 327e9570d92eed0b493517ff2e417635fdbf3d0f..2fb131718b3d92eefa93984af07bd69c8a3fcc9a 100644 (file)
@@ -525,6 +525,86 @@ Alternatives based on h264 and for non-commercial use are listed below.  For Dai
        \end{tabular}
 \end{center}
 
+These same steps have been verified to work for creating Dailymotion videos -- however, the created files must be renamed before uploading to change the youtube extension to webm instead for Dailymotion.
+
+\subsection{VP9 parameters\protect\footnote{credit Frederic Roenitz}}%
+\label{sub:vp9_parameters}
+\index{rendering!VP9 parameters}
+
+\textsc{VP9} is a video codec licensed under the BSD license and is
+considered open source,
+% Sisvel Announces AV1 Patent Pool, March 10, 2020
+% https://www.streamingmedia.com/Articles/ReadArticle.aspx?ArticleID=139636
+%  Webm / VP9 is a media file format which is free to use under the
+%  BSD license and is open-source; thus there are no licensing
+%  issues to be concerned about.
+the \textsc{Webm} container is based on \textsc{Matroska} for video
+and \textsc{Opus} for audio. There are some common \textsc{VP9} rendering
+options files that support creation of video for YouTube,
+Dailymotion, and other online video services.
+
+YouTube easy startup steps are documented above.
+
+Below is one of the \textsc{VP9} rendering options file with documentation for specifics:
+
+\textbf{webm libvpx-vp9}
+
+from {\small \url{https://developers.google.com/media/vp9/settings/vod/}}
+
+1280x720 (24, 25 or 30 frames per second)
+
+Bitrate (bit rate)
+
+\textsc{VP9} supports several different bitrate modes:
+
+\textit{mode:}
+
+\begin{tabular}{p{6cm} p{10cm}}
+       Constant Quantizer (Q) & Allows you to specify a fixed quantizer value; bitrate will vary \\
+       Constrained Quality (CQ) & Allows you to set a maximum quality level. Quality may vary within bitrate parameters\\
+       Variable Bitrate (VBR) & Balances quality and bitrate over time within constraints on bitrate\\
+       Constant Bitrate (CBR) & Attempts to keep the bitrate fairly constant while quality varies\\
+\end{tabular}
+
+CQ mode is recommended for file-based video (as opposed to streaming). The following FFMpeg command-line parameters are used for CQ mode:
+
+\textit{FFMpeg}:
+
+\begin{center}
+       \begin{tabular}{{p{4cm} p{10cm}}}
+               -b:v <arg> & Sets target bitrate (e.g. 500k)\\
+               -minrate <arg> & Sets minimum bitrate.\\
+               -maxrate <arg> & Sets maximum bitrate.\\
+               -crf <arg> & sets maximum quality level. Valid values are 0-63, lower numbers are higher quality.\\
+       \end{tabular}
+\end{center}
+
+\textit{Note 1}: Bitrate is specified in kbps, or kilobits per second. In video compression a kilobit is generally assumed to be 1000 bits (not 1024).
+
+\textit{Note 2:} Other codecs in FFMpeg accept the \textit{-crf} parameter but may interpret the value differently. If you are using \textit{-crf} with other codecs you will likely use different values for VP9.
+
+\texttt{bitrate=1024k}\\
+\texttt{minrate=512k}\\
+\texttt{maxrate=1485k}\\
+\texttt{crf=32}
+
+\textit{Tiling} splits the video into rectangular regions, which allows multi-threading for encoding and decoding. The number of tiles is always a power of two. 0=1 tile; 1=2; 2=4; 3=8; 4=16; 5=32\\
+\texttt{tile-columns=2}
+
+(modified from {\small \url{https://trac.ffmpeg.org/wiki/EncodingForStreamingSites}})
+
+To use a 2 second \textit{GOP} (Group of Pictures), simply multiply your output frame rate $\times$ 2. For example, if your input is \textit{-framerate 30}, then use \textit{-g 60}.\\
+\texttt{g=240}
+
+number of \textit{threads} to use during encoding\\
+\texttt{threads=8}
+
+\textit{Quality} may be set to good, best, or realtime\\
+\texttt{quality=good}
+
+\textit{Speed}: this parameter has different meanings depending upon whether quality is set to good or realtime. Speed settings 0-4 apply for VoD in good and best, with 0 being the highest quality and 4 being the lowest. Realtime valid values are 5-8; lower numbers mean higher quality\\
+\texttt{speed=4}
+
 \subsection{Piping Video to a Command Line}%
 \label{sub:piping_video_command_line}
 \index{rendering!command line}