FAQ about media processing workflows

更新时间:
复制 MD 格式

Frequently asked questions about media processing workflows, including file uploads, transcoding triggers, output file naming, and messaging models.

How do I upload files?

You can upload files in the Intelligent Media Services (IMS) console or using the OSS graphical tool. Multipart upload, resumable upload, and batch upload are supported. For more information, see Upload files in the console and Common operations.

Is transcoding automatically triggered after audio or video files are uploaded?

A workflow is automatically triggered when a file with a supported file name extension is uploaded.

When you create a workflow, you must specify the input path. If an audio or video file with a supported file name extension is uploaded to this path, IMS automatically triggers the workflow and processes the input file.

Supported 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, and .webm

  • Audio

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

Workflow triggering rule:

If the path of an input file is under the input path that you specified for the workflow in MPS, the input file can trigger the workflow.

Example:

If the input path that you specified for Workflow A is the AA/BB directory in Bucket A, both the AA/BB/a.mp4 and AA/BB/CC/b.flv files that are uploaded to Bucket A can trigger Workflow A. A disabled workflow cannot be automatically triggered.

Can transcoding be triggered after a video is uploaded to the input path of a workflow using the OSS tool?

Yes, transcoding can be triggered after a video is uploaded to the input path of a workflow by using the OSS tool. However, a disabled workflow cannot be automatically triggered.

Why cannot a video be found in the media library after the video is uploaded?

  • Only videos transcoded by workflows appear in the media library. Videos transcoded by calling API operations do not appear in the media library.

  • Verify that the video was uploaded. If the corresponding transcoding job ID is not found in the transcoding management of OSS objects, verify that the video was successfully uploaded to the input path specified for the workflow.

  • Check for duplicate file names. If you upload a video with the same name as an existing video in the media library, no new media files are generated. You can search for the media file by video name in the media library.

What operations are supported by workflows?

Media workflows support operations such as snapshots and transcoding.

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

Workflows process multiple files at a time. You must name the output files. The following variables are available:

  • {TaskId}: The ID of the task instance.

  • {ObjectPrefix}: the original file path, excluding the bucket information.

  • {FileName}: the original file name that contains the file name extension. The file name extension varies based on the format of the transcoding template.

  • {ExtName}: the file name extension of the original 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 original file are as follows:

  • The value of the {ObjectPrefix} variable is news/video/.

  • The value of the {FileName} variable is foooo.

  • The value of the {ExtName} variable is .mp4.

You can set the output object to vod/{ObjectPrefix}{FileName}_HD.flv. The output object of the transcoded input file is then vod/news/video/foooo_HD.flv.

The snapshot node provides an additional variable:

  • {SnapshotTime}: the snapshot time. Unit: milliseconds.

What messaging models are supported by workflows?

Workflows support the queue-based and topic-based messaging models of Simple Message Queue (formerly MNS). You can configure notifications for the input node of a workflow so that IMS sends notifications to a specified queue or topic when the workflow starts and ends.

How do I obtain the URL of the output file generated after a video is transcoded?

Go to IMS console > Media Asset Management > Media Library. Click Manage for a video to go to its details page. On the details page, you can view the OSS address and the CDN-accelerated address for each output file. The CDN address is available only if a CDN domain name is configured for the OSS bucket. You can also use an SDK to retrieve the addresses programmatically. For more information, see Media details.

Why am I unable to preview an M3U8 file generated after transcoding in the console?

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

The Alibaba Cloud Flash player is used in the console. You must add a crossdomain.xml file that contains the player domain name to the root directory of the bucket where the M3U8 file is stored. Otherwise, the M3U8 file cannot be previewed.

To preview an M3U8 file in the console, add a crossdomain.xml file with the following content to 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>

*.example.com represents the domain name of the console player. If you use a different Flash player, add an allow-access-from domain record for the domain name of your player.