Video-Audio Detection
The Video-Audio Detection operator checks for an audio stream in a video. It returns true if an audio stream is present, false if not, and none if the detection fails. This topic describes how to configure the Video-Audio Detection operator.
Prerequisites
The workflow feature is available only after you purchase the unstructured data service.
You have created a workflow. For more information, see Create and manage workflows.
Permissions
In a Basic project, project administrators, developers, analysts, and custom project roles with the Dataset - Use permission can use all datasets in the project as the operator's input and output.
Supported file formats
The Video-Audio Detection operator supports the following formats: mp4, mkv, avi, mov, flv, wmv, webm, mpeg, mpg, m4v, ts, mts, m2ts, vob, 3gp, 3g2, ogv, rm, rmvb, asf, f4v, and divx.
Procedure
In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.
In the top navigation bar of the Develop page, select a Project.
In the left-side navigation pane, choose Data Processing > Workflow. From the Workflow list, click the target workflow to open the canvas. Drag the Video-Audio Detection operator from the Operator Library on the left to the canvas. In the Video-Audio Detection panel that opens on the right, configure the parameters.
Parameter
Description
Step name
Enter a name for the operator. The name can contain any characters and must not exceed 256 characters.
Input configuration
Dataset
This operator supports only hybrid datasets. After selecting a dataset, you must select its Version. By default, the first version in ascending order is selected.
If this operator is downstream from another operator, the dataset selected here is typically the same as the output dataset of the upstream operator.
Input field
Specifies the storage URL of the video file to process. Select a source field from the input dataset. You can only select fields where the Is URL parameter is set to Yes.
Filter condition (Optional)
Use SQL syntax. Enter only the filtering conditions that follow the
WHEREclause. You can use global system variables, such as the business date${bizdate}.Output configuration
Dataset
You can select Source Dataset or Other Dataset. If the metadata table of the source dataset does not have a primary key, Other Dataset is selected by default.
If you select Other Dataset, you must also specify a hybrid dataset and its Version as the output dataset. By default, the first version in ascending order is selected. You can also select a different version of the source dataset.
If you select Source Dataset, the metadata generated by the operator is written to the metadata table corresponding to the same version of the source dataset.
File output path
The prefix is fixed to the file storage directory of the selected dataset. You can specify a subdirectory for storage. Each output file is stored in a separate subdirectory that corresponds to its source video.
Loading policy
If the metadata table of the selected output dataset contains a primary key, update on primary key conflict is selected by default. If no primary key exists, append data is selected by default.
Append Data: Appends new data directly to the target table. If a primary key or constraint conflict occurs, the operation fails and reports an error.
Update on Primary Key Conflict: If a primary key or constraint conflict occurs, the operator deletes the existing row that has the same primary key and then inserts the new row.
Overwrite: Deletes all data from the target table before writing the new data.
NoteWhen you select Source Dataset as the output dataset, the loading policy supports only Update on Primary Key Conflict.
Field mapping
The Video-Audio Detection operator has one fixed output field:
has_audio: Indicates whether an audio stream exists in the video.By default, the operator's output fields are mapped to fields with the same names in the output dataset. You can also manually select target fields for custom mapping. Additionally, you can map passthrough fields from the source dataset to the target dataset. You can manage field mappings in the following ways:
Add Output Field: Click to add a blank field mapping row.
Batch Mapping: Click to choose batch manual mapping, same-name mapping, or same-row mapping.
Delete: Click the Delete icon to remove the field mapping for the row. Mappings for the operator's fixed output fields cannot be deleted.
After you complete the configuration, click Save in the top menu bar of the canvas to save your changes.
After you configure an operator, you can connect it to upstream or downstream operators to complete the workflow.