edit-icon download-icon

Workflows

Last Updated: Apr 19, 2018

Preceding step: Domain name management

Workflows support screenshot taking, transcoding, encapsulation, watermarking, encryption, and editing, allowing you to fast and flexibly construct a cloud-based audio/video handling process on demand. When a workflow starts or completes execution, a workflow execution message can be sent to the specified message queue or message notification.

Each workflow is bound to a path of the Input Media Bucket. When an audio or video file is uploaded to the path or its sub-directory, the workflow is automatically triggered to perform preset processing operations and save the processing result to the specified path of the Output Media Bucket.

Procedure

Step 1. Create a workflow

  1. Log on to the Media Processing cosole.

  2. Select the region.

  3. Click Library > Library Settings > Workfows.

  4. Click Create Workflow.

    2

  5. Set the workflow information.

    You can select a workflow from Preset and edit it as needed to quickly create a workflow. You can also customize a workflow.

    1. Set the workflow name in Workflow Name.

    2. Select Customize in Preset.

      2

  6. Set nodes.

    1. Set the Input node.

      1. Click the 2 icon at the right side of the Input node to set the following information.

      2. On the Input page, click select at the right side of Input Path.

        2

        Note: Input path is a storage location in OSS. The Input path must exist in OSS.

      3. In OSS File Manager, select the bucket name, and click OK.

        2

        Note: To facilitate searching for fies, we recommend that the storage location of the original video in the Input Media Bucket and the storage location of the Output Media Bucket are consistent. Examples here are all stored in the root directory.

      4. Message Type is optional. You can select MNS Queue or Notification and set the relevant instance.

        2

    2. Set the Transcodde node.

      1. Click the 2 icon at the right side of Input node to add the Transcoding node.

        2

      2. Click the 2 icon at the right side of the Transcode node.

      3. In Transcode > Basic Settings, click select at the right side of Template.

        2

      4. Select the template and cick OK.

        2

      5. In Transcode > Basic Settings, click Select at the right side of Output Location.

        2

        Note: Output Location is a storage location in OSS and the output file name. To avoid output files from being overwritten when a workflow is run multiple times, you can combine the system’s built-in variable parameters:

        • {RunId} the media workflow run ID,

        • {ObjectPrefix} the original file path not including Bucket information,

        • {FileName} the original file name not including the extension name; and

        • {ExtName} the original file extension name.

      6. In OSS File Manager, select the bucket name and click OK.

        2

        Note: The Input Bucket and the Output Bucket cannot be the same.

      7. The Output Location is a storage location in OSS and the output file name. For details, see Output Location description for the Transcode node.

        The Transcode node cofiguration is completed.

        2

    3. Set the Screenshot node.

      1. Click the 2 icon at the right side of the Input node or the Transcode node to add the Screenshot node.

      2. Click the 2 icon at the right side of the Screenshot node.

      3. Select Sreenshot Type.

      4. Click Select at the right side of Output Location.

        2

      5. In OSS File Manager, select the bucket name and click OK.

        2

      6. Set the Output Location.

        Output Location is a storage location in OSS and the output file name. To avoid the output files fron being overwritten when a workflow is run for multiple times, you can combine the system’s built-in variable parameters, in which {SnapshotTime} indicates the screenshot time, in milliseconds.

      7. Enable the Set As Thumbnail function.

        If this function is enabled, the screenshot taken on this node is automatically set as the thumbnail of the media files set in the library. If multiple screenshots are taken, the first screenshot is set as the thumbnail by default.

    4. Set the Publish node.

      1. Click the 2 icon at the right side of the Publish node.

      2. On the Publish page, set the Media Publication Type as Automatic.

        • Media Publication Type is set to Manual by default. In this case, each file output by transcoding cannot be directed accessed using an OSS URL in public-read mode or CDN URL.

        • If Media Publication Type is set to Automatic, a file output by transcoding can be directed accessed using an OSS URL in public-read mode or CDN URL.

    After setting the nodes, click Next to go to the Content Delivery Network (CDN) configuration page.

    2

  7. Configure the Content Delivery Network (CDN).

    The on-demand CDN domains that use the output media bucket as the source of this workflow are listed.

    In case of need, click + Add to quickly add an on-demand CDN domain. For details, see Acceleration of On-Demand Video/Audio.

    2

    Note: The added domain name must already be filed.

  8. Complete the workflow creation.

    After the media workflow is created, it is automatically activated and enters the Enabled status. The audio and video files uploaded to the Input Location bound to the Input node automatically trigger the workflow execution.

    Click Manage Workflow to return to the Workflows page, the workflow ID list is displayed.

    2

    2

Step 2. Edit and delete workflows

To edit, modify, or delete a workflow, set the workflow status as Disabled.

After the workflow is stopped, it is not automatically executed.

After editing the workflow, click Enable to restore automatic execution of the workflow.

2

Next step: Video file upload and workflow execution

Thank you! We've received your feedback.