Workflow FAQ

更新时间:
复制 MD 格式

This topic describes common issues that occur when you use workflows and provides solutions.

How do I upload files?

You can upload files using the ApsaraVideo Media Processing console or the graphical management tools provided by OSS. These tools support multipart upload, resumable upload, and batch upload. For more information, see Console upload and Common operations.

Is transcoding automatically performed after an audio or video file is uploaded?

Files with the specified extensions automatically trigger a workflow upon upload.

When you create a media workflow, you must specify an input file path. The service automatically triggers the workflow when an audio or video file with a supported extension is uploaded to this path. The workflow then performs the configured operations on the input file.

Workflows are automatically triggered for files with the following file name extensions:

  • Video:

    3gp, asf, avi, dat, dv, flv, f4v, gif, m2t, m3u8, m4v, mj2, mjpeg, mkv, mov, mp4, mpe, mpg, mpeg, mts, ogg, qt, rm, rmvb, swf, vob, wmv, webm

  • Audio:

    aac, ac3, acm, amr, ape, caf, flac, m4a, mp3, ra, wav, wma, aiff

Workflow trigger rules:

A workflow is triggered if the upload path of a file is a subdirectory of the input path that is configured for the workflow. For example:

Important

If the input path for Workflow A is the AA/BB folder in BucketA, uploading a.mp4 to AA/BB/ in BucketA or uploading b.flv to AA/BB/CC/ in BucketA triggers Workflow A. If a workflow is disabled, it is not automatically triggered.

Can I use an OSS tool to upload a video to the input path of a media workflow to trigger transcoding?

Yes, you can. The service is automatically triggered when a file is uploaded to the specified OSS input location of a workflow, regardless of the upload method. You can use the console, an API, or an OSS client tool. However, a disabled workflow is not automatically triggered.

Why can't I find my video in the Media Library after uploading it?

  • Only videos that are transcoded by a workflow are displayed in the Media Library. Videos transcoded by an API call are not displayed.

  • Check whether the video was uploaded successfully. If you cannot find the corresponding transcoding job ID in OSS, check whether the video was uploaded to the configured OSS input path of the workflow.

  • Check whether a video with the same name was previously uploaded. Uploading a video with the same name does not create a new media entry. You can search for the media by its video name in the Media Library.

What operations do media workflows support?

Media workflows currently support operations such as snapshots, transcoding, template analysis, and publishing management.

How do I name the output files of a transcoding node in a media workflow?

Media workflows simplify batch file processing, but this can create issues with naming output files. To help you manage this, the system provides the following variables:

  • {RunId}: The execution ID of the media workflow.

  • {ObjectPrefix}: The path of the source file, excluding the bucket information.

  • {FileName}: The name of the original file, including its extension. The extension is determined by the `format` of the transcoding template.

  • {ExtName}: The file name extension of the source file.

For example, if the input file is http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/news/video/foooo.mp4, the values of the three variables related to the source file are:

  • {ObjectPrefix}: news/video/

  • {FileName}: foooo

  • {ExtName}: .mp4

If you set the output Object to vod/{ObjectPrefix}{FileName}_HD.flv, the output Object after transcoding is vod/news/video/foooo_HD.flv.

The snapshot node has one additional unique variable:

  • {SnapshotTime}: The time the snapshot was taken, in milliseconds.

What message patterns do media workflows support?

Media workflows support the queue and notification patterns of Simple Message Queue (formerly MNS). You can configure these patterns on the input node. A media workflow sends messages to the configured queue or notification subject when the workflow is triggered and when it is complete.

How do I get the playback URL after video transcoding is complete?

You can manage videos on the Media Library page in the console. Click the Manage link for a video to go to its details page. On the details page, you can view the OSS address and accelerated domain name for each output. If a CDN is configured for the OSS bucket, the accelerated domain name is displayed. You can also programmatically obtain this information using an SDK. For more information, see Media details.

When a media workflow is executed, are the queue and notification mechanism attached to the transcoding pipeline triggered simultaneously?

Currently, jobs triggered by a media workflow ignore the message mechanisms attached to the MPS queue.

Why can't I preview the playback of a transcoded output file from its CDN URL in the console?

This issue usually occurs because your accelerated domain name is not mapped to the corresponding canonical name (CNAME) record. You can run the following command to query the CNAME configuration of your domain name:

nslookup -type=cname [your_domain_name]

For information about how to set a CNAME record, see Domain Names.

Why can't I preview the playback of a transcoded M3U8 file in the console?

First, the access control list (ACL) of the output media bucket must be set to public-read.

Second, the console uses Alibaba Cloud's Flash player. To enable playback, you must place a crossdomain.xml file in the root directory of the bucket where the M3U8 file is stored. This file must contain the domain name where the player is hosted.

To enable playback preview for your M3U8 file in the console, place a crossdomain.xml file with the following content in the root directory of the bucket where the M3U8 file is stored:

<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
<allow-access-from domain="*.example.com"/>
</cross-domain-policy>

In the code, *.example.com is the domain name where the console player is hosted. If you use a different Flash player, add a new allow-access-from domain record for the domain name where your player is hosted.