]> git.sesse.net Git - ffmpeg/blobdiff - doc/filters.texi
Merge commit '41ed749fe987e60b0485fa721ad869590651324d'
[ffmpeg] / doc / filters.texi
index e94ec40fc79db6cf47481bfc019fe48f1d0e6087..0b5d898394cfd57a2797ca4341a5f0684d080505 100644 (file)
@@ -1817,6 +1817,23 @@ equalizer=f=1000:width_type=q:width=1:g=2,equalizer=f=100:width_type=q:width=2:g
 @end example
 @end itemize
 
+@section extrastereo
+
+Linearly increases the difference between left and right channels which
+adds some sort of "live" effect to playback.
+
+The filter accepts the following option:
+
+@table @option
+@item m
+Sets the difference coefficient (default: 2.5). 0.0 means mono sound
+(average of both channels), with 1.0 sound will be unchanged, with
+-1.0 left and right channels will be swapped.
+
+@item c
+Enable clipping. By default is enabled.
+@end table
+
 @section flanger
 Apply a flanging effect to the audio.
 
@@ -2857,7 +2874,26 @@ Specify the sample rate, default is 44100.
 Specify the duration of the generated audio stream.
 
 @item samples_per_frame
-Set the number of samples per output frame, default is 1024.
+Set the number of samples per output frame.
+
+The expression can contain the following constants:
+
+@table @option
+@item n
+The (sequential) number of the output audio frame, starting from 0.
+
+@item pts
+The PTS (Presentation TimeStamp) of the output audio frame,
+expressed in @var{TB} units.
+
+@item t
+The PTS of the output audio frame, expressed in seconds.
+
+@item TB
+The timebase of the output audio frames.
+@end table
+
+Default is @code{1024}.
 @end table
 
 @subsection Examples
@@ -2878,6 +2914,12 @@ sine=f=220:b=4:d=5
 sine=frequency=220:beep_factor=4:duration=5
 @end example
 
+@item
+Generate a 1 kHz sine wave following @code{1602,1601,1602,1601,1602} NTSC
+pattern:
+@example
+sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
+@end example
 @end itemize
 
 @c man end AUDIO SOURCES
@@ -3911,7 +3953,7 @@ Can be used in addition to the other key points component
 options. In this case, the unset component(s) will fallback on this
 @option{all} setting.
 @item psfile
-Specify a Photoshop curves file (@code{.asv}) to import the settings from.
+Specify a Photoshop curves file (@code{.acv}) to import the settings from.
 @end table
 
 To avoid some filtergraph syntax conflicts, each key points list need to be
@@ -3956,7 +3998,7 @@ curves=vintage
 @item
 Use a Photoshop preset and redefine the points of the green component:
 @example
-curves=psfile='MyCurvesPresets/purple.asv':green='0.45/0.53'
+curves=psfile='MyCurvesPresets/purple.acv':green='0.45/0.53'
 @end example
 @end itemize
 
@@ -4496,6 +4538,9 @@ Replace old columns with new ones.
 
 @item scroll
 Scroll from right to left.
+
+@item rscroll
+Scroll from left to right.
 @end table
 
 Default is @code{frame}.
@@ -5279,6 +5324,10 @@ computation time. Default value is 1.
 Set a random seed, must be an integer included between 0 and
 UINT32_MAX. If not specified, or if explicitly set to -1, the filter
 will try to use a good random seed on a best effort basis.
+
+@item pal8
+Set pal8 output pixel format. This option does not work with codebook
+length greater than 256.
 @end table
 
 @section fade
@@ -5476,8 +5525,9 @@ which @code{fieldmatch} is based on. While the semantic and usage are very
 close, some behaviour and options names can differ.
 
 The @ref{decimate} filter currently only works for constant frame rate input.
-Do not use @code{fieldmatch} and @ref{decimate} if your input has mixed
-telecined and progressive content with changing framerate.
+If your input has mixed telecined (30fps) and progressive content with a lower
+framerate like 24fps use the following filterchain to produce the necessary cfr
+stream: @code{dejudder,fps=30000/1001,fieldmatch,decimate}.
 
 The filter accepts the following options:
 
@@ -6015,6 +6065,51 @@ ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
 ffmpeg -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT
 @end example
 
