stages.video.preview.preview
#
Module Contents#
Classes#
Stage that generates webp previews from video clips. |
API#
- class stages.video.preview.preview.PreviewStage#
Bases:
nemo_curator.stages.base.ProcessingStage
[nemo_curator.tasks.video.VideoTask
,nemo_curator.tasks.video.VideoTask
]Stage that generates webp previews from video clips.
This class processes video clips through a series of steps including reading, generating webp previews, and writing to storage.
- compression_level: int#
6
- inputs() tuple[list[str], list[str]] #
Define stage input requirements.
Returns (tuple[list[str], list[str]]): Tuple of (required_attributes, required_columns) where: - required_top_level_attributes: List of task attributes that must be present - required_data_attributes: List of attributes within the data that must be present
- num_cpus_per_worker: float#
4.0
- outputs() tuple[list[str], list[str]] #
Define stage output specification.
Returns (tuple[list[str], list[str]]): Tuple of (output_attributes, output_columns) where: - output_top_level_attributes: List of task attributes this stage adds/modifies - output_data_attributes: List of attributes within the data that this stage adds/modifies
- process(
- task: nemo_curator.tasks.video.VideoTask,
Process a task and return the result. Args: task (X): Input task to process Returns (Y | list[Y]): - Single task: For 1-to-1 transformations - List of tasks: For 1-to-many transformations (e.g., readers) - None: If the task should be filtered out
- quality: int#
50
- target_fps: float#
1.0
- target_height: int#
240
- verbose: bool#
False