On Wed, May 15, 2019 at 11:23 PM Michael Niedermayer
<mich...@niedermayer.cc> wrote:
>
> On Wed, May 15, 2019 at 11:13:57PM +0200, Werner Robitza wrote:
> > On Wed, May 15, 2019 at 4:55 PM Gyan <ffm...@gyani.pro> wrote:
> > > On 15-05-2019 05:06 PM, Werner Robitza wrote:
> > > > On Wed, May 15, 2019 at 11:36 AM Gyan <ffm...@gyani.pro> wrote:
> > > >> Which lines in the CLI help?
> > > > SWScaler AVOptions:
> > > >    -sws_flags         <flags>      E..V..... scaler flags (default 
> > > > bicubic)
> > > >     ...
> > > >    -src_format        <pix_fmt>    E..V..... source format (default 
> > > > yuv420p)
> > > >    -dst_format        <pix_fmt>    E..V..... destination format 
> > > > (default yuv420p)
> > > >    -src_range         <boolean>    E..V..... source is full range 
> > > > (default false)
> > > >    -dst_range         <boolean>    E..V..... destination is full range
> > > > (default false)
> > > >
> > > >> I don't see any constants set in the AVOptions struct. Can you share a 
> > > >> command line where you could set this option using a string?
> > > > I was just going by the help printed above, including the default. If
> > > > a string is not valid, which values are?
> > > The help function fetches the string name for the default value but the
> > > user has to input an integer.
> > >
> > > The pixel formats are declared in an enum in libavutil/pixfmt.h. The
> > > integers correspond to their index in that list.
> >
> > That seems very bad in terms of usability. Is there a particular
> > reason why the "-pix_fmt" option can parse these values, but swscaler
> > not? In fact, most (if not all) other options that accept a finite set
> > of arguments don't use numbers in that way, but strings.
> > I can add the integers to the documentation as a lookup table, but it
> > feels weird doing so.
>
> where exactly is a end user facing interface using integers for pix_fmt
> in place of named identifers, can you show an example command line ?
I checked again, and when you try this, this is printed:

> Directly using swscale dimensions/format options is not supported, please use 
> the -s or -pix_fmt options
> Error parsing option 'src_format' with argument 'yuv420p'.

So this should actually be removed from the CLI options entirely, or?
(And the documentation.)

Werner
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to