[FFmpeg-devel] [PATCH 1/4] avutil: add av_format_option_for_user() callback system

Michael Niedermayer michaelni at gmx.at
Mon May 11 14:16:15 CEST 2015

On Mon, May 11, 2015 at 02:26:24AM -0300, James Almer wrote:
> On 10/05/15 10:18 PM, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavutil/opt.c |   32 ++++++++++++++++++++++++++++++++
> >  libavutil/opt.h |   21 +++++++++++++++++++++
> >  2 files changed, 53 insertions(+)
> > 
> If this is meant to solve the whole debate from the "Tell users about -use_absolute_path"
> thread, then i think it's a bit overkill.

yes i felt similarly, but

> "Set <AVOption> to <value>" is generic enough
> that works in any situation, be it for API user or ffmpeg.c, and could be used in every
> av_log message.

it works, but it does not work well

consider the normal/generic case of a user application using
libavcodec and maybe libavformat amongth probably other libs

the user sees a message saying something along the lines of:
to do this set option foo to bar

The user most likly does not know that this message comes from
libavcodec or libavformat, another lib or the application itself
and likely the user doesnt even know the difference anyway

but the way to set the option can and does sometimes depend on for
what the option is

in mplayer, its one of
-lavdopts o=XXX=YYY
-lavcopts o=XXX=YYY
-lavfopts o=XXX=YYY
-lavdopts XXX=YYY
-lavcopts XXX=YYY
-lavfopts XXX=YYY

in ffmpeg/ffplay/ffprobe its

then theres

and many more

also the message may originate from a libavcodec used by another lib
instead of the user application

I think the average user would benefit from having the option dispayed
with a exactly useable as is syntax

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150511/5cd28ec2/attachment.asc>

More information about the ffmpeg-devel mailing list