[MPlayer-dev-eng] Announce of Movieconvert

Diego Biurrun diego at biurrun.de
Mon Jun 14 10:40:52 CEST 2004


nix.wie.weg at gmx.de writes:
> 
> Diego Biurrun wrote:
> 
> >You are mixing up options, suboptions/parameters and filters.
> >
> >  -vf scale_w=width,scale_h=height,sws=1
> >
> >would build up a filter chain, calling first the "scale_w" filter with
> >"width" as parameter, then the "scale_h" filter with height as
> >parameter and finally the sws filter with "1" as parameter.  Thus
> >
> >  -vf crop_w=width,crop_h=height,crop_x=x,crop_y=y
> >
> >would call four filters with one argument, while
> >
> >  -vf crop=width:height:x:y
> >
> >calls one filter with four arguments.
> >
> Ok maybe I was not clear enough:
> First we define everything starting with an "-" is an option and can 
> have suboptions and second we have filter. So my problems still remain:
> 
> 1. Why are such things like -sws or -ofps options? They should be 
> suboptions.

Feel free to send a patch ;-)

> 2. Why are filter seperated by ",", while suboptions are seperated by ":"

If you'd have a close look at the VIDEO FILTER section of the man page
again, you will see that filters have parameters (suboptions if you
will) that do get separated by ",".

> 3. You maybe right with your argument, that my written filter syntax 
> would call 4 different filter, but that wasn't the point. Maybe the 
> Syntax should be more like this -vf 
> crop_w=width:crop_h=height:crop_x=x:crop_y=y;scale_w=width:scale_h=height;...  
> (note the ";" between crop and scale options)
> The advantage is simply that the second syntax can be generated, while 
> the syntax which is used now can not, which means you have to write one 
> function (or one if clause) per filter/option/suboption ...

Some filters support named parameters, just not all do.  From the
manual page:

  With filters that support it, you can access parameters by their
  name.

  -vf <filter>=help
    Prints the parameter names and parameter value ranges for a par-
    ticular filter.

  -vf <filter=named_parameter1=value1[:named_parameter2=value2:...]>
    Sets a named parameter to the given value.  Use on and off or yes
    and no to set flag parameters.

Isn't that precisely what you have in mind?

Diego




More information about the MPlayer-dev-eng mailing list