Skip to content

Commit 793fa17

Browse files
authored
fix(signals): Limit video validation videos playback to 1x. (#42269)
1 parent 1093277 commit 793fa17

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ee/hogai/session_summaries/constants.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
SECONDS_BEFORE_EVENT_FOR_VALIDATION_VIDEO = 7
3939
VALIDATION_VIDEO_DURATION = 12
4040
VALIDATION_VIDEO_RENDERING_DELAY = 2 # Don't analyze first seconds of the video, as it could include malformed frames
41-
VALIDATION_VIDEO_PLAYBACK_SPEED = 16 # We don't need minor details, as LLM needs 1 frame per second
41+
VALIDATION_VIDEO_PLAYBACK_SPEED = 8 # We don't need minor details, as LLM needs 1 frame per second
42+
SHORT_VALIDATION_VIDEO_PLAYBACK_SPEED = (
43+
1 # For short videos (10s validation chunks), we should stick to "render fully", instead of speed
44+
)
4245
FAILED_MOMENTS_MIN_RATIO = 0.5 # If less than 50% of moments failed to generate videos, fail the analysis
4346
EXPIRES_AFTER_DAYS = 90 # How long to store the videos used for validation
4447
DEFAULT_VIDEO_EXPORT_MIME_TYPE = "video/webm"

ee/hogai/videos/session_moments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
from ee.hogai.session_summaries.constants import (
2929
DEFAULT_VIDEO_EXPORT_MIME_TYPE,
3030
DEFAULT_VIDEO_UNDERSTANDING_MODEL,
31+
SHORT_VALIDATION_VIDEO_PLAYBACK_SPEED,
3132
VALIDATION_VIDEO_DURATION,
32-
VALIDATION_VIDEO_PLAYBACK_SPEED,
3333
VALIDATION_VIDEO_RENDERING_DELAY,
3434
)
3535

@@ -155,7 +155,7 @@ async def _generate_video_for_single_moment(
155155
"filename": moment_filename,
156156
"duration": moment.duration_s,
157157
# Speed up to reduce the rendering time
158-
"playback_speed": VALIDATION_VIDEO_PLAYBACK_SPEED,
158+
"playback_speed": SHORT_VALIDATION_VIDEO_PLAYBACK_SPEED,
159159
# Keeping default values
160160
"mode": "screenshot",
161161
},

0 commit comments

Comments
 (0)