[FFmpeg-devel] [PATCH 25/25] avformat/matroskaenc: Redo handling of FlagDefault

Nicolas George george at nsup.org
Wed Jun 2 20:33:34 EEST 2021


Andreas Rheinhardt (12020-01-21):
> Without a new option, one could not distinguish the case where the user
> explicitly wants no dispositions at all and the case where one remuxes from
> a source container that does not have the concept of default streams.
> Furthermore, having an option allows to distinguish the infer and
> "infer_no_subs" cases (the latter makes (some) players not show the
> subtitles unless one explicitly enables them which is what (some) users
> (including myself and apparently the guy behind #8416) want; I am actually
> unsure whether infer_no_subs would make a better default value).

Hi. I am replying to this old discussion because I just lost a little
time on an encode: I had "-disposition:2 -default" in my command line,
and the track was still marked default, I was missing "-default_mode
passthrough".

Silently ignoring or overriding user-given options is really not a good
idea. How can we enhance that?

The obvious solution would be to make passthrough the default. That
would make matroskaenc similar to other muxers. But I suppose you had a
good reason to make infer the default?

We could try to find an heuristic to detect if the disposition was set,
and print a warning if infer is used and it gets overridden. I do not
like that much, because warnings are not a satisfactory solution.

We can try to find a real solution to detect if the disposition is set
or not reliably, and use it (and then deprecate -default_mode). For
example:

/**
 * Set by demuxers when they know the disposition is reliable.
 * Used by muxers to detect if they use the disposition or guess it.
 */
#define AV_DISPOSITION_SET 0x10000000

If none of these solution work, then we need to write "for Matroska,
-default_mode passthrough is needed" in the documentation for
-disposition. In blinking lights.

What do you think?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210602/f47157c6/attachment.sig>


More information about the ffmpeg-devel mailing list