Segmentation is the process of dividing video content into smaller, meaningful segments. Think of it as creating chapters or scenes within your video that can be processed, analyzed, and referenced independently. Each segment represents a distinct portion of your video with specific start and end timestamps.Unlike processing an entire video as one unit, segmentation allows you to work with granular pieces of content. For example, in a 30-minute cooking video, you might have segments for ingredient preparation (0-5 minutes), cooking process (5-20 minutes), and final presentation (20-30 minutes). Each segment can then be transcribed, analyzed for entities, or processed independently.Segmentation is particularly powerful when combined with other Cloudglue operations like entity extraction or transcription, as it provides temporal context and allows for segment-specific analysis.
Uniform segmentation divides video content into fixed-duration segments with consistent timing intervals. This approach is ideal when you need predictable, evenly-spaced segments regardless of the video’s content.Key Parameters:
Window Seconds: The duration of each segment (e.g., 30 seconds)
Hop Seconds: The interval between segment starts, enabling overlapping segments if desired
Use Cases:
Regular Content Analysis: Perfect for systematic analysis where you need consistent time intervals
Shot detection segmentation uses computer vision to identify natural scene changes and transitions in video content. This approach creates segments that align with the video’s actual content structure.Key Parameters:
Detector Strategy: Choose from adaptive or content-based detection
Threshold: Detection sensitivity (strategy-specific, lower values = more sensitive)
Min/Max Seconds: Constraints on segment duration to prevent overly short or long segments
Detector Strategies:
Adaptive Detector: Designed for dynamic footage with camera movement, panning, or action. Adapts to motion patterns to avoid false scene breaks during camera moves or fast action sequences. Examples: sports broadcasts, drone footage, handheld documentaries, action movies, live event recordings.
Content Detector: Optimized for controlled footage with clear visual transitions. Focuses on color and lighting changes to identify clean cuts between distinct scenes or shots. Examples: studio interviews, corporate videos, educational content, product demos, scripted content with traditional editing.
Use Cases:
Content-Aware Processing: Segments align with natural scene boundaries and visual transitions
Narrative Structure: Perfect for videos with distinct scenes, like interviews, presentations, or storytelling
Combine with Processing: Include segmentation_config in your extraction or transcription operations
Collection-Level Segmentation: Set default_segmentation_config when creating collections
For detailed implementation examples and advanced use cases, explore our API reference and consider how segmentation can enhance your specific video processing workflows.