Video Format Conversion

Updated at:

The Video Format Conversion operator converts video files to MP4 format with H.264 video encoding and AAC audio encoding. This topic describes how to configure the Video Format Conversion operator.

Prerequisites

  • To use the workflow feature, you must first purchase the unstructured data feature for your instance.

  • 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 any dataset within the project as input or output for the operator.

Supported file formats

The Video Format Conversion operator supports the following file formats: MP4, AVI, MKV, MOV, WebM, FLV, TS, WMV, 3GP, and MPEG.

Procedure

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Development.

  2. In the top navigation bar of the Development page, select a Project.

  3. In the left-side navigation pane, choose Data Processing > Workflow. In the Workflow list, click the target workflow to open its canvas. From the Operator Library on the left, drag the Video Format Conversion operator to the canvas. In the Video Format Conversion panel on the right, configure the following parameters.

    Parameter

    Description

    Step name

    Enter a name for the operator. The name can contain any characters and must not exceed 256 characters.

    Input settings

    Dataset

    Select the dataset to process. You must select a hybrid dataset. After selecting a dataset, you must also select its Version. The first version in ascending order is selected by default.

    If this operator is downstream of another, the input dataset is typically the output of the upstream operator.

    Input field

    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)

    Enter a filter condition using SQL syntax (without the WHERE keyword). You can use global system variables, such as the business date ${bizdate}.

    Output settings

    Dataset

    You can select Source Dataset or Other Dataset. If the source dataset's metadata table has no 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. This can be a different dataset or a different version of the source dataset.

    • If you select Source Dataset, the operator writes the generated metadata to the metadata table for the same version of the source dataset.

    File output path

    The path begins with the fixed storage directory of the selected dataset. You can enter a subdirectory for storage. Each converted video file will be stored in a separate subdirectory.

    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: Adds new data to the target table. The operation fails if a primary key or constraint conflict occurs.

    • Update on Primary Key Conflict: If a primary key or constraint conflict occurs, the existing row is replaced with the new data.

    • Overwrite: Deletes all data from the target table before writing the new data.

    Note

    If the output is set to Source Dataset, the load policy must be Update on Primary Key Conflict.

    Field mapping

    The Video Format Conversion operator always outputs the following field:

    trans_video_url: The storage URL of the converted video.

    By default, the operator maps its output fields to fields with the same name 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. Manage field mappings using the following options:

    • Add Output Field: Adds a new, empty row for field mapping.

    • Batch Mapping: Automatically map fields by selecting Map by Name or Map by Position.

    • Delete Mapping: Click the Delete icon in a row to remove that field mapping. You cannot delete the mapping for the operator's required output field.

  4. When you finish the configuration, click Save in the canvas toolbar.

    After configuring a single operator, you can add upstream or downstream operators to build your workflow.