]> git.sesse.net Git - ffmpeg/blobdiff - doc/filters.texi
lavfi/overlay: implement shortest option
[ffmpeg] / doc / filters.texi
index e7661f66497e595fe3ea6ed23bb445895881720a..6b7ee89ac38c1447eb6aa9e34db120e414f7c58b 100644 (file)
@@ -2063,17 +2063,21 @@ playback.
 
 @section decimate
 
-This filter drops frames that do not differ greatly from the previous
-frame in order to reduce framerate.  The main use of this filter is
-for very-low-bitrate encoding (e.g. streaming over dialup modem), but
-it could in theory be used for fixing movies that were
-inverse-telecined incorrectly.
+Drop frames that do not differ greatly from the previous frame in
+order to reduce framerate.
 
-It accepts the following parameters:
-@var{max}:@var{hi}:@var{lo}:@var{frac}.
+The main use of this filter is for very-low-bitrate encoding
+(e.g. streaming over dialup modem), but it could in theory be used for
+fixing movies that were inverse-telecined incorrectly.
 
-@table @option
+The filter accepts parameters as a list of @var{key}=@var{value}
+pairs, separated by ":". If the key of the first options is omitted,
+the arguments are interpreted according to the syntax:
+@option{max}:@option{hi}:@option{lo}:@option{frac}.
 
+A description of the accepted options follows.
+
+@table @option
 @item max
 Set the maximum number of consecutive frames which can be dropped (if
 positive), or the minimum interval between dropped frames (if
@@ -2082,20 +2086,22 @@ number of previous sequentially dropped frames.
 
 Default value is 0.
 
-@item hi, lo, frac
+@item hi
+@item lo
+@item frac
 Set the dropping threshold values.
 
-Values for @var{hi} and @var{lo} are for 8x8 pixel blocks and
+Values for @option{hi} and @option{lo} are for 8x8 pixel blocks and
 represent actual pixel value differences, so a threshold of 64
 corresponds to 1 unit of difference for each pixel, or the same spread
 out differently over the block.
 
 A frame is a candidate for dropping if no 8x8 blocks differ by more
-than a threshold of @var{hi}, and if no more than @var{frac} blocks (1
-meaning the whole image) differ by more than a threshold of @var{lo}.
+than a threshold of @option{hi}, and if no more than @option{frac} blocks (1
+meaning the whole image) differ by more than a threshold of @option{lo}.
 
-Default value for @var{hi} is 64*12, default value for @var{lo} is
-64*5, and default value for @var{frac} is 0.33.
+Default value for @option{hi} is 64*12, default value for @option{lo} is
+64*5, and default value for @option{frac} is 0.33.
 @end table
 
 @section delogo
@@ -3875,6 +3881,10 @@ same as @var{overlay_w} and @var{overlay_h}
 @item rgb
 If set to 1, force the filter to accept inputs in the RGB
 color space. Default value is 0.
+
+@item shortest
+If set to 1, force the output to terminate when the shortest input
+terminates. Default value is 0.
 @end table
 
 Be aware that frames are taken from each input video in timestamp
@@ -3934,6 +3944,18 @@ The above command is the same as:
 ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
 @end example
 
+@item
+Compose output by putting two input videos side to side:
+@example
+ffmpeg -i left.avi -i right.avi -filter_complex "
+nullsrc=size=200x100 [background];
+[0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
+[1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
+[background][left]       overlay=shortest=1       [background+left];
+[background+left][right] overlay=shortest=1:x=100 [left+right]
+"
+@end example
+
 @item
 Chain several overlays in cascade:
 @example