nemo_curator.tasks.video
Module Contents
Classes
API
Container for video clip data including metadata, frames, and processing results.
This class stores information about a video segment, including its source, timing, extracted frames, motion data, aesthetic scores, and generated captions.
Calculate the duration of the clip.
Extract metadata from the clip’s buffer.
Returns: dict[str, Any] | None
A dictionary containing the extracted metadata (width, height, framerate,
Raises:
Exception: Any exception from extract_video_metadata is propagated.
Calculate total memory size of the clip.
Returns: int
Total size in bytes.
Statistics for video clips including filtering, transcoding, and captioning results.
This class accumulates statistics about the number of clips processed through different stages of the video processing pipeline, including motion filtering, aesthetic filtering, and captioning.
Combine two ClipStats objects.
Parameters:
ClipStats object to combine with.
Container for video content including metadata, frames, and processing results.
This class stores information about a video segment, including its source, timing, extracted frames, motion data, aesthetic scores, and generated captions.
Calculate the fraction of processed clips.
Get the input path of the video.
Calculate the weight of the video.
Calculate total memory size of the video.
Returns: int
Total size in bytes.
Check if all metadata fields are present.
Returns: bool
True if all metadata fields are present, False otherwise.
Heuristic function to determine if the input video has 10-bit color.
Extract and assign video metadata from source_bytes.
This method extracts metadata from the video data in source_bytes and assigns it to self.metadata.
Raises:
ValueError: If source_bytes is None.Exception: Any exception from extract_video_metadata is propagated.
Metadata for video content including dimensions, timing, and codec information.
This class stores essential video properties such as resolution, frame rate, duration, and encoding details.
Bases: Task[Video]
Task for processing a single video.
Get the number of items in this task.
Validate the task data.
Container for video window data including metadata, frames, and processing results.
This class stores information about a video window, including its source, timing, extracted frames, motion data, aesthetic scores, and generated captions.
Calculate total memory size of the window.
Returns: int
Total size in bytes.