Fix pulseaudio breaking
This commit is contained in:
@@ -27,13 +27,13 @@ class CallRecorder:
|
|||||||
self._current_file = self._recordings_dir / f"{ts}_{call_id}.mp3"
|
self._current_file = self._recordings_dir / f"{ts}_{call_id}.mp3"
|
||||||
self._current_call_id = call_id
|
self._current_call_id = call_id
|
||||||
|
|
||||||
# Record from PulseAudio (drb_sink.monitor, set as the default source).
|
stream_url = f"http://{settings.icecast_host}:{settings.icecast_port}{settings.icecast_mount}"
|
||||||
# PulseAudio is the primary audio path — it has ~250ms latency vs 2-5s for Icecast,
|
|
||||||
# so recordings align with OP25 call_start/call_end events.
|
|
||||||
cmd = [
|
cmd = [
|
||||||
"ffmpeg", "-y",
|
"ffmpeg", "-y",
|
||||||
"-f", "pulse",
|
"-reconnect", "1",
|
||||||
"-i", "default",
|
"-reconnect_streamed", "1",
|
||||||
|
"-reconnect_delay_max", "5",
|
||||||
|
"-i", stream_url,
|
||||||
"-acodec", "libmp3lame",
|
"-acodec", "libmp3lame",
|
||||||
"-ar", "22050",
|
"-ar", "22050",
|
||||||
"-b:a", "32k",
|
"-b:a", "32k",
|
||||||
|
|||||||
Reference in New Issue
Block a user