[FFmpeg-devel] [RFC] User-defined default enc/dec/mux/dem/etc

Nicolas George george at nsup.org
Wed Jun 8 09:51:41 EEST 2022


Thilo Borgman (12022-06-07):
> Hi,
> 
> currently, if -c:{a,v} is not given, the list of all codecs is successively searched until the first enc/dec is found.
> 
> If I have two or more enc/dec's for the same codec ID (like by having libx264, libfdk-aac, etc..) it will still be the first in the list that is found that is used if no -c:{v,a} is given. Having a list of user-defined default enc/dec's avoids having the user to always specify their favorite via -c:{v,a}.
> 
> This patch creates a (redundant) list of default codecs user-defined via configure options. This list is then searched before the complete list of codecs is searched so that all user defaults will be found first. An alternative would be messing with the order of codecs during configure and creation of lavc/codec_list.c to have the defaults found first - which I think is not a good idea. Maybe do something else entirely instead...?
> 
> For the case you have hwaccel's for the codec ID in question, a default specified currently uses the hwaccel-enc/-dec even if no "-hwaccel something" is given on the command line. What would we want to happen? Stick to use only if given like auto hwaccel decoding?
> 
> The patch is of course dirty/wip and my shell-Fu is for sure not sufficient to our standards. Anyways, might also be useful to have this for mux/demux, if this is not a horrible idea for some reason to start with?
> 
> Any comments appreciated before I'd forge it into an actual patch!

>From a user support perspective, I think it is not a good idea at all:
it makes it harder to spot problems with users commands when some of the
effects are hidden in the huge configure line.

Even from a usability perspective I thin it is not good: just because a
BOFH or a quirky package maintainer chose to select different defaults,
many examples, many stackoverflow answers stop working.

Better teach users to write explicit settings. They can write shell
scripts to make it permanent.

Regards,

-- 
  Nicolas George


More information about the ffmpeg-devel mailing list