diff --git a/src/dailyai/transports/abstract_transport.py b/src/dailyai/transports/abstract_transport.py index 393107971..1a30c9063 100644 --- a/src/dailyai/transports/abstract_transport.py +++ b/src/dailyai/transports/abstract_transport.py @@ -21,11 +21,10 @@ 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_max_bitrate = kwargs.get("camera_max_bitrate") or 250000 - self._camera_max_framerate = kwargs.get("camera_max_framerate") or 30 + self._camera_bitrate = kwargs.get("camera_bitrate") or 250000 + self._camera_framerate = kwargs.get("camera_framerate") or 10 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 self._logger: logging.Logger = logging.getLogger("dailyai.transport") diff --git a/src/dailyai/transports/daily_transport.py b/src/dailyai/transports/daily_transport.py index 196865841..6f4479f0c 100644 --- a/src/dailyai/transports/daily_transport.py +++ b/src/dailyai/transports/daily_transport.py @@ -222,9 +222,9 @@ def _prerun(self): "maxQuality": "low", "encodings": { "low": { - "maxBitrate": self._camera_max_bitrate, + "maxBitrate": self._camera_bitrate, "scaleResolutionDownBy": 1.333, - "maxFramerate": self._camera_max_framerate, + "maxFramerate": self._camera_framerate, } }, } diff --git a/src/dailyai/transports/threaded_transport.py b/src/dailyai/transports/threaded_transport.py index b64bf3fe1..334bffce3 100644 --- a/src/dailyai/transports/threaded_transport.py +++ b/src/dailyai/transports/threaded_transport.py @@ -393,7 +393,7 @@ def _run_camera(self): this_frame = next(self._images) self.write_frame_to_camera(this_frame) - time.sleep(1.0 / self._fps) + time.sleep(1.0 / self._camera_framerate) except Exception as e: self._logger.error(f"Exception {e} in camera thread.") raise e