+@section framerate
+
+Change the frame rate by interpolating new video output frames from the source
+frames.
+
+This filter is not designed to function correctly with interlaced media. If
+you wish to change the frame rate of interlaced media then you are required
+to deinterlace before this filter and re-interlace after this filter.
+
+A description of the accepted options follows.
+
+@table @option
+@item fps
+Specify the output frames per second. This option can also be specified
+as a value alone. The default is @code{50}.
+
+@item interp_start
+Specify the start of a range where the output frame will be created as a
+linear interpolation of two frames. The range is [@code{0}-@code{255}],
+the default is @code{15}.
+
+@item interp_end
+Specify the end of a range where the output frame will be created as a
+linear interpolation of two frames. The range is [@code{0}-@code{255}],
+the default is @code{240}.
+
+@item scene
+Specify the level at which a scene change is detected as a value between
+0 and 100 to indicate a new scene; a low value reflects a low
+probability for the current frame to introduce a new scene, while a higher
+value means the current frame is more likely to be one.
+The default is @code{7}.
+
+@item flags
+Specify flags influencing the filter process.
+
+Available value for @var{flags} is:
+
+@table @option
+@item scene_change_detect, scd
+Enable scene change detection using the value of the option @var{scene}.
+This flag is enabled by default.
+@end table
+@end table
+
 @section framestep
 
 Select one frame every N-th frame.
@@ -6589,6 +6684,21 @@ Set the scaling dimension: @code{2} for @code{hq2x}, @code{3} for
 Default is @code{3}.
 @end table
 
+@section hstack
+Stack input videos horizontally.
+
+All streams must be of same pixel format and of same height.
+
+Note that this filter is faster than using @ref{overlay} and @ref{pad} filter
+to create same output.
+
+The filter accept the following option:
+
+@table @option
+@item nb_inputs
+Set number of input streams. Default is 2.
+@end table
+
 @section hue
 
 Modify the hue and/or the saturation of the input.
@@ -7736,6 +7846,7 @@ Set chroma strength.
 Must be a double value in the range 0-1000, default is @code{1.0}.
 @end table
 
+@anchor{pad}
 @section pad
 
 Add paddings to the input image, and place the original input at the
@@ -9722,6 +9833,12 @@ alternating frames (left eye first, right eye second)
 @item ar
 alternating frames (right eye first, left eye second)
 
+@item irl
+interleaved rows (left eye has top row, right eye starts on next row)
+
+@item irr
+interleaved rows (right eye has top row, left eye starts on next row)
+
 Default value is @samp{sbsl}.
 @end table
 
@@ -9786,17 +9903,23 @@ anaglyph yellow/blue colored
 anaglyph yellow/blue color optimized with the least squares projection of dubois
 (yellow filter on left eye, blue filter on right eye)
 
-@item irl
-interleaved rows (left eye has top row, right eye starts on next row)
-
-@item irr
-interleaved rows (right eye has top row, left eye starts on next row)
-
 @item ml
 mono output (left eye only)
 
 @item mr
 mono output (right eye only)
+
+@item chl
+checkerboard, left eye first
+
+@item chr
+checkerboard, right eye first
+
+@item icl
+interleaved columns, left eye first
+
+@item icr
+interleaved columns, right eye first
 @end table
 
 Default value is @samp{arcd}.
@@ -9878,6 +10001,10 @@ was composed. For the syntax of this option, check the
 Due to a misdesign in ASS aspect ratio arithmetic, this is necessary to
 correctly scale the fonts if the aspect ratio has been changed.
 
+@item fontsdir
+Set a directory path containing fonts that can be used by the filter.
+These fonts will be used in addition to whatever the font provider uses.
+
 @item charenc
 Set subtitles input character encoding. @code{subtitles} filter only. Only
 useful if not UTF-8.
@@ -10497,6 +10624,69 @@ Force a constant quantization parameter. If not set, the filter will use the QP
 from the video stream (if available).
 @end table
 
