Flush ffmpeg audio stream packets

This commit is contained in:
Smittix
2026-02-04 10:06:45 +00:00
parent 40f1e3296f
commit 74155ce07c
+5
View File
@@ -428,6 +428,10 @@ def _start_audio_stream(frequency: float, modulation: str):
ffmpeg_path, ffmpeg_path,
'-hide_banner', '-hide_banner',
'-loglevel', 'error', '-loglevel', 'error',
'-fflags', 'nobuffer',
'-flags', 'low_delay',
'-probesize', '32',
'-analyzeduration', '0',
'-f', 's16le', '-f', 's16le',
'-ar', str(resample_rate), '-ar', str(resample_rate),
'-ac', '1', '-ac', '1',
@@ -436,6 +440,7 @@ def _start_audio_stream(frequency: float, modulation: str):
'-b:a', '128k', '-b:a', '128k',
'-ar', '44100', '-ar', '44100',
'-f', 'mp3', '-f', 'mp3',
'-flush_packets', '1',
'pipe:1' 'pipe:1'
] ]