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 media 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.

Create a workflow

  1. Log on to the Media Processing console.
  2. Select the region.
  3. Click Library > Library Settings > Workfows.
  4. Click Create Workflow.

  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 Customizein Preset.

  6. Set nodes.
    1. Set the Input node.
      1. At the right side of the Input node, click theicon to set the following information.
      2. On the Input node, click Select at the right side of Input Path.

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

        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. Set the Transcodde node.
      1. Click the icon at the right side of the Input node

        to add the Transcoding node.

      2. At the right side of the Transcode node, click the icon.
      3. In Transcode > Basic Settings, click Select at the right side of Template.

      4. Select the template and click OK.

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

        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;

        • {ExtName} the original file extension name.

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

        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 more information, see Output Location description for the Transcode node. ClickOK, and the Transcode node cofiguration is completed.

    3. Set theScreenshot node.
      1. At the right side of theInput node or Transcode node, click the icon to add the Screenshot node.
      2. At the right side of the Screenshot node, click the icon.
      3. Select Sreenshot Type.
      4. Click Select at the right side ofOutput Location.

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

      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. At the right side of Publish node, click the icon to set the Publish node.
      2. On the Publish page, set the Media Publication Type 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.

  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 forOutput Bucket (Optional). For more information, see Acceleration of On-Demand Video/Audio.



    Note The added domain name must already be filed.

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.



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.