class pixeltable.iterators.VideoSplitter
Iterator over segments of a video file, which is split into fixed-size segments of length segment_duration
seconds.
Args:
duration: Video segment duration in seconds
overlap: Overlap between consecutive segments in seconds. Only available for mode='fast'.
min_segment_duration: Drop the last segment if it is smaller than min_segment_duration.
mode: Segmentation mode:
'fast': Quick segmentation using stream copy (splits only at keyframes, approximate durations)
'accurate': Precise segmentation with re-encoding (exact durations, slower)
video_encoder: Video encoder to use. If not specified, uses the default encoder for the current platform.
Only available for mode='accurate'.
video_encoder_args: Additional arguments to pass to the video encoder. Only available for mode='accurate'.
method accurate_iter()
method close()
Close the iterator and release all resources
method create()
method fast_iter()
Provide the Pixeltable types of the init() parameters
The keys need to match the names of the init() parameters. This is equivalent to the parameters_types
parameter of the @function decorator.
method output_schema()
Specify the dictionary returned by next() and a list of unstored column names
Returns:
tuple[dict[str, pixeltable.type_system.ColumnType], list[str]]: a dictionary which is turned into a list of columns in the output table
a list of unstored column names
method set_pos()
Set the iterator position to posLast modified on January 15, 2026