the icon is on, that is, ffmpeg probes first. Suggestion is to leave it on except in a few special
cases where it may be better to have early probes disabled. When you mouse over the main menu FF
toggle button, the text displays ffmpeg's \textit{Currently} set position. Just left mouse click to change to the other setting.
-The ffmpeg early probe state is saved between sessions and is also affected by choices made in Probe Order (refer to section \ref{sub:probe_order_loading_media}). It is important to note that the various file indexes may need to be rebuilt if you change which codec is being used to decode the file. There is a warning popup to remind you when you change the default ffmpeg early probe state (unless you have checked the box to no longer show the warning). You can easily rebuild the index for a specific media file by going to the Resources window, right mouse click on that media, and choose \texttt{Rebuild Index} from the popup choices.
+The ffmpeg early probe state is saved between sessions and is also affected by choices made in Probe Order (refer to section~\ref{sub:probe_order_loading_media}). It is important to note that the various file indexes may need to be rebuilt if you change which codec is being used to decode the file. There is a warning popup to remind you when you change the default ffmpeg early probe state (unless you have checked the box to no longer show the warning). You can easily rebuild the index for a specific media file by going to the Resources window, right mouse click on that media, and choose \texttt{Rebuild Index} from the popup choices.
Figure~\ref{fig:ff} shows (1) reddish colored FF in upper right hand corner of main window indicating
that ffmpeg early probes is enabled; (2) \textit{Try FFMpeg last} indicator message for ffmpeg early probes enabled (note that the color is different because you highlighted the icon); and (3) black colored FF indicates ffmpeg will be used last and you are changing the behavior so that \CGG{} warns you accordingly.
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}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
muxer codec
(or) muxer codec | bitstream filter [ bitstream filter options ]
\end{lstlisting}
where the | represents piping the codec data through the bitstream filter. The rest of the lines in the file should look as follows:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# in column one is a comment
id1 value1
(or) id2 = value2
Only one equals sign is allowed and it is just for readability. There may be any number of id/value pair lines in a media definition, including zero. A typical line might be:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
bitrate 4000000
(or) bitrate = 5000000
\end{lstlisting}
\begin{description}
\item[duration] overrides the probe duration when opening media for decoding
- \item[video\_filter] adds a video stream filter, eg. edgedetect,\dots at the stream level
- \item[audio\_filter] adds an audio stream filter, eg. echo,\dots at the stream level
+ \item[video\_filter] adds a video stream filter, eg.\ edgedetect,\dots at the stream level
+ \item[audio\_filter] adds an audio stream filter, eg.\ echo,\dots at the stream level
\item[loglevel] sets the library logging level, as quiet, panic, \dots verbose, debug
\end{description}
All other id's should be in the ffmpeg documentation, and correspond to the global, muxer, and codec option names and values used by ffmpeg. For example to set the aspect ratio to 4:3, use:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
aspect 4:3
\end{lstlisting}
Below shows an example: \texttt{decode.opts} which is used when the ffmpeg decoder is initialized.
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# apply at init decode
loglevel=fatal
formatprobesize=5000000
Now you will see this as what you can choose in the rendering choices for ffmpeg.
Inside the file you will see that the first line is special. It is the muxer and codec. For example:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
h264 libx265
\end{lstlisting}
The contents may be something like:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# <path>/video/vid.mov
mp4 libx265
bitrate 4000000
For audio and video together, the mux format must agree between the aud.mov and vid.mov files when they are to be used together. The stream muxer must be the same for all the streams in the file being written.
For example:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# <path>/audio/aud.mov
mp4 pcm_mulaw
\end{lstlisting}
\texttt{audio/<class>.dfl} and \texttt{video/<class>.dfl}
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# audio/mov.dft
aud.mov
\end{lstlisting}
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# video/mov.dft =
vid.mov
\end{lstlisting}
When you see problems in using the new options files you have created and put into place, add the following line to \texttt{ffmpeg/encoder.opts}:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
loglevel=verbose
\end{lstlisting}
There is an \textsc{EXCEPTION} to all of the above because of a conflict between ffmpeg and the x264 person making the detection of default ffmpeg settings terminate with an error. If you get this error, you must workaround this termination by including parameters that don't match $5$ or more of the normal expected values. So you just have to change a few parameters to avoid the probe detection. Here is an example where you will notice the \textit{x264-params} line tweaking values to throw off the detection/error termination code.
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# <path>/ffmpegvideo/test.mp4
mp4 libx264
preset=slow
To get a listing of the current ffmpeg supported formats and codecs that can be made to work with \CGG{}, provided there are option files added, run the following commands. This should be done from the \texttt{<build>} directory substituting the location of \texttt{<build>} where you have installed \CGG{} on your system and the ffmpeg may be a different version than $4.2$ as used below. Then look at the output created in \texttt{/tmp/ff-formats.txt} and \texttt{codecs.txt}.
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
/<build>/cinelerra-5.1/thirdparty/ffmpeg-4.2/ffmpeg -formats > /tmp/ff-formats.txt
/<build>/cinelerra-5.1/thirdparty/ffmpeg-4.2/ffmpeg -codecs > /tmp/ff-codecs.txt
\end{lstlisting}
Add the file named \texttt{./ffmpeg/audio/acc256k.pro} which contains the following lines:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
mov aac
strict -2
b 256000
Add the file named \texttt{./ffmpeg/audio/pro.dfl} which contains the following lines:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
acc256k.pro
\end{lstlisting}
Add the file named \texttt{./ffmpeg/video/prores.pro} which contains the following lines:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
mov prores
profile=2
# lines of comments
Add the file named \texttt{./ffmpeg/video/pro.dfl} which contains the following lines:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
prores.pro
\end{lstlisting}
There are thousands of options for using ffmpeg. Now it is possible to \textit{view} the available options for a particular video and audio choice by using the \textit{wrench icon} and then clicking on the \textit{view} box. FFmpeg has to be the selected file format for this feature to be visible. It makes it a lot easier since only the applicable options show up as opposed to everything that ffmpeg can do. These options are just \textit{Hints} and some may be missing due to the way that ffmpeg options are coded -- \CGG{} shows the option data ffmpeg has exposed.
-As an example, instead of reading the entire 264 library information, you only have to look at the shown available options. Both the video and the audio are browsable. The options visible in the \textit{Audio/Video Preset} textbox are the final values which are used when rendering once you have checked OK. For assistance in choosing the options you want, use the view popup to see the objects that go with the selected format tool, highlight the option, modify the parameter value in the box at the top of the \textit{Options} window based on what you want, and then click apply. Updated parameter values or new parameters will be appended at the bottom. Note that when you highlight an option, a tooltip will show up when available in the lower right hand corner which describes the option. Also note that the Format and Codec types are shown on the top line of the Options window.
+As an example, instead of reading the entire 264 library
+information, you only have to look at the shown available options.
+Both the video and the audio are browsable. The options visible in
+the \textit{Audio/Video Preset} textbox are the final values which
+are used when rendering once you have checked OK\@. For assistance
+in choosing the options you want, use the view popup to see the
+objects that go with the selected format tool, highlight the option,
+modify the parameter value in the box at the top of the
+\textit{Options} window based on what you want, and then click
+apply. Updated parameter values or new parameters will be appended
+at the bottom. Note that when you highlight an option, a tooltip
+will show up when available in the lower right hand corner which
+describes the option. Also note that the Format and Codec types are
+shown on the top line of the Options window.
Parameters exist in 3 layers: ffmpeg, codec, and an interface layer. You can apply parameters to each layer. The top 2 layers are accessed with the Kind popup menu. The ffmpeg layer is topmost, and is selected as Kind: ffmpeg. It can specify many of the more common parameters, such as the bitrate, quality, and so on. The middle layer is selected as Kind: codec. These options can specialize your choices, and frequently includes presets and profiles useful for coding well known parameter sets, like \textit{profile=high422}, \textit{preset=medium}, or \textit{tune=film}, etc. The interface layer may or may not be available. It is usually accessible only by an \textit{opts} parameter, like \texttt{x264-params key=value:key=value}:\dots These options are passed directly to the low level codec library.
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}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# \dots/ffmpeg/video/tiff.dfl
tiff48.tif
\end{lstlisting}
Then create an ffmpeg video encoder parameters file in the same directory:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# \dots/ffmpeg/video/tiff48.tiff
image2 tiff
pixel_format=rgb48
Raw video is not affected by decoding on read in. This makes it very attractive to provide raw image data for editing and rendering media. A wide variety of raw formats are available via the ffmpeg file interface. To load media in a raw format, select \textit{try ffmpeg first} and create an accompanying \textit{opts} file. The opts files must be in the same directory as your media, with the same base name, and the \texttt{.opts} extension. The opts file contents should reflect your video setup. An example follows:
-\begin{lstlisting}[language=bash,numbers=none]
+\begin{lstlisting}[style=sh]
# Video file name: /tmp/buddy.mov
# Opts file name: /tmp/buddy.opts
# Contents of opts file: