class pixeltable.iterators.VideoSplitter
Iterator over segments of a video file, which is split into segments. The segments are specified either via a fixed duration or a list of split points. Parameters:duration(float | None): Video segment duration in secondsoverlap(float | None): Overlap between consecutive segments in seconds. Only available formode='fast'.min_segment_duration(float | None): Drop the last segment if it is smaller than min_segment_duration.segment_times(list[float] | None): List of timestamps (in seconds) in video where segments should be split. Note that these are not segment durations. If all segment times are less than the duration of the video, produces exactlylen(segment_times) + 1segments. An argument of[]will produce a single segment containing the entire video.mode(typing.Literal['fast', 'accurate'], default:'accurate'): 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(str | None): Video encoder to use. If not specified, uses the default encoder for the current platform. Only available formode='accurate'.video_encoder_args(dict[str, typing.Any] | None): Additional arguments to pass to the video encoder. Only available formode='accurate'.