Video Basic Information
The Video Basic Information operator extracts basic information, such as duration, resolution, and format, from video files in an input dataset. This topic describes how to configure the Video Basic Information operator.
Prerequisites
To use the workflow feature, you must first purchase the unstructured data feature for your instance.
You have created a workflow. For details, see Create and manage a workflow.
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 input and output datasets for the operator.
Supported file formats
The Video Basic Information operator supports the following formats: mp4, mov, and m4v.
Procedure
In the top navigation bar of the Dataphin home page, choose R&D > Data Development.
In the top navigation bar of the Develop page, choose Project.
In the left navigation pane, choose Data Processing > Workflow. In the Workflow list, click the target workflow to open its canvas. From the operator library, drag the Video Basic Information operator onto the canvas. On the right, configure the following parameters in the Video Basic Information panel.
Parameter
Description
Step name
Enter a name for the current operator. The name can be up to 256 characters long and can include any character.
Input configuration
Dataset
Select a Hybrid Dataset to process and then select its Version. The earliest version is selected by default.
When this operator is downstream of another operator, the selected dataset is typically the same as the output dataset of the upstream operator.
Input field
Select a source field from the input dataset that contains the video file's storage URL. You can only select a field where the Is URL parameter is set to Yes.
Filter condition (Optional)
Enter filter conditions using SQL WHERE clause syntax. System global variables, such as ${bizdate}, are supported.
Output configuration
Dataset
You can select either Source Dataset or Other Dataset. If the source dataset's metadata table lacks a primary key, Other Dataset is selected by default.
If you select Other Dataset, you must specify a Hybrid Dataset and its Version as the output dataset. The earliest version is selected by default. You can also select other versions of the source dataset.
If you select Source Dataset, the operator writes the generated metadata to the source dataset's metadata table.
Load 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 to the target table. If a primary key or constraint conflict occurs, an error is reported.
Update on primary key conflict: If a primary key or constraint conflict occurs, the system deletes the existing row with the duplicate primary key and inserts the new data.
Overwrite: Deletes all data from the target table before writing the new data.
NoteIf you select Source Dataset as the output dataset, you can only use the Update on primary key conflict policy.
Field mapping
The Video Basic Information operator outputs the following fixed fields:
duration: The duration in milliseconds (ms).bitrate: The total bitrate.video_bitrate: The video bitrate.audio_bitrate: The audio bitrate.subtitle_bitrate: The subtitle bitrate.channels: The number of audio channels.sample_rate: The sample rate.bit_depth: The bit depth.title: The title.artist: The artist.album: The album.container_format: The container format.resolution: Width and height.fps: The frame rate.video_codec: The video codec.audio_codec: The audio codec.{file_url}: The URL of the video file. The field name is the same as the source field and is variable. The operator outputs this field only when you select Other Dataset as the output dataset. You can delete the mapping for this field.
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 pass-through fields from the source dataset to the target dataset. You can manage field mappings in the following ways:
Add output field: Adds a new, empty row for field mapping. This feature is available only when you select Other Dataset as the output dataset.
Batch mapping: Allows you to perform batch manual mapping, same-name mapping, or same-row mapping. You can use this feature only when you select Other Dataset as the output dataset.
Delete mapping: Click the Delete icon to remove a field mapping row. You cannot delete mappings for the operator's fixed output fields.
After you complete the configuration, click Save in the top menu bar of the canvas.
After configuring an operator, you can select its upstream or downstream operators to complete the full workflow configuration.