From 5a015f6d7a1f9c9836cc9949ac8e81fafa6f06bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 5 Apr 2024 19:55:06 -0700 Subject: [PATCH] transport: add camera_bitrate argument --- src/dailyai/transports/abstract_transport.py | 1 + src/dailyai/transports/daily_transport.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dailyai/transports/abstract_transport.py b/src/dailyai/transports/abstract_transport.py index f5ecc5880..ad323a5af 100644 --- a/src/dailyai/transports/abstract_transport.py +++ b/src/dailyai/transports/abstract_transport.py @@ -21,6 +21,7 @@ def __init__(self, **kwargs): self._camera_enabled = kwargs.get("camera_enabled") or False self._camera_width = kwargs.get("camera_width") or 1024 self._camera_height = kwargs.get("camera_height") or 768 + self._camera_bitrate = kwargs.get("camera_bitrate") or 250000 self._speaker_enabled = kwargs.get("speaker_enabled") or False self._speaker_sample_rate = kwargs.get("speaker_sample_rate") or 16000 self._fps = kwargs.get("fps") or 8 diff --git a/src/dailyai/transports/daily_transport.py b/src/dailyai/transports/daily_transport.py index 6ca1dd2b2..09214dd2f 100644 --- a/src/dailyai/transports/daily_transport.py +++ b/src/dailyai/transports/daily_transport.py @@ -222,7 +222,7 @@ def _prerun(self): "maxQuality": "low", "encodings": { "low": { - "maxBitrate": 250000, + "maxBitrate": self._camera_bitrate, "scaleResolutionDownBy": 1.333, "maxFramerate": 30, }