This section describes how the FFmpeg options files work for decoding and encoding and goes into great detail. It will make more sense if you look at \CGG{}'s ffmpeg config directory and the \CGG{} menus at the same time.
It is meant to include everything necessary for complete understanding. You will be able to personalize your own options files without knowing all of the information included below if you know the basics. The word encoding is used interchangeably with the word rendering.
The possible combinations for ffmpeg options files are literally combinatorial -- that is a lot (factorial!). The allowed media file format / codec choices are much more flexible than you might realize. When the ffmpeg design was initially added, some parameter files which describe the choices which the program uses had to be created. There are way too many to enumerate in the deliverable \CGG{} package. Some quite detailed information for how ffmpeg options work is given here and hopefully, enough basics for simple understanding. It may all seem complicated at first, but will become obvious.
This section describes how the FFmpeg options files work for decoding and encoding and goes into great detail. It will make more sense if you look at \CGG{}'s ffmpeg config directory and the \CGG{} menus at the same time.
It is meant to include everything necessary for complete understanding. You will be able to personalize your own options files without knowing all of the information included below if you know the basics. The word encoding is used interchangeably with the word rendering.
The possible combinations for ffmpeg options files are literally combinatorial -- that is a lot (factorial!). The allowed media file format / codec choices are much more flexible than you might realize. When the ffmpeg design was initially added, some parameter files which describe the choices which the program uses had to be created. There are way too many to enumerate in the deliverable \CGG{} package. Some quite detailed information for how ffmpeg options work is given here and hopefully, enough basics for simple understanding. It may all seem complicated at first, but will become obvious.
\subsection{File naming convention}%
\label{sub:file_naming_convention}
In \CGG{}'s ffmpeg configuration directory you will see files as listed and described below. File type and extension names are the key for \CGG{}'s use of ffmpeg. Basically the \texttt{.opts} file extension represents options; \texttt{.dfl} represents defaults; and all the rest are media types. For example one media type is quicktime so that \texttt{*.qt} file names would be the \textit{quicktime} choices. In the file names below, \textit{ext} refers to a set of files with file names matching the \texttt{*.ext} file extension. And \textit{typ} refers to a type of format / codec combination used, that is, the media type.
\subsection{File naming convention}%
\label{sub:file_naming_convention}
In \CGG{}'s ffmpeg configuration directory you will see files as listed and described below. File type and extension names are the key for \CGG{}'s use of ffmpeg. Basically the \texttt{.opts} file extension represents options; \texttt{.dfl} represents defaults; and all the rest are media types. For example one media type is quicktime so that \texttt{*.qt} file names would be the \textit{quicktime} choices. In the file names below, \textit{ext} refers to a set of files with file names matching the \texttt{*.ext} file extension. And \textit{typ} refers to a type of format / codec combination used, that is, the media type.
ffmpeg/ffmpeg.opts & global ffmpeg options, always used \\
ffmpeg/decode.opts & global decoder options, used when opening existing files for decoding \\
ffmpeg/encode.opts & global encoder options, used when creating new files for encoding \\
ffmpeg/audio/audio.opts & audio encoder options, used when creating audio streams \\
ffmpeg/video/video.opts & video encoder options, used when creating video streams \\
ffmpeg/plugin.opts & parameters for ffmpeg filters as audio/video plugins \\
ffmpeg/ffmpeg.opts & global ffmpeg options, always used \\
ffmpeg/decode.opts & global decoder options, used when opening existing files for decoding \\
ffmpeg/encode.opts & global encoder options, used when creating new files for encoding \\
ffmpeg/audio/audio.opts & audio encoder options, used when creating audio streams \\
ffmpeg/video/video.opts & video encoder options, used when creating video streams \\
ffmpeg/plugin.opts & parameters for ffmpeg filters as audio/video plugins \\
\index{ffmpeg!option file format}
For the option files a specific format must be followed in creating the file content.
\index{ffmpeg!option file format}
For the option files a specific format must be followed in creating the file content.
In \texttt{typ.ext} encoder parameter files, the first line is defined as:
\begin{lstlisting}[style=sh]
In \texttt{typ.ext} encoder parameter files, the first line is defined as:
\begin{lstlisting}[style=sh]
For illustrative purposes, here is an example of the options files that need to be added for using the ffmpeg \textit{ProRes 422} format. This makes it possible to transcode to \texttt{h264.mov} with FFmpeg retaining \textit{10-bit yuv422p} from the source to the target output video.
For illustrative purposes, here is an example of the options files that need to be added for using the ffmpeg \textit{ProRes 422} format. This makes it possible to transcode to \texttt{h264.mov} with FFmpeg retaining \textit{10-bit yuv422p} from the source to the target output video.
Add the file named \texttt{./ffmpeg/audio/pro.dfl} which contains the following lines:
\begin{lstlisting}[style=sh]
Add the file named \texttt{./ffmpeg/audio/pro.dfl} which contains the following lines:
\begin{lstlisting}[style=sh]
\index{ffmpeg!image2 streams}
Another feature gained from using ffmpeg in \CGG{} takes advantage of what is being referred to as the \textit{\%d trick}. This trick uses the ffmpeg muxer image2 and a filename template to create a series of image files of a given type. A specific example is described below.
\index{ffmpeg!image2 streams}
Another feature gained from using ffmpeg in \CGG{} takes advantage of what is being referred to as the \textit{\%d trick}. This trick uses the ffmpeg muxer image2 and a filename template to create a series of image files of a given type. A specific example is described below.
To encode a series of $48$\,bit tiff output image files, add a file to the \CGG{} data ffmpeg/video subdirectory as in:
\begin{lstlisting}[style=sh]
To encode a series of $48$\,bit tiff output image files, add a file to the \CGG{} data ffmpeg/video subdirectory as in:
\begin{lstlisting}[style=sh]
tiff48.tif
\end{lstlisting}
Then create an ffmpeg video encoder parameters file in the same directory:
\begin{lstlisting}[style=sh]
tiff48.tif
\end{lstlisting}
Then create an ffmpeg video encoder parameters file in the same directory:
\begin{lstlisting}[style=sh]