perf: ALSA ffmpeg low-delay flags
nobuffer, low_delay, and a small thread_queue_size on the camera mic capture process.
This commit is contained in:
@@ -179,6 +179,8 @@ def main() -> int:
|
|||||||
|
|
||||||
aproc = subprocess.Popen(
|
aproc = subprocess.Popen(
|
||||||
["ffmpeg", "-hide_banner", "-loglevel", "error",
|
["ffmpeg", "-hide_banner", "-loglevel", "error",
|
||||||
|
"-fflags", "nobuffer", "-flags", "low_delay",
|
||||||
|
"-thread_queue_size", "64",
|
||||||
"-f", "alsa", "-i", f"hw:{audio_card},0",
|
"-f", "alsa", "-i", f"hw:{audio_card},0",
|
||||||
"-ar", str(args.audio_rate), "-ac", "2",
|
"-ar", str(args.audio_rate), "-ac", "2",
|
||||||
"-f", "s16le", "pipe:1"],
|
"-f", "s16le", "pipe:1"],
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import inspect
|
||||||
|
|
||||||
|
import run_worker
|
||||||
|
|
||||||
|
|
||||||
|
def test_alsa_ffmpeg_uses_low_delay_flags():
|
||||||
|
src = inspect.getsource(run_worker)
|
||||||
|
assert '"-fflags", "nobuffer"' in src
|
||||||
|
assert '"-flags", "low_delay"' in src
|
||||||
|
assert '"-thread_queue_size", "64"' in src
|
||||||
Reference in New Issue
Block a user