[FFmpeg-devel] [PATCH 4/4] cmdutils: add -channel_layouts option.
stefasab at gmail.com
Thu Aug 2 11:51:39 CEST 2012
On date Monday 2012-07-30 12:09:15 +0200, Nicolas George encoded:
> Le tridi 13 thermidor, an CCXX, Stefano Sabatini a écrit :
> > I mean in case you only need to show the channels *or* the standard
> > layouts, having to parse a single list with a consistent structure is
> > simpler than having to skip initial or ending lines based on a
> > possibly changing pattern.
> > So it seems more natural to me to keep two distinct options for two
> > different lists (that's similar to what we did with -formats ->
> > -formats | -codecs | -protocols).
> There are some merits to these arguments, but, on the other hand:
> "ffmpeg -foos" usually lists the possible values for the "-foo" option
> (codecs and formats are small exceptions: as they are very common they are
> abbreviated; protocols is a bigger exception). Individual channel names as
> well as standard channel layouts names serve as arguments for
> -channel_layout and anywhere a channel layout is expected; indeed,
> individual channel names are not accepted as argument to the "-channel" or
That's because we abuse the language and use "channels" in place of
"nb_channels". Also this is unfortunately not very consistent, for
example "-filters" has no "-filter" equivalent.
The alternative I proposed some time ago was having a -list "things"
option, which could be used in place of the many -things options
(which logically should "set" things rather than list them) but that
was not approved for a reason or another.
All in all I tend to favor in this case the solution which seems more
useful/convenient and more semantically consistent (that's why I
dislike printing two logically distinct sets with the same option, and
forcing the user to parse them), keeping in mind that the options
syntax is frequently inconsistent.
> I just pushed patches 1-3, I'll wait for a third opinion on this one while I
> am rebasing the channel test generation script on top of it. Thanks for the
FFmpeg = Fabulous and Formidable Meaningful Ponderous Erroneous Guide
More information about the ffmpeg-devel