diff --git a/autogpt_platform/backend/backend/blocks/video/loop.py b/autogpt_platform/backend/backend/blocks/video/loop.py index 9c27dacdad..461610f713 100644 --- a/autogpt_platform/backend/backend/blocks/video/loop.py +++ b/autogpt_platform/backend/backend/blocks/video/loop.py @@ -26,13 +26,13 @@ class LoopVideoBlock(Block): description="The input video (can be a URL, data URI, or local path)." ) duration: Optional[float] = SchemaField( - description="Target duration (in seconds) to loop the video to. If omitted, defaults to no looping.", + description="Target duration (in seconds) to loop the video to. Either duration or n_loops must be provided.", default=None, ge=0.0, le=3600.0, # Max 1 hour to prevent disk exhaustion ) n_loops: Optional[int] = SchemaField( - description="Number of times to repeat the video. If omitted, defaults to 1 (no repeat).", + description="Number of times to repeat the video. Either n_loops or duration must be provided.", default=None, ge=1, le=10, # Max 10 loops to prevent disk exhaustion diff --git a/docs/integrations/block-integrations/video/loop.md b/docs/integrations/block-integrations/video/loop.md index 89aa81118c..ea90422e2e 100644 --- a/docs/integrations/block-integrations/video/loop.md +++ b/docs/integrations/block-integrations/video/loop.md @@ -18,8 +18,8 @@ The block uses MoviePy's Loop effect to repeat a video clip. You can specify eit | Input | Description | Type | Required | |-------|-------------|------|----------| | video_in | The input video (can be a URL, data URI, or local path). | str (file) | Yes | -| duration | Target duration (in seconds) to loop the video to. If omitted, defaults to no looping. | float | No | -| n_loops | Number of times to repeat the video. If omitted, defaults to 1 (no repeat). | int | No | +| duration | Target duration (in seconds) to loop the video to. Either duration or n_loops must be provided. | float | No | +| n_loops | Number of times to repeat the video. Either n_loops or duration must be provided. | int | No | ### Outputs