mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
Omit ffmpeg encoder metadata from converted TTS audio (#182833)
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user