+@section vectorscope
+
+Display 2 color component values in the two dimensional graph (which is called
+a vectorscope).
+
+This filter accepts the following options:
+
+@table @option
+@item mode, m
+Set vectorscope mode.
+
+It accepts the following values:
+@table @samp
+@item gray
+Gray values are displayed on graph, higher brightness means more pixels have
+same component color value on location in graph. This is the default mode.
+
+@item color
+Gray values are displayed on graph. Surrounding pixels values which are not
+present in video frame are drawn in gradient of 2 color components which are
+set by option @code{x} and @code{y}.
+
+@item color2
+Actual color components values present in video frame are displayed on graph.
+
+@item color3
+Similar as color2 but higher frequency of same values @code{x} and @code{y}
+on graph increases value of another color component, which is luminance by
+default values of @code{x} and @code{y}.
+
+@item color4
+Actual colors present in video frame are displayed on graph. If two different
+colors map to same position on graph then color with higher value of component
+not present in graph is picked.
+@end table
+
+@item x
+Set which color component will be represented on X-axis. Default is @code{1}.
+
+@item y
+Set which color component will be represented on Y-axis. Default is @code{2}.
+
+@item intensity, i
+Set intensity, used by modes: gray, color and color3 for increasing brightness
+of color component which represents frequency of (X, Y) location in graph.
+
+@item envelope, e
+@table @samp
+@item none
+No envelope, this is default.
+
+@item instant
+Instant envelope, even darkest single pixel will be clearly highlighted.
+
+@item peak
+Hold maximum and minimum values presented in graph over time. This way you
+can still spot out of range values without constantly looking at vectorscope.
+
+@item peak+instant
+Peak and instant envelope combined together.
+@end table
+@end table
+
 @anchor{vidstabdetect}
 @section vidstabdetect
 
@@ -10850,6 +11040,21 @@ vignette='PI/4+random(1)*PI/50':eval=frame
 
 @end itemize
 
+@section vstack
+Stack input videos vertically.
+
+All streams must be of same pixel format and of same width.
+
+Note that this filter is faster than using @ref{overlay} and @ref{pad} filter
+to create same output.
+
+The filter accept the following option:
+
+@table @option
+@item nb_inputs
+Set number of input streams. Default is 2.
+@end table
+
 @section w3fdif
 
 Deinterlace the input video ("w3fdif" stands for "Weston 3 Field
@@ -10889,6 +11094,103 @@ Only deinterlace frames marked as interlaced.
 Default value is @samp{all}.
 @end table
 
+@section waveform
+Video waveform monitor.
+
+The waveform monitor plots color component intensity. By default luminance
+only. Each column of the waveform corresponds to a column of pixels in the
+source video.
+
+It accepts the following options:
+
+@table @option
+@item mode, m
+Can be either @code{row}, or @code{column}. Default is @code{column}.
+In row mode, the graph on the left side represents color component value 0 and
+the right side represents value = 255. In column mode, the top side represents
+color component value = 0 and bottom side represents value = 255.
+
+@item intensity, i
+Set intensity. Smaller values are useful to find out how many values of the same
+luminance are distributed across input rows/columns.
+Default value is @code{0.04}. Allowed range is [0, 1].
+
+@item mirror, r
+Set mirroring mode. @code{0} means unmirrored, @code{1} means mirrored.
+In mirrored mode, higher values will be represented on the left
+side for @code{row} mode and at the top for @code{column} mode. Default is
+@code{1} (mirrored).
+
+@item display, d
+Set display mode.
+It accepts the following values:
+@table @samp
+@item overlay
+Presents information identical to that in the @code{parade}, except
+that the graphs representing color components are superimposed directly
+over one another.
+
+This display mode makes it easier to spot relative differences or similarities
+in overlapping areas of the color components that are supposed to be identical,
+such as neutral whites, grays, or blacks.
+
+@item parade
+Display separate graph for the color components side by side in
+@code{row} mode or one below the other in @code{column} mode.
+
+Using this display mode makes it easy to spot color casts in the highlights
+and shadows of an image, by comparing the contours of the top and the bottom
+graphs of each waveform. Since whites, grays, and blacks are characterized
+by exactly equal amounts of red, green, and blue, neutral areas of the picture
+should display three waveforms of roughly equal width/height. If not, the
+correction is easy to perform by making level adjustments the three waveforms.
+@end table
+Default is @code{parade}.
+
+@item components, c
+Set which color components to display. Default is 1, which means only luminance
+or red color component if input is in RGB colorspace. If is set for example to
+7 it will display all 3 (if) available color components.
+
+@item envelope, e
+@table @samp
+@item none
+No envelope, this is default.
+
+@item instant
+Instant envelope, minimum and maximum values presented in graph will be easily
+visible even with small @code{step} value.
+
+@item peak
+Hold minimum and maximum values presented in graph across time. This way you
+can still spot out of range values without constantly looking at waveforms.
+
+@item peak+instant
+Peak and instant envelope combined together.
+@end table
+
+@item filter, f
+@table @samp
+@item lowpass
+No filtering, this is default.
+
+@item flat
+Luma and chroma combined together.
+
+@item aflat
+Similar as above, but shows difference between blue and red chroma.
+
+@item chroma
+Displays only chroma.
+
+@item achroma
+Similar as above, but shows difference between blue and red chroma.
+
+@item color
+Displays actual color value on waveform.
+@end table
+@end table
+
 @section xbr
 Apply the xBR high-quality magnification filter which is designed for pixel
 art. It follows a set of edge-detection rules, see
@@ -11528,6 +11830,7 @@ ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_c
 @end example
 @end itemize
 
+@anchor{allrgb}
 @anchor{allyuv}
 @anchor{color}
 @anchor{haldclutsrc}
@@ -11536,7 +11839,9 @@ ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_c
 @anchor{smptebars}
 @anchor{smptehdbars}
 @anchor{testsrc}
-@section allyuv, color, haldclutsrc, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc
+@section allrgb, allyuv, color, haldclutsrc, nullsrc, rgbtestsrc, smptebars, smptehdbars, testsrc
+
+The @code{allrgb} source returns frames of size 4096x4096 of all rgb colors.
 
 The @code{allyuv} source returns frames of size 4096x4096 of all yuv colors.
 
@@ -12704,6 +13009,121 @@ gamma=2:gamma2=2
 
 @end itemize
 
+@section showfreqs
+
+Convert input audio to video output representing the audio power spectrum.
+Audio amplitude is on Y-axis while frequency is on X-axis.
+
+The filter accepts the following options:
+
+@table @option
+@item size, s
+Specify size of video. For the syntax of this option, check the
+@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}.
+Default is @code{1024x512}.
+
+@item mode
+Set display mode.
+This set how each frequency bin will be represented.
+
+It accepts the following values:
+@table @samp
+@item line
+@item bar
+@item dot
+@end table
+Default is @code{bar}.
+
+@item ascale
+Set amplitude scale.
+
+It accepts the following values:
+@table @samp
+@item lin
+Linear scale.
+
+@item sqrt
+Square root scale.
+
+@item cbrt
+Cubic root scale.
+
+@item log
+Logarithmic scale.
+@end table
+Default is @code{log}.
+
+@item fscale
+Set frequency scale.
+
+It accepts the following values:
+@table @samp
+@item lin
+Linear scale.
+
+@item log
+Logarithmic scale.
+
+@item rlog
+Reverse logarithmic scale.
+@end table
+Default is @code{lin}.
+
+@item win_size
+Set window size.
+
+It accepts the following values:
+@table @samp
+@item w16
+@item w32
+@item w64
+@item w128
+@item w256
+@item w512
+@item w1024
+@item w2048
+@item w4096
+@item w8192
+@item w16384
+@item w32768
+@item w65536
+@end table
+Default is @code{w2048}
+
+@item win_func
+Set windowing function.
+
+It accepts the following values:
+@table @samp
+@item rect
+@item bartlett
+@item hanning
+@item hamming
+@item blackman
+@item welch
+@item flattop
+@item bharris
+@item bnuttall
+@item bhann
+@item sine
+@item nuttall
+@end table
+Default is @code{hanning}.
+
+@item overlap
+Set window overlap. In range @code{[0, 1]}. Default is @code{1},
+which means optimal overlap for selected window function will be picked.
+
+@item averaging
+Set time averaging. Setting this to 0 will display current maximal peaks.
+Default is @code{1}, which means time averaging is disabled.
+
+@item color
+Specify list of colors separated by space or by '|' which will be used to
+draw channel frequencies. Unrecognized or missing colors will be replaced
+by white color.
+@end table
+
 @section showspectrum
 
 Convert input audio to a video output, representing the audio frequency