On 2025-11-16 04:02 am, Tolga Celebi via ffmpeg-devel wrote:
From: tolgakaan12 <[email protected]> The set_encoder_id function in fftools/ffmpeg_mux_init was writing a shortened encoder tag even when -bitexact flag was set, instead of omitting it entirely like other formats (flac, mp3, wav) do. This patch makes the function return early if bitexact flag is set, ensuring no encoder metadata is written. Fixes ticket #11656.
NAK. Bitexact does not mean lack of encoder metadata - it means metadata that is invariant across versions. Most formats will still write some encoder metadata. This patch fails close to 200 of our automated tests - see https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/
To omit this for a particular muxer, modify that muxer by checking for the flag AVFMT_FLAG_BITEXACT. Look at libavformat/wavenc.c for reference.
Regards, Gyan
--- fftools/ffmpeg_mux_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index bcbbee9126..3d13c9c257 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1167,15 +1167,15 @@ static int set_encoder_id(OutputStream *ost, const AVCodec *codec) uint8_t *encoder_string; int encoder_string_len;+ if (ost->file->bitexact || ost->bitexact)+ return 0; + encoder_string_len = sizeof(LIBAVCODEC_IDENT) + strlen(cname) + 2; encoder_string = av_mallocz(encoder_string_len); if (!encoder_string) return AVERROR(ENOMEM);- if (!ost->file->bitexact && !ost->bitexact)- av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len); - else - av_strlcpy(encoder_string, "Lavc ", encoder_string_len); + av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len); av_strlcat(encoder_string, cname, encoder_string_len); av_dict_set(&ost->st->metadata, "encoder", encoder_string, AV_DICT_DONT_STRDUP_VAL | AV_DICT_DONT_OVERWRITE);
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
