Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Michael Niedermayer <michael@niedermayer.cc>
Subject: [FFmpeg-devel] Re: [PATCH] fftools: add -ignore_unknown_options for forward-compatible CLI usage
Date: Mon, 9 Feb 2026 00:02:09 +0100
Message-ID: <aYkV8cOFjlTaA1oE@neo> (raw)
In-Reply-To: <20260208045621.46911-1-om.bhandankar@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2104 bytes --]

Hi

On Sun, Feb 08, 2026 at 10:26:21AM +0530, Om Bhandankar via ffmpeg-devel wrote:
> From: ombhandankar <om.bhandankar@gmail.com>
> 
> Add a new global option -ignore_unknown_options that downgrades the
> "Unrecognized option" fatal error to a non-fatal warning, allowing
> processing to continue.
> 
> This enables scripts and programs that invoke FFmpeg to include options
> from newer versions while maintaining compatibility with older ones.
> The option must appear before any unrecognized options on the command
> line.
> 
> Both option parsing paths are handled: split_commandline() used by
> ffmpeg, and parse_options() used by ffplay/ffprobe. The option is
> defined in CMDUTILS_COMMON_OPTIONS so all tools support it.
> 
> When an unrecognized option is skipped, its potential argument is not
> consumed, as there is no reliable way to determine whether an unknown
> option expects an argument.
> 
> Ref: https://trac.ffmpeg.org/ticket/11626
> 
> Signed-off-by: Om Bhandankar <om.bhandankar@gmail.com>
> Co-authored-by: Cursor <cursoragent@cursor.com>
> ---
>  Changelog                    |  1 +
>  doc/fftools-common-opts.texi | 14 ++++++++++++++
>  fftools/cmdutils.c           | 15 ++++++++++++++-
>  fftools/cmdutils.h           |  1 +
>  fftools/opt_common.h         |  1 +
>  5 files changed, 31 insertions(+), 1 deletion(-)

instead of a bool, it may be better to list the specific options for which
their failure should be ignored.

-ignore_unknown_options "fancynewoption,anotherfancynewoption" -fancynewoption 123

in principle this would allow also to specify if the option takes an argument
that should be skipped

But before accepting an implemenattion of that idea above, id like to see how this looks.
This is a feature which is ok if its simple, clean and easy maintainable.

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Take away the freedom of one citizen and you will be jailed, take away
the freedom of all citizens and you will be congratulated by your peers
in Parliament.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

      reply	other threads:[~2026-02-08 23:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-08  4:56 [FFmpeg-devel] " Om Bhandankar via ffmpeg-devel
2026-02-08 23:02 ` Michael Niedermayer via ffmpeg-devel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYkV8cOFjlTaA1oE@neo \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=michael@niedermayer.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git