LVM-Duration Filter (DLC)

更新时间:
复制 MD 格式

The LVM-Duration Filter (DLC) component filters video training data by duration, retaining only samples within a specified range. Use it to remove clips that are too short or too long before training video generation models. Only MP4 videos are supported.

Supported computing resources

Deep Learning Containers (DLC)

How it works

The component calculates the duration of each video and retains only the samples whose duration falls between the configured minimum and maximum values. Videos outside that range are excluded. This ensures consistent clip length in training datasets for video generation models.

Inputs and outputs

Input ports

The component accepts input from any of the following sources:

  • Read File Data component: reads the Object Storage Service (OSS) path where training data is stored.

  • OSS Data Path parameter: points to an OSS directory containing video files, or directly to a video_meta.jsonl metadata file. See the parameter descriptions below for details.

  • Any other LVM Data Processing (DLC) component.

On the first run, if no upstream component is connected, manually specify the OSS directory via the Video Data OSS Path parameter. After the first run, the component generates video_meta.jsonl in the parent directory of the specified path. For subsequent runs, point directly to that file instead of the directory.

Output port

The component writes filtering results to the OSS directory specified by Output File OSS Path. The output includes three files:

FileDescription
{name}.jsonlThe filtered output file. The filename is set by the Output Filename parameter.
{name}_stats.jsonlThe state file for the filtering run.
dj_run_yaml.yamlThe parameter configuration file used when the algorithm runs.

Configure the component

Configure the following parameters in Machine Learning Designer.

Field settings

ParameterRequiredTypeDefaultDescription
Video Data OSS PathNoOSS pathThe OSS directory containing video data, or the video_meta.jsonl metadata file. Required on the first run when no upstream component is connected.
Output File OSS PathYesOSS pathThe OSS directory where filtering results are stored.
Output FilenameYesStringresult.jsonlThe filename for the filtered output file (the {name}.jsonl output).

Parameter settings

ParameterRequiredTypeDefaultDescription
Minimum Duration Time (s)YesFloat0The minimum video duration to keep, in seconds. Videos shorter than this value are excluded.
Maximum Duration Time (s)YesFloat60The maximum video duration to keep, in seconds. Videos longer than this value are excluded.

Execution tuning

ParameterRequiredTypeDefaultDescription
Number of ProcessesYesInteger4The number of parallel processes to use during filtering.

Select resource group

ParameterRequiredDefaultDescription
Public Resource GroupNoThe instance type (CPU or GPU) and virtual private cloud (VPC) to use. Use the CPU instance type to save costs.
Dedicated resource groupNoThe number of vCPUs, memory, shared memory, and GPUs to allocate.
Maximum Running Duration (seconds)NoThe time limit for the component run. If exceeded, the job is terminated.