Skip to content

feat: Add --write-encoder-settings to tag streams with encoder settings - #320

Merged
slhck merged 1 commit into
slhck:masterfrom
ppetr:master
Sep 2, 2026
Merged

feat: Add --write-encoder-settings to tag streams with encoder settings#320
slhck merged 1 commit into
slhck:masterfrom
ppetr:master

Conversation

@ppetr

@ppetr ppetr commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

When enabled, the second-pass command writes an ENCODER_SETTINGS tag on each normalized audio stream, holding an ffmpeg-command-equivalent string with the codec, bitrate, sample rate and channels plus the normalization filter including the measured loudnorm values. It is added to the existing second-pass ffmpeg invocation, so no extra pass is performed.

Has no effect together with --metadata-disable. CLI docs, shell completions and tests updated.

When enabled, the second-pass command writes an ENCODER_SETTINGS tag on
each normalized audio stream, holding an ffmpeg-command-equivalent string
with the codec, bitrate, sample rate and channels plus the normalization
filter including the measured loudnorm values. It is added to the existing
second-pass ffmpeg invocation, so no extra pass is performed.

Has no effect together with --metadata-disable. CLI docs, shell
completions and tests updated.
@slhck

slhck commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Thanks, this looks reasonable and is fairly complete. I'd just like to hear your motivation or use case for it?

@ppetr

ppetr commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi! I have this little tool https://github.com/ppetr/audio-to-opus to convert audio to low bandwidth Opus files. While experimenting with various flag to optimize the codec for speech, I realized it'd be quite convenient to be able record the respective flags so that I could see what recording was done with what flags.

And then I thought that a better place for this improvement would be ffmpeg_normalize so that others could benefit from it too (and also it has all the necessary information already available for the 2nd pass, so no 3rd remux is needed).

@slhck
slhck merged commit c4d2194 into slhck:master Sep 2, 2026
3 of 4 checks passed
@slhck

slhck commented Sep 2, 2026

Copy link
Copy Markdown
Owner

This is now published, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants