diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-04-08 12:58:56 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-04-17 22:34:05 +0200 |
commit | dcc1b3236168cc7baf97ae9074b9d1b90a03be9b (patch) | |
tree | bc73492f76a6312c297a8b0acf9e247fc0a4d360 /doc/filters.texi | |
parent | 565c50ac7b51112032cd48e81af4560cda72b5b0 (diff) | |
download | ffmpeg-dcc1b3236168cc7baf97ae9074b9d1b90a03be9b.tar.gz |
lavfi/select: add support for dynamic number of outputs
Diffstat (limited to 'doc/filters.texi')
-rw-r--r-- | doc/filters.texi | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index bc78492e72..adf6000935 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6721,10 +6721,20 @@ This filter accepts the following options: @table @option @item expr, e -An expression, which is evaluated for each input frame. If the expression is -evaluated to a non-zero value, the frame is selected and passed to the output, -otherwise it is discarded. +Set expression, which is evaluated for each input frame. +If the expression is evaluated to zero, the frame is discarded. + +If the evaluation result is negative or NaN, the frame is sent to the +first output; otherwise it is sent to the output with index +@code{ceil(val)-1}, assuming that the input index starts from 0. + +For example a value of @code{1.2} corresponds to the output with index +@code{ceil(1.2)-1 = 2-1 = 1}, that is the second output. + +@item outputs, n +Set the number of outputs. The output to which to send the selected +frame is based on the result of the evaluation. Default value is 1. @end table The expression can contain the following constants: @@ -6878,6 +6888,12 @@ ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 p Comparing @var{scene} against a value between 0.3 and 0.5 is generally a sane choice. + +@item +Send even and odd frames to separate outputs, and compose them: +@example +select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h +@end example @end itemize @section asendcmd, sendcmd |