Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Gyan Doshi via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Gyan Doshi <ffmpeg@gyani.pro>
Subject: [FFmpeg-devel] Re: [PATCH] fftools/ffmpeg_mux_init: do not write encoder metadata for ogg files with bitexact
Date: Sun, 16 Nov 2025 12:24:22 +0530
Message-ID: <1c3c051b-7ced-48c6-ae91-d35c8226ec91@gyani.pro> (raw)
In-Reply-To: <20251115223242.90376-1-celebitolgakaan@gmail.com>



On 2025-11-16 04:02 am, Tolga Celebi via ffmpeg-devel wrote:
> From: tolgakaan12 <70590077+tolgakaan12@users.noreply.github.com>
>
> 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/20251115223242.90376-1-celebitolgakaan@gmail.com/

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 -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

      reply	other threads:[~2025-11-16  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15 22:32 [FFmpeg-devel] " Tolga Celebi via ffmpeg-devel
2025-11-16  6:54 ` Gyan Doshi 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=1c3c051b-7ced-48c6-ae91-d35c8226ec91@gyani.pro \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=ffmpeg@gyani.pro \
    /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