update with Andrea more Context Help + minor
[goodguy/cin-manual-latex.git] / parts / FFmpeg.tex
index 2a2673d3f3f9b4aa8c2d53f089fa8a9483a7b466..8ed0e1ac65d9517560547161af88dad5e6554b85 100644 (file)
@@ -1,52 +1,57 @@
 \chapter{FFmpeg Interactions}%
 \label{cha:ffmpeg_interactions}
+\index{ffmpeg}
 
 \CGG{} uses ffmpeg for decoding and encoding media, thus there are many opportunities available to manipulate options.
 
 \section{FFmpeg Early Probe Explanation}%
 \label{sec:ffmpeg_early_probe_explanation}
+\index{ffmpeg!early probe}
+\index{ffmpeg!try first}
+\index{ffmpeg!try last}
 
-When you open media, a series of libraries and codec functions are used to \textit{probe} the data, to see if it can determine the type of file format and codec parameters needed to correctly decode the file.  If ffmpeg probes early -- \textit{Try FFMpeg first} is in effect for the FF button -- it will usually find some way to try to decode just about any contemporary media file.  But there are some times that the built in codecs are actually a better choice.  A lot of this may fall into the category of personal preference.  For example, some may prefer the mpeg library in the \CGG{} code over the ffmpeg code because it has more decoding capability and seems to be more robust when the media is damaged.  In that case you will want the FF button to read \textit{Try FFMpeg last}.
+When you open media, a series of libraries and codec functions are used to \textit{probe} the data, to see if it can determine the type of file format and codec parameters needed to correctly decode the file.  If ffmpeg probes early -- \textit{Try FFMpeg first} is in effect for the FF button (green icon) -- it will usually find some way to try to decode just about any contemporary media file.  But there are some times that the built in codecs are actually a better choice.  A lot of this may fall into the category of personal preference.  For example, some may prefer the mpeg library in the \CGG{} code over the ffmpeg code because it has more decoding capability and seems to be more robust when the media is damaged.  In that case you will want the FF button to read \textit{Try FFMpeg last}.
 
 To summarize, if ffmpeg probes early, you will never get to use the built in libraries, and if you want to skip over buggy old libraries, use ffmpeg early probe enabled so that the newest code will be tried first.
-The FF button is located in the upper right hand corner of the main window.
+The green icon is located in the upper right hand corner of the main window.
 
-When the icon is red, ffmpeg probes early is enabled and you will see it reads
- \textit{Currently: Try FFMpeg first} when moving over the FF button in the upper 
-right hand corner of the screen.  When the icon is black, ffmpeg probes early is disabled so that 
+When the icon is green, ffmpeg probes early is enabled and you will see it reads
+ \textit{Currently: Try FFMpeg first} when moving over the icon button in the upper 
+right hand corner of the screen.  When the icon is capital "C", ffmpeg probes early is disabled so that 
 ffmpeg probes late and it reads \textit{Currently: Try FFMpeg last}.  The initial default state of 
 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 
+cases where it may be better to have early probes disabled.  When you mouse over the main menu icon 
 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~\nameref{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.
+Figure~\ref{fig:ff} shows (1) greenish colored icon 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 icon is different because you highlighted the icon); and (3) "C"  icon indicates ffmpeg will be used last and you are changing the behavior so that \CGG{} warns you accordingly.
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.7\linewidth]{images/ff.png}
-    \caption{The three colors of \textit{Probe}}
+    \includegraphics[width=0.9\linewidth]{ff.png}
+    \caption{The three icons of \textit{FF Probe}}
     \label{fig:ff}
 \end{figure}
 
 \section{How to Create FFmpeg Options Files}%
 \label{sec:create_ffmpeg_options_files}
+\index{ffmpeg!options files}
 
-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.  
+AppImage does not provide this capability. 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.
+AppImage does not provide this capability. 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.
 
 In the ffmpeg configuration directory there are a series of options files used when encoding or decoding audio or video.  They are read in the order from top to bottom and only the files needed for the current operation are added to the active configuration.
 
 \begin{center}
     \small
-    \begin{tabular}{l l}
+    \begin{tabular}{l m{25em}}
         \toprule
         ffmpeg/ffmpeg.opts & global ffmpeg options, always used \\
         ffmpeg/decode.opts & global decoder options, used when opening existing files for decoding \\
@@ -58,9 +63,9 @@ In the ffmpeg configuration directory there are a series of options files used w
     \end{tabular}
 \end{center}
 
-\paragraph{Decoder options:} Normally, only \texttt{ffmpeg.opts} and \texttt{decode.opts} are used when reading/decoding files, but may be specialized if a \texttt{<path>/media.opts} exists for a given \texttt{<path>/media.ext} file.  For example, if you want to only fail on fatal errors and to always use the video filter, edgedetect, when working with your media file \texttt{dreaming.y4m}, then create a file \texttt{dreaming.opts} in the same directory with the contents of \textit{loglevel=fatal} on the first line and \textit{video\_filter=edgedetect} on the next.  These specialized settings will override the defaults.  The fatal loglevel is especially handy for lesser quality media.
+\paragraph{Decoder options:} \index{ffmpeg!decoder options} Normally, only \texttt{ffmpeg.opts} and \texttt{decode.opts} are used when reading/decoding files, but may be specialized if a \texttt{<path>/media.opts} exists for a given \texttt{<path>/media.ext} file.  For example, if you want to only fail on fatal errors and to always use the video filter, edgedetect, when working with your media file \texttt{dreaming.y4m}, then create a file \texttt{dreaming.opts} in the same directory with the contents of \textit{loglevel=fatal} on the first line and \textit{video\_filter=edgedetect} on the next.  These specialized settings will override the defaults.  The fatal loglevel is especially handy for lesser quality media.
 
-\paragraph{Encoder Options:} Within the audio/video subdirectories of the first level ffmpeg directory, the \texttt{typ.ext} files are for encoder (rendering) setups.
+\paragraph{Encoder Options:} \index{ffmpeg!encoder options} Within the audio/video subdirectories of the first level ffmpeg directory, the \texttt{typ.ext} files are for encoder (rendering) setups.
 
 \begin{center}
     \begin{longtable}{l p{23em}}
@@ -84,18 +89,19 @@ In the ffmpeg configuration directory there are a series of options files used w
 
 \subsection{Option File Format / Content}%
 \label{sub:option_file_format_content}
+\index{ffmpeg!option file format}
 
-For the option files a specific format must be followed in creating the file content.
+AppImage does not provide this capability.  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
@@ -103,7 +109,7 @@ where the | represents piping the codec data through the bitstream filter. The r
 
 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}
@@ -112,20 +118,20 @@ There are 4 special id's recognized by \CGG{} which cause special processing.  T
 
 \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
@@ -150,13 +156,13 @@ So if you want to create a \textit{mov} codec class, add two new files to the ff
 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
@@ -167,7 +173,7 @@ This will code an mp4 formatted file using the \textit{lib264} codec encoder.
 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}
@@ -184,12 +190,12 @@ When the menu popup is created, there may be many choices for that class type, s
 
 \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}
@@ -198,7 +204,7 @@ The above will be the default choice when the menu opens.
 
 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}
 
@@ -206,7 +212,7 @@ sometimes that will be enough to see what has caused a failure, or even catch un
 
 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
@@ -221,7 +227,7 @@ If you send any new options files to \href{mailto:cin@lists.cinelerra-gg.org}{ci
 
 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}
@@ -233,7 +239,7 @@ For illustrative purposes, here is an example of the options files that need to
 
 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
@@ -243,13 +249,13 @@ 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
@@ -257,7 +263,7 @@ profile=2
 
 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}
 
@@ -272,48 +278,67 @@ Then to use and to get 10 bit depth and preserve depth from decode to encode:
     \item check OK, and watch for messages in the terminal window
 \end{enumerate}
 
-\subsection{Viewing \& Modifying FFmpeg Format Options inside \CGG{}}%
-\label{sub:viewing_modifying_ffmpeg_cinelerra}
+\subsection{Modifying FFmpeg Format Options inside \CGG{}}%
+\label{sub:modifying_ffmpeg_cinelerra}
+\index{ffmpeg!option file format}
+\index{ffmpeg!wrench}
+\index{ffmpeg!private options}
 
 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.
 
-Figure~\ref{fig:video-preset} shows \textit{ffmpeg} video as the Kind. Note the x264opts (should actually be x264-params now) in the Video Preset window immediately below.
+With the \textit{format} button we can access further parameters, called \textit{Private Options}. A window opens that contains a new view button. More details in the section: \nameref{sub:extra_cin_option_ffmpeg}
+
+Figure~\ref{fig:video-preset} shows \textit{ffmpeg} video as the Kind. Note the x264opts (should actually be x264-params now) in the Video Preset window immediately below. There is also the \textit{format} window with private options.
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.8\linewidth]{images/video-preset.png}
-    \caption{FFmpeg wrench, video preset and view options}
+    \includegraphics[width=1.0\linewidth]{video-preset.png}
+    \caption{FFmpeg wrench, video preset, view and format options}
     \label{fig:video-preset}
 \end{figure}
 
-Figure~\ref{fig:audio-preset02} shows \textit{ffmpeg} video for the Kind. Note the yellow tooltip in the lower right hand corner describing the highlighted option.  Also note the allowed \textit{Range} values above the box provided for keyins.
+Figure~\ref{fig:audio-preset02} shows \textit{ffmpeg} video for the Kind. Note the colored tooltip in the lower right hand corner describing the highlighted option.  Also note the allowed \textit{Range} values above the box provided for keyins. There is also the \textit{format} window with private options.
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.8\linewidth]{images/audio-preset02.png}
-    \caption{FFmpeg wrench, audio preset and view options}
+    \includegraphics[width=1.0\linewidth]{audio-preset02.png}
+    \caption{FFmpeg wrench, audio preset, view and format options}
     \label{fig:audio-preset02}
 \end{figure}
 
 \section{The FFmpeg Image2 Streams}%
 \label{sec:ffmpeg_image2_streams}
+\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.
+AppImage does not provide this capability. 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}[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
@@ -325,10 +350,11 @@ The resulting directory of images can be opened for reading by simply opening th
 
 \section{Raw Input Opts File for Video/Audio}%
 \label{sec:raw_input_opts_video_audio}
+\index{ffmpeg!raw input options}
 
 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:
@@ -342,6 +368,7 @@ duration=90.25
 
 \section{FFmpeg Items of Note}%
 \label{sec:ffmpeg_items_note}
+\index{ffmpeg!notes}
 
 \begin{description}
     \item[Quality Option when rendering:] FFmpeg responds variably to the quality option in the render option but seems to respond well to bitrate. The subranges used by quality even seem to vary somewhat depending on how old the codec is. Some use $0$ to $35$, some use $0$ to $500$ or so.  The quality is supposed to cause the codec to output data until the noise level is below a limit determined by the quality setting. Your specific results may vary.