[FFmpeg-trac] #2495(avutil:open): Better filter help

FFmpeg trac at avcodec.org
Wed Apr 24 19:56:22 CEST 2013


#2495: Better filter help
----------------------------------------+----------------------------------
             Reporter:  jbvsmo          |                    Owner:
                 Type:  enhancement     |                   Status:  open
             Priority:  wish            |                Component:  avutil
              Version:  git-master      |               Resolution:
             Keywords:  option default  |               Blocked By:
             Blocking:                  |  Reproduced by developer:  1
Analyzed by developer:  1               |
----------------------------------------+----------------------------------
Changes (by saste):

 * analyzed:  0 => 1
 * keywords:   => option default
 * status:  new => open
 * component:  documentation => avutil
 * reproduced:  0 => 1


Comment:

 Replying to [ticket:2495 jbvsmo]:
 > Is it possible to add default values of filters in the help option?
 Also, some data is missing, like ranges in options that accept
 expressions.

 An expression is just a string, so in general you can't specify a range in
 the option definition.

 >
 >
 > This is the help for e.g. Hue filter:
 > {{{
 > hue AVOptions:
 >   h       <string>     ..FV.. set the hue angle degrees expression
 >   s       <string>     ..FV.. set the saturation expression
 >   H       <string>     ..FV.. set the hue angle radians expression
 > }}}
 >
 >
 > While this is the man page (despite not being updated and show "float"
 instead of "expression", it has the range information and default value):
 > {{{
 >
 > hue
 >    Modify the hue and/or the saturation of the input.
 >    This filter accepts the following options:
 >    h   Specify the hue angle as a number of degrees. It accepts an
 expression, and defaults to "0".
 >    s   Specify the saturation in the [-10,10] range. It accepts a float
 number and defaults to "1".
 >    H   Specify the hue angle as a number of radians. It accepts a float
 number or an expression, and defaults to "0".
 > }}}

 Fixed.

 >
 > The filter options that take int or double do have the range, but not
 the default value. E.g:
 > {{{
 > c1_strength   <int>    ..FV.. set component #1 strength (from 0 to 100)
 > }}}
 >
 >
 > So, it would be nice to have these values in the help option because
 they will not suffer from code changes (because the values come from the
 code) and are easier to use. Example:
 >
 > {{{
 > hue AVOptions:
 >   h    <string>   ..FV.. set the hue angle degrees expression (default:
 0)
 >   s    <string>   ..FV.. set the saturation expression (from -10 to 10,
 default: 1)
 >   H    <string>   ..FV.. set the hue angle radians expression (default:
 0)
 > }}}

 Yes, this could be changed for all options (not only filter options).

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2495#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list