Omit ffmpeg encoder metadata from converted TTS audio (#182833)

This commit is contained in:
Bryce Boe
2026-09-21 02:45:31 -04:00
committed by GitHub
parent 5a9f68bb28
commit 2e7750dc9f
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -355,6 +355,9 @@ async def _async_convert_audio(
if to_sample_bytes == 2:
# 16-bit samples.
command.extend(["-sample_fmt", "s16"])
# Do not write the muxer's own encoder metadata; metadata from the input
# is still copied.
command.extend(["-fflags", "+bitexact"])
command.append("pipe:1") # Send output to stdout.
process = await asyncio.create_subprocess_exec(
+4
View File
@@ -1920,6 +1920,8 @@ async def test_async_convert_audio_probe_size(
"1",
"-sample_fmt",
"s16",
"-fflags",
"+bitexact",
"pipe:1",
]
@@ -1968,6 +1970,8 @@ async def test_async_convert_audio_mp3_bitrate(
"-ac",
"1",
*expected_encoder_args,
"-fflags",
"+bitexact",
"pipe:1",
]