neuralset.events.etypes.Video¶
- class neuralset.events.etypes.Video(*, start: float, timeline: str, duration: Annotated[float, Ge(ge=0)] = 0.0, extra: dict[str, Any] = {}, filepath: Path | str = '', frequency: float = 0, offset: Annotated[float, Ge(ge=0)] = 0.0)[source][source]¶
Video event with support for partial loading.
Requires
moviepy>=2.1.2to be installed. Duration and FPS are auto-detected from the file if not provided.Notes
Automatically detects FPS (as frequency) and duration from file
Supports partial loading via offset and duration
Returns a moviepy VideoFileClip that can be further processed
Examples
video = Video(start=0, timeline="video_exp", filepath="video.mp4", offset=5.0, duration=10.0) clip = video.read() # Returns 10-second clip starting at 5s