Skip to content

Commit

Permalink
drop late video frame and speed up audio #388
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Jan 5, 2024
1 parent 5a110c7 commit 9bd50ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions app/wyzebridge/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
makedirs(IMG_PATH, exist_ok=True)


DEPRECATED = {
"DEBUG_FFMPEG",
}
DEPRECATED = {"DEBUG_FFMPEG"}

for env in DEPRECATED:
if getenv(env):
Expand Down
4 changes: 2 additions & 2 deletions app/wyzecam/iotc.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def _video_frame_slow(self, frame_info) -> Optional[bool]:
logger.warning("[video] super slow")
self.clear_buffer()

if not frame_info.is_keyframe and gap >= 1:
if not frame_info.is_keyframe and gap >= 0.5:
logger.debug(f"[video] slow {gap=}")
self.flush_pipe("audio")
return True
Expand Down Expand Up @@ -628,7 +628,7 @@ def _audio_frame_slow(self, frame_info) -> Optional[bool]:

if gap <= -1:
logger.debug(f"[audio] rushing ahead of video.. {gap=}")
time.sleep((abs(gap) % 1) + 1)
time.sleep(abs(gap) % 1)
elif gap >= 1:
logger.debug(f"[audio] dragging behind video.. {gap=}")
self.flush_pipe("audio")
Expand Down

0 comments on commit 9bd50ea

Please sign in to comment.