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
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.jsonlmetadata 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:
| File | Description |
|---|---|
{name}.jsonl | The filtered output file. The filename is set by the Output Filename parameter. |
{name}_stats.jsonl | The state file for the filtering run. |
dj_run_yaml.yaml | The parameter configuration file used when the algorithm runs. |
Configure the component
Configure the following parameters in Machine Learning Designer.
Field settings
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Video Data OSS Path | No | OSS path | — | The 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 Path | Yes | OSS path | — | The OSS directory where filtering results are stored. |
| Output Filename | Yes | String | result.jsonl | The filename for the filtered output file (the {name}.jsonl output). |
Parameter settings
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Minimum Duration Time (s) | Yes | Float | 0 | The minimum video duration to keep, in seconds. Videos shorter than this value are excluded. |
| Maximum Duration Time (s) | Yes | Float | 60 | The maximum video duration to keep, in seconds. Videos longer than this value are excluded. |
Execution tuning
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Number of Processes | Yes | Integer | 4 | The number of parallel processes to use during filtering. |
Select resource group
| Parameter | Required | Default | Description |
|---|---|---|---|
| Public Resource Group | No | — | The instance type (CPU or GPU) and virtual private cloud (VPC) to use. Use the CPU instance type to save costs. |
| Dedicated resource group | No | — | The number of vCPUs, memory, shared memory, and GPUs to allocate. |
| Maximum Running Duration (seconds) | No | — | The time limit for the component run. If exceeded, the job is terminated. |