diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-05-10 13:26:12 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-05-11 10:32:22 +0200 |
commit | edc05698aaab3b731087644225a20d63491d2f21 (patch) | |
tree | 855adfec09f2a455cd774d019afbb4e8ed2bd397 /doc/filters.texi | |
parent | a9705e4de9c069da18707c1a41aad8a60b287674 (diff) | |
download | ffmpeg-edc05698aaab3b731087644225a20d63491d2f21.tar.gz |
doc/filters: sort audio filters by name
Diffstat (limited to 'doc/filters.texi')
-rw-r--r-- | doc/filters.texi | 922 |
1 files changed, 464 insertions, 458 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 17c54c5e6c..af9dfcd0bf 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -347,282 +347,6 @@ aconvert=u8:auto @end example @end itemize -@section allpass - -Apply a two-pole all-pass filter with central frequency (in Hz) -@var{frequency}, and filter-width @var{width}. -An all-pass filter changes the audio's frequency to phase relationship -without changing its frequency to amplitude relationship. - -The filter accepts the following options: - -@table @option -@item frequency, f -Set frequency in Hz. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Specify the band-width of a filter in width_type units. -@end table - -@section highpass - -Apply a high-pass filter with 3dB point frequency. -The filter can be either single-pole, or double-pole (the default). -The filter roll off at 6dB per pole per octave (20dB per pole per decade). - -The filter accepts the following options: - -@table @option -@item frequency, f -Set frequency in Hz. Default is 3000. - -@item poles, p -Set number of poles. Default is 2. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Specify the band-width of a filter in width_type units. -Applies only to double-pole filter. -The default is 0.707q and gives a Butterworth response. -@end table - -@section lowpass - -Apply a low-pass filter with 3dB point frequency. -The filter can be either single-pole or double-pole (the default). -The filter roll off at 6dB per pole per octave (20dB per pole per decade). - -The filter accepts the following options: - -@table @option -@item frequency, f -Set frequency in Hz. Default is 500. - -@item poles, p -Set number of poles. Default is 2. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Specify the band-width of a filter in width_type units. -Applies only to double-pole filter. -The default is 0.707q and gives a Butterworth response. -@end table - -@section bass - -Boost or cut the bass (lower) frequencies of the audio using a two-pole -shelving filter with a response similar to that of a standard -hi-fi's tone-controls. This is also known as shelving equalisation (EQ). - -The filter accepts the following options: - -@table @option -@item gain, g -Give the gain at 0 Hz. Its useful range is about -20 -(for a large cut) to +20 (for a large boost). -Beware of clipping when using a positive gain. - -@item frequency, f -Set the filter's central frequency and so can be used -to extend or reduce the frequency range to be boosted or cut. -The default value is @code{100} Hz. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Determine how steep is the filter's shelf transition. -@end table - -@section treble - -Boost or cut treble (upper) frequencies of the audio using a two-pole -shelving filter with a response similar to that of a standard -hi-fi's tone-controls. This is also known as shelving equalisation (EQ). - -The filter accepts the following options: - -@table @option -@item gain, g -Give the gain at whichever is the lower of ~22 kHz and the -Nyquist frequency. Its useful range is about -20 (for a large cut) -to +20 (for a large boost). Beware of clipping when using a positive gain. - -@item frequency, f -Set the filter's central frequency and so can be used -to extend or reduce the frequency range to be boosted or cut. -The default value is @code{3000} Hz. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Determine how steep is the filter's shelf transition. -@end table - -@section bandpass - -Apply a two-pole Butterworth band-pass filter with central -frequency @var{frequency}, and (3dB-point) band-width width. -The @var{csg} option selects a constant skirt gain (peak gain = Q) -instead of the default: constant 0dB peak gain. -The filter roll off at 6dB per octave (20dB per decade). - -The filter accepts the following options: - -@table @option -@item frequency, f -Set the filter's central frequency. Default is @code{3000}. - -@item csg -Constant skirt gain if set to 1. Defaults to 0. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Specify the band-width of a filter in width_type units. -@end table - -@section bandreject - -Apply a two-pole Butterworth band-reject filter with central -frequency @var{frequency}, and (3dB-point) band-width @var{width}. -The filter roll off at 6dB per octave (20dB per decade). - -The filter accepts the following options: - -@table @option -@item frequency, f -Set the filter's central frequency. Default is @code{3000}. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Specify the band-width of a filter in width_type units. -@end table - -@section biquad - -Apply a biquad IIR filter with the given coefficients. -Where @var{b0}, @var{b1}, @var{b2} and @var{a0}, @var{a1}, @var{a2} -are the numerator and denominator coefficients respectively. - -@section equalizer - -Apply a two-pole peaking equalisation (EQ) filter. With this -filter, the signal-level at and around a selected frequency can -be increased or decreased, whilst (unlike bandpass and bandreject -filters) that at all other frequencies is unchanged. - -In order to produce complex equalisation curves, this filter can -be given several times, each with a different central frequency. - -The filter accepts the following options: - -@table @option -@item frequency, f -Set the filter's central frequency in Hz. - -@item width_type -Set method to specify band-width of filter. -@table @option -@item h -Hz -@item q -Q-Factor -@item o -octave -@item s -slope -@end table - -@item width, w -Specify the band-width of a filter in width_type units. - -@item gain, g -Set the required gain or attenuation in dB. -Beware of clipping when using a positive gain. -@end table - @section afade Apply fade-in/out effect to input audio. @@ -738,6 +462,36 @@ For example to force the output to either unsigned 8-bit or signed 16-bit stereo aformat=sample_fmts=u8|s16:channel_layouts=stereo @end example +@section allpass + +Apply a two-pole all-pass filter with central frequency (in Hz) +@var{frequency}, and filter-width @var{width}. +An all-pass filter changes the audio's frequency to phase relationship +without changing its frequency to amplitude relationship. + +The filter accepts the following options: + +@table @option +@item frequency, f +Set frequency in Hz. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Specify the band-width of a filter in width_type units. +@end table + @section amerge Merge two or more audio streams into a single multi-channel stream. @@ -1071,170 +825,8 @@ amovie=file.ogg [a] ; amovie=file.mp3 [b] ; [a2] [b2] amerge @end example -@section atempo - -Adjust audio tempo. - -The filter accepts exactly one parameter, the audio tempo. If not -specified then the filter will assume nominal 1.0 tempo. Tempo must -be in the [0.5, 2.0] range. - -@subsection Examples - -@itemize -@item -Slow down audio to 80% tempo: -@example -atempo=0.8 -@end example - -@item -To speed up audio to 125% tempo: -@example -atempo=1.25 -@end example -@end itemize - -@section earwax - -Make audio easier to listen to on headphones. - -This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio -so that when listened to on headphones the stereo image is moved from -inside your head (standard for headphones) to outside and in front of -the listener (standard for speakers). - -Ported from SoX. - -@section pan - -Mix channels with specific gain levels. The filter accepts the output -channel layout followed by a set of channels definitions. - -This filter is also designed to remap efficiently the channels of an audio -stream. - -The filter accepts parameters of the form: -"@var{l}:@var{outdef}:@var{outdef}:..." - -@table @option -@item l -output channel layout or number of channels - -@item outdef -output channel specification, of the form: -"@var{out_name}=[@var{gain}*]@var{in_name}[+[@var{gain}*]@var{in_name}...]" - -@item out_name -output channel to define, either a channel name (FL, FR, etc.) or a channel -number (c0, c1, etc.) - -@item gain -multiplicative coefficient for the channel, 1 leaving the volume unchanged - -@item in_name -input channel to use, see out_name for details; it is not possible to mix -named and numbered input channels -@end table - -If the `=' in a channel specification is replaced by `<', then the gains for -that specification will be renormalized so that the total is 1, thus -avoiding clipping noise. - -@subsection Mixing examples - -For example, if you want to down-mix from stereo to mono, but with a bigger -factor for the left channel: -@example -pan=1:c0=0.9*c0+0.1*c1 -@end example - -A customized down-mix to stereo that works automatically for 3-, 4-, 5- and -7-channels surround: -@example -pan=stereo: FL < FL + 0.5*FC + 0.6*BL + 0.6*SL : FR < FR + 0.5*FC + 0.6*BR + 0.6*SR -@end example - -Note that @command{ffmpeg} integrates a default down-mix (and up-mix) system -that should be preferred (see "-ac" option) unless you have very specific -needs. - -@subsection Remapping examples - -The channel remapping will be effective if, and only if: - -@itemize -@item gain coefficients are zeroes or ones, -@item only one input per channel output, -@end itemize - -If all these conditions are satisfied, the filter will notify the user ("Pure -channel mapping detected"), and use an optimized and lossless method to do the -remapping. - -For example, if you have a 5.1 source and want a stereo audio stream by -dropping the extra channels: -@example -pan="stereo: c0=FL : c1=FR" -@end example - -Given the same source, you can also switch front left and front right channels -and keep the input channel layout: -@example -pan="5.1: c0=c1 : c1=c0 : c2=c2 : c3=c3 : c4=c4 : c5=c5" -@end example - -If the input is a stereo audio stream, you can mute the front left channel (and -still keep the stereo channel layout) with: -@example -pan="stereo:c1=c1" -@end example - -Still with a stereo audio stream input, you can copy the right channel in both -front left and right: -@example -pan="stereo: c0=FR : c1=FR" -@end example - -@section silencedetect - -Detect silence in an audio stream. - -This filter logs a message when it detects that the input audio volume is less -or equal to a noise tolerance value for a duration greater or equal to the -minimum detected noise duration. - -The printed times and duration are expressed in seconds. - -The filter accepts the following options: - -@table @option -@item duration, d -Set silence duration until notification (default is 2 seconds). - -@item noise, n -Set noise tolerance. Can be specified in dB (in case "dB" is appended to the -specified value) or amplitude ratio. Default is -60dB, or 0.001. -@end table - -@subsection Examples - -@itemize -@item -Detect 5 seconds of silence with -50dB noise tolerance: -@example -silencedetect=n=-50dB:d=5 -@end example - -@item -Complete example with @command{ffmpeg} to detect silence with 0.0001 noise -tolerance in @file{silence.mp3}: -@example -ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null - -@end example -@end itemize - @section asyncts + Synchronize audio data with timestamps by squeezing/stretching it and/or dropping samples/adding silence when needed. @@ -1266,7 +858,32 @@ with a negative pts due to encoder delay. @end table +@section atempo + +Adjust audio tempo. + +The filter accepts exactly one parameter, the audio tempo. If not +specified then the filter will assume nominal 1.0 tempo. Tempo must +be in the [0.5, 2.0] range. + +@subsection Examples + +@itemize +@item +Slow down audio to 80% tempo: +@example +atempo=0.8 +@end example + +@item +To speed up audio to 125% tempo: +@example +atempo=1.25 +@end example +@end itemize + @section atrim + Trim the input so that the output contains one continuous subpart of the input. This filter accepts the following options: @@ -1330,32 +947,113 @@ ffmpeg -i INPUT -af atrim=end_sample=1000 @end itemize -@section channelsplit -Split each channel in input audio stream into a separate output stream. +@section bandpass + +Apply a two-pole Butterworth band-pass filter with central +frequency @var{frequency}, and (3dB-point) band-width width. +The @var{csg} option selects a constant skirt gain (peak gain = Q) +instead of the default: constant 0dB peak gain. +The filter roll off at 6dB per octave (20dB per decade). + +The filter accepts the following options: -This filter accepts the following named parameters: @table @option -@item channel_layout -Channel layout of the input stream. Default is "stereo". +@item frequency, f +Set the filter's central frequency. Default is @code{3000}. + +@item csg +Constant skirt gain if set to 1. Defaults to 0. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope @end table -For example, assuming a stereo input MP3 file -@example -ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv -@end example -will create an output Matroska file with two audio streams, one containing only -the left channel and the other the right channel. +@item width, w +Specify the band-width of a filter in width_type units. +@end table -To split a 5.1 WAV file into per-channel files -@example -ffmpeg -i in.wav -filter_complex -'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]' --map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]' -front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]' -side_right.wav -@end example +@section bandreject + +Apply a two-pole Butterworth band-reject filter with central +frequency @var{frequency}, and (3dB-point) band-width @var{width}. +The filter roll off at 6dB per octave (20dB per decade). + +The filter accepts the following options: + +@table @option +@item frequency, f +Set the filter's central frequency. Default is @code{3000}. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Specify the band-width of a filter in width_type units. +@end table + +@section bass + +Boost or cut the bass (lower) frequencies of the audio using a two-pole +shelving filter with a response similar to that of a standard +hi-fi's tone-controls. This is also known as shelving equalisation (EQ). + +The filter accepts the following options: + +@table @option +@item gain, g +Give the gain at 0 Hz. Its useful range is about -20 +(for a large cut) to +20 (for a large boost). +Beware of clipping when using a positive gain. + +@item frequency, f +Set the filter's central frequency and so can be used +to extend or reduce the frequency range to be boosted or cut. +The default value is @code{100} Hz. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Determine how steep is the filter's shelf transition. +@end table + +@section biquad + +Apply a biquad IIR filter with the given coefficients. +Where @var{b0}, @var{b1}, @var{b2} and @var{a0}, @var{a1}, @var{a2} +are the numerator and denominator coefficients respectively. @section channelmap + Remap input channels to new locations. This filter accepts the following named parameters: @@ -1388,7 +1086,116 @@ To fix a 5.1 WAV improperly encoded in AAC's native channel order ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:channel_layout=5.1' out.wav @end example +@section channelsplit + +Split each channel in input audio stream into a separate output stream. + +This filter accepts the following named parameters: +@table @option +@item channel_layout +Channel layout of the input stream. Default is "stereo". +@end table + +For example, assuming a stereo input MP3 file +@example +ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv +@end example +will create an output Matroska file with two audio streams, one containing only +the left channel and the other the right channel. + +To split a 5.1 WAV file into per-channel files +@example +ffmpeg -i in.wav -filter_complex +'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]' +-map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]' +front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]' +side_right.wav +@end example + +@section earwax + +Make audio easier to listen to on headphones. + +This filter adds `cues' to 44.1kHz stereo (i.e. audio CD format) audio +so that when listened to on headphones the stereo image is moved from +inside your head (standard for headphones) to outside and in front of +the listener (standard for speakers). + +Ported from SoX. + +@section equalizer + +Apply a two-pole peaking equalisation (EQ) filter. With this +filter, the signal-level at and around a selected frequency can +be increased or decreased, whilst (unlike bandpass and bandreject +filters) that at all other frequencies is unchanged. + +In order to produce complex equalisation curves, this filter can +be given several times, each with a different central frequency. + +The filter accepts the following options: + +@table @option +@item frequency, f +Set the filter's central frequency in Hz. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Specify the band-width of a filter in width_type units. + +@item gain, g +Set the required gain or attenuation in dB. +Beware of clipping when using a positive gain. +@end table + +@section highpass + +Apply a high-pass filter with 3dB point frequency. +The filter can be either single-pole, or double-pole (the default). +The filter roll off at 6dB per pole per octave (20dB per pole per decade). + +The filter accepts the following options: + +@table @option +@item frequency, f +Set frequency in Hz. Default is 3000. + +@item poles, p +Set number of poles. Default is 2. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Specify the band-width of a filter in width_type units. +Applies only to double-pole filter. +The default is 0.707q and gives a Butterworth response. +@end table + @section join + Join multiple input streams into one multi-channel stream. The filter accepts the following named parameters: @@ -1425,10 +1232,209 @@ ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex out @end example +@section lowpass + +Apply a low-pass filter with 3dB point frequency. +The filter can be either single-pole or double-pole (the default). +The filter roll off at 6dB per pole per octave (20dB per pole per decade). + +The filter accepts the following options: + +@table @option +@item frequency, f +Set frequency in Hz. Default is 500. + +@item poles, p +Set number of poles. Default is 2. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Specify the band-width of a filter in width_type units. +Applies only to double-pole filter. +The default is 0.707q and gives a Butterworth response. +@end table + +@section pan + +Mix channels with specific gain levels. The filter accepts the output +channel layout followed by a set of channels definitions. + +This filter is also designed to remap efficiently the channels of an audio +stream. + +The filter accepts parameters of the form: +"@var{l}:@var{outdef}:@var{outdef}:..." + +@table @option +@item l +output channel layout or number of channels + +@item outdef +output channel specification, of the form: +"@var{out_name}=[@var{gain}*]@var{in_name}[+[@var{gain}*]@var{in_name}...]" + +@item out_name +output channel to define, either a channel name (FL, FR, etc.) or a channel +number (c0, c1, etc.) + +@item gain +multiplicative coefficient for the channel, 1 leaving the volume unchanged + +@item in_name +input channel to use, see out_name for details; it is not possible to mix +named and numbered input channels +@end table + +If the `=' in a channel specification is replaced by `<', then the gains for +that specification will be renormalized so that the total is 1, thus +avoiding clipping noise. + +@subsection Mixing examples + +For example, if you want to down-mix from stereo to mono, but with a bigger +factor for the left channel: +@example +pan=1:c0=0.9*c0+0.1*c1 +@end example + +A customized down-mix to stereo that works automatically for 3-, 4-, 5- and +7-channels surround: +@example +pan=stereo: FL < FL + 0.5*FC + 0.6*BL + 0.6*SL : FR < FR + 0.5*FC + 0.6*BR + 0.6*SR +@end example + +Note that @command{ffmpeg} integrates a default down-mix (and up-mix) system +that should be preferred (see "-ac" option) unless you have very specific +needs. + +@subsection Remapping examples + +The channel remapping will be effective if, and only if: + +@itemize +@item gain coefficients are zeroes or ones, +@item only one input per channel output, +@end itemize + +If all these conditions are satisfied, the filter will notify the user ("Pure +channel mapping detected"), and use an optimized and lossless method to do the +remapping. + +For example, if you have a 5.1 source and want a stereo audio stream by +dropping the extra channels: +@example +pan="stereo: c0=FL : c1=FR" +@end example + +Given the same source, you can also switch front left and front right channels +and keep the input channel layout: +@example +pan="5.1: c0=c1 : c1=c0 : c2=c2 : c3=c3 : c4=c4 : c5=c5" +@end example + +If the input is a stereo audio stream, you can mute the front left channel (and +still keep the stereo channel layout) with: +@example +pan="stereo:c1=c1" +@end example + +Still with a stereo audio stream input, you can copy the right channel in both +front left and right: +@example +pan="stereo: c0=FR : c1=FR" +@end example + @section resample + Convert the audio sample format, sample rate and channel layout. This filter is not meant to be used directly. +@section silencedetect + +Detect silence in an audio stream. + +This filter logs a message when it detects that the input audio volume is less +or equal to a noise tolerance value for a duration greater or equal to the +minimum detected noise duration. + +The printed times and duration are expressed in seconds. + +The filter accepts the following options: + +@table @option +@item duration, d +Set silence duration until notification (default is 2 seconds). + +@item noise, n +Set noise tolerance. Can be specified in dB (in case "dB" is appended to the +specified value) or amplitude ratio. Default is -60dB, or 0.001. +@end table + +@subsection Examples + +@itemize +@item +Detect 5 seconds of silence with -50dB noise tolerance: +@example +silencedetect=n=-50dB:d=5 +@end example + +@item +Complete example with @command{ffmpeg} to detect silence with 0.0001 noise +tolerance in @file{silence.mp3}: +@example +ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null - +@end example +@end itemize + +@section treble + +Boost or cut treble (upper) frequencies of the audio using a two-pole +shelving filter with a response similar to that of a standard +hi-fi's tone-controls. This is also known as shelving equalisation (EQ). + +The filter accepts the following options: + +@table @option +@item gain, g +Give the gain at whichever is the lower of ~22 kHz and the +Nyquist frequency. Its useful range is about -20 (for a large cut) +to +20 (for a large boost). Beware of clipping when using a positive gain. + +@item frequency, f +Set the filter's central frequency and so can be used +to extend or reduce the frequency range to be boosted or cut. +The default value is @code{3000} Hz. + +@item width_type +Set method to specify band-width of filter. +@table @option +@item h +Hz +@item q +Q-Factor +@item o +octave +@item s +slope +@end table + +@item width, w +Determine how steep is the filter's shelf transition. +@end table + @section volume Adjust the input audio volume. |