Event list

更新时间:
复制 MD 格式

Intelligent Media Services (IMS) provides callback events for media asset uploads, media processing, and cloud editing. You can configure specific callback events to receive timely updates on task progress and status. The following sections provide sample message bodies for each event type along with field descriptions.

Usage

For an HTTP(S) request, the message body is the request body. For an MNS queue, it is the content of the received message.

Event list

Table 1. Media asset upload

Event

Description

FileUploadComplete

An audio or video file is uploaded.

UploadByURLComplete

A file is uploaded from a URL.

ImageUploadComplete

An image is uploaded.

AttachedMediaUploadComplete

An auxiliary media asset is uploaded.

RegisterStreamComplete

A media stream is registered.

StreamUploadComplete

A media stream is uploaded.

UploadStreamByURLComplete

A media stream is uploaded from a URL.

Table 2. Media asset management

Event

Description

CreateAuditComplete

A manual review is complete.

RegisterMediaComplete

A media asset is registered.

DeleteMediaComplete

A media asset is deleted.

MediaBaseChangeComplete

A media asset's basic information is updated.

Table 3. Workflow

Event

Description

WorkflowTaskComplete

A workflow task is complete.

Table 4. ApsaraVideo VOD media processing

Event

Description

VideoAnalysisComplete

Audio or video analysis is complete.

SnapshotComplete

Video snapshotting is complete.

DynamicImageComplete

A dynamic image is generated.

TranscodeComplete

A transcoding subtask is complete (scheduled for deprecation on December 31, 2025).

TranscodeParentComplete

The parent transcoding task is complete (scheduled for deprecation on December 31, 2025).

MediaConvertComplete

A media transcoding job is complete.

MediaConvertOutputGroupComplete

A media transcoding output group is complete.

MediaConvertOutputComplete

A media transcoding output is complete.

Table 5. Video AI

Event

Description

AIMediaAuditComplete

An AI-powered review is complete.

AIProduceComplete

An AI-powered production task is complete.

MediaAiAnalysisComplete

AI analysis of a media asset is complete and the results are saved to the library.

Table 6. Intelligent editing

Event

Description

ProduceMediaComplete

Media production is complete.

BatchProduceMediaComplete

A batch intelligent video production task is complete.

Intelligent task complete

Table 7. Real-time media processing

Event

Description

LiveRecordFileCreated

A live recording file is generated.

LiveRecordTaskStatus

A live recording task's status is updated.

LiveSnapshotFileCreated

A snapshot file is created during live streaming.

Event

FileUploadComplete

Sample message body:

{
    "EventType": "FileUploadComplete",
    "UserId": 183322097756****,
    "EventTime": "2022-07-15T08:48:14Z",
    "MessageBody": {
        "Status": "Success",
        "FileUrl": "http://outin-***.oss-cn-shanghai.aliyuncs.com/sv/93ad7c5-182010aa3dc/93ad7c5-182010a****.mp4",
        "MediaId": "c321b3a0041a71eda1590674a2ce****",
        "AppId": "app-1000000",
        "Size": "5510872",
        "MediaType": "video"
    }
}

Message body parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

Event time (UTC time), in the format yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

MediaId

String

Yes

The media asset ID.

MediaType

String

Yes

The media asset type. Valid values:

  • audio

  • video

FileUrl

String

Yes

The file URL.

Size

String

Yes

The file size.

AppId

String

Yes

The application ID.

UserData

String

No

The user-defined data.

Status

String

Yes

The event status. Valid values: Success and Fail.

UploadByURLComplete

Sample message body:

{
    "EventType": "UploadByURLComplete",
    "UserId": 183322097756****,
    "EventTime": "2022-07-15T08:48:14Z",
    "MessageBody": {
        "Status": "Success",
        "SourceURL": "http://***/big_buck_bunny.mp4",
        "MediaId": "c321b3a0041a71eda1590674a2ce****",
        "AppId": "app-1000000",
        "MediaType": "video",
        "JobId": "88aabd2461ec4ad389f439f6ff92****"
    }
}

The following table describes the parameters for the message body.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

MediaId

String

Yes

The media asset ID.

MediaType

String

Yes

The media asset type. Valid values:

  • audio

  • video

SourceURL

String

Yes

The source file URL.

JobId

String

Yes

The task ID.

AppId

String

Yes

The application ID.

UserData

String

No

The user-defined data.

Status

String

Yes

The task status. Valid values: Success and Fail.

ImageUploadComplete

Sample message body:

{
    "EventType": "ImageUploadComplete",
    "UserId": 183322097756****,
    "EventTime": "2022-07-06T08:27:52Z",
    "MessageBody": {
        "Status": "Success",
        "FileUrl": "https://outin-***.oss-cn-shanghai.aliyuncs.com/image/default/E81B931FA75246B3972844D35291****-6-2.jpg",
        "MediaId": "7e976e80fd0571ec82115523919d****",
        "AppId": "app-1000000",
        "Size": "132066",
        "MediaType": "image"
    }
}

The message body contains the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time when the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

MediaId

String

Yes

The media asset ID.

MediaType

String

Yes

The media asset type. Valid value: image.

FileUrl

String

Yes

The file URL.

Size

String

Yes

The file size.

AppId

String

Yes

The application ID.

UserData

String

No

The user-defined data.

Status

String

Yes

The status. Valid values: Success and Fail.

AttachedMediaUploadComplete

Sample message body:

{
    "EventType": "AttachedMediaUploadComplete",
    "UserId": 183322097756****,
    "EventTime": "2022-07-15T06:38:33Z",
    "MessageBody": {
        "Status": "Success",
        "FileUrl": "https://outin-***.oss-cn-shanghai.aliyuncs.com/subtitle/4C3C3021EC704639A9F2F55BB0C9****-3-3.ass",
        "MediaId": "b3e59350040871ed9d535532918c****",
        "AppId": "app-1000000",
        "Size": "34758",
        "MediaType": "text"
    }
}

The message body contains the following parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time at which the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The media asset ID.

MediaType

String

Yes

The media asset type. Valid value: text.

FileUrl

String

Yes

The file URL.

Size

String

Yes

The file size.

AppId

String

Yes

The application ID.

UserData

String

No

The user-defined data.

Status

String

Yes

The upload status. Valid values: Success and Fail.

RegisterStreamComplete

Sample message body:

{
    "EventType": "RegisterStreamComplete",
    "UserId": 127753575120****,
    "EventTime": "2022-07-13T09:34:39Z",
    "MessageBody": {
        "Status": "Success",
        "FileUrl": "https://***.oss-cn-shenzhen.aliyuncs.com/InterfaceTest/900d1-b****.aac",
        "MediaId": "fa04bee0028e71edb10f81848c01****",
        "UserData": "{\"MessageCallback\":{\"CallbackURL\":\"***\",\"CallbackType\":\"http\"}}"
    }
}

The following table lists the parameters of the message body.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event occurred, in UTC. The time is in the yyyy-MM-ddTHH:mm:ssZ format.

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The media ID.

FileUrl

String

Yes

The file URL.

UserData

String

No

Optional user-defined data.

Status

String

Yes

The status. Valid values are Success and Fail.

StreamUploadComplete

Sample message body:

{
    "EventType": "StreamUploadComplete",
    "UserId": 174809843091****,
    "EventTime": "2022-07-05T12:53:30Z",
    "MessageBody": {
        "Status": "Success",
        "FileUrl": "http://***.aliyuncs.com/vod-f1e0dd/stream/b37ff450fc6071ec9c5e472190a9****/a0c69a523724cc432c897dcaa6f3****-fd.mp4",
        "MediaId": "b37ff450fc6071ec9c5e472190a9****",
        "UserData": "{\"MessageCallback\":\"{\\\"CallbackURL\\\":\\\"***\\\",\\\"CallbackType\\\":\\\"http\\\"}\"}"
    }
}

Message body fields:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The event time in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The media asset ID.

FileUrl

String

Yes

The file URL.

UserData

String

No

The user-defined data.

Status

String

Yes

The status. Valid values: Success and Fail.

UploadStreamByURLComplete: Media stream URL upload complete

Sample message body:

{
    "EventType": "UploadStreamByURLComplete",
    "UserId": 174809843091****,
    "EventTime": "2022-07-07T08:09:14Z",
    "MessageBody": {
        "Status": "Success",
        "SourceURL": "http://***/example/html5/mov_bbb.mp4",
        "MediaId": "0f65faa0fdcc71ecbfcd472190a9****",
        "UserData": "{\"MessageCallback\":\"{\\\"CallbackURL\\\":\\\"***\\\",\\\"CallbackType\\\":\\\"http\\\"}\"}",
        "JobId": "7f0d49297cb0fa50ab7341fd60f4****"
    }
}

This table lists the message body parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The media asset ID.

SourceURL

String

Yes

The source file URL.

JobId

String

Yes

The job ID.

UserData

String

No

The user data.

Status

String

Yes

The job status. Valid values: Success or Fail.

CreateAuditComplete: Manual review complete

Sample message body:

{
    "EventType": "CreateAuditComplete",
    "UserId": 183320223010****,
    "EventTime": "2022-06-23T13:11:33Z",
    "MessageBody": {
        "Status": "Success",
        "Auditor": "auditor",
        "Comment": "test",
        "AuditStatus": "Normal",
        "MediaId": "71151b80f2d471ecb21b472190a9****",
        "CreationTime": "2022-06-23T13:11:33Z",
        "Reason": "test"
    }
}

The message body contains the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The media asset ID.

AuditStatus

String

Yes

The review status. Valid values:

  • Init: The media asset is initializing for manual review.

  • Normal: The media asset passed the manual review.

  • Blocked: The media asset was blocked by the manual review.

Auditor

String

Yes

The reviewer who performed the manual review.

Reason

String

Yes

The reason for the review result.

Comment

String

Yes

The reviewer's comment.

CreationTime

String

Yes

The creation time of the manual review task.

Status

String

Yes

The state of the manual review task. Valid values:

  • Success: The task completed.

  • Failed: The task failed.

RegisterMediaComplete

Event description:

To register a media asset with the content library, call RegisterMediaInfo. A callback is triggered once the media asset analysis is complete.

Sample message body:

{
    "EventType": "RegisterMediaComplete",
    "UserId": 183320223010****,
    "EventTime": "2022-06-23T13:11:33Z",
    "MessageBody": {
        "Status": "Success",
        "MediaId": "71151b80f2d471ecb21b472190a9****"
    }
}

The message body includes the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The type of event.

UserId

Long

Yes

The ID of the user.

EventTime

String

Yes

The event time in UTC, in ISO 8601 format: yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The body of the message.

MediaId

String

Yes

The ID of the media asset.

Status

String

Yes

The status of the registration task. Valid values include:

  • Success: The task succeeded.

  • Failed: The task failed.

UserData

String

No

User-defined data.

ErrorCode

String

No

The error code returned if the task fails.

ErrorMessage

String

No

The error message returned if the task fails.

DeleteMediaComplete

Event

This callback is triggered when you call one of the following OpenAPI operations:

Sample message body:

{
    "EventType": "DeleteMediaComplete",
    "UserId": 183320223010****,
    "EventTime": "2022-06-23T13:11:33Z",
    "MessageBody": {
        "Status": "Success",
        "MediaId": "71151b80f2d471ecb21b472190a9****",
        "DeleteType": "all"
    }
}

The message body contains the following parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time in UTC when the event occurred, in yyyy-MM-ddTHH:mm:ssZ format (ISO 8601).

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The ID of the media asset.

Status

String

Yes

The status of the media asset deletion task. Valid values:

  • Success: The task succeeded.

  • Failed: The task failed.

DeleteType

String

Yes

The type of resource to delete. Valid values:

  • all: Deletes all information about the media asset, including the source file.

  • stream: Deletes information about the transcoded stream.

  • info: Performs a logical delete only.

FileURLs

String

No

This parameter is present only if DeleteType is set to stream.

ErrorCode

String

No

The error code.

ErrorMessage

String

No

The error message.

MediaBaseChangeComplete: Basic media information updated

Event description:

Calling one of the following OpenAPI operations triggers this callback:

Sample message body:

{
  "EventType": "MediaBaseChangeComplete",
  "UserId": 183320223010****,
  "EventTime": "2022-06-23T13:11:33Z",
  "MessageBody": {
    "Status":"Success",
    "MediaId":"3b46b391419aj294m83b459f7435****",
    "MediaType":"video",
    "OperateMode":"update",
    "MediaContent":"{\"CoverURL\":\"{\\\"OldValue\\\":\\\"https://outin-8e7b1c7d2a3811eb83da00163e00****.oss-cn-shanghai.aliyuncs.com/0202342e8ae944d09695fd7dbc6d69dc/snapshots/4a6c26eb46a841a3b60c1d56acce****-00005.jpg\\\",\\\"NewValue\\\":\\\"http://cdn.com/ee.png\\\"}\"}"
  }
}

The message body contains the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time when the event occurred, in UTC. The format must be yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

Status

String

Yes

The status of the media asset update task. Valid values:

  • Success: The task succeeded.

  • Failed: The task failed.

MediaType

String

Yes

The media type. Valid values:

  • video: Video.

  • audio: Audio.

  • image: Image.

  • text: Subtitle or font file.

  • material: Resource package.

MediaId

String

Yes

The media ID.

OperateMode

String

Yes

The operation mode. Valid values:

  • create: Creates the basic information for a media asset. The OldValue field in the MediaContent parameter is empty.

  • update: Updates the basic information of a media asset. The OldValue field in the MediaContent parameter is the value before the update, and the NewValue field is the value after the update.

  • delete: Deletes the basic information of a media asset. The NewValue field in the MediaContent parameter is empty.

MediaContent

-

Object

Yes

The content of the media asset modification. This object contains basic information for audio and video files.

Title

String

No

The title, formatted as a JSON string. Example: {"OldValue": "OldTitle", "NewValue": "NewTitle"}.

Description

String

No

The description, formatted as a JSON string. Example: {"OldValue": "OldDesc", "NewValue": "NewDesc"}.

CoverURL

String

No

The URL of the thumbnail image, formatted as a JSON string. Example: {"OldValue": "OldCoverURL", "NewValue": "NewCoverURL"}.

CateId

String

No

The category ID, formatted as a JSON string. Example: {"OldValue": 123, "NewValue": 456}.

Tags

String

No

The tags, formatted as a JSON string. Example: {"OldValue": "OldTag", "NewValue": "NewTag"}.

WorkflowTaskComplete

Sample message body:

{
  "EventType": "WorkflowTaskComplete",
  "UserId": 183322097735****,
  "EventTime": "2022-07-08T02:22:48Z",
  "MessageBody": {
    "TaskInput": "{\"Type\":\"Media\",\"Media\":\"4c3a4a30041b71edbfc96732b68f****\"}",
    "TaskId": "71151b80f2d471ecb21b472190a9****",
    "WorkflowId": "SW-1010****",
    "Status": "Succeed",
    "CreateTime": "2022-07-08T02:19:19Z"
  }
}
            

The following table describes the message body parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time when the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

TaskInput

String

Yes

The workflow task input.

TaskId

String

Yes

The workflow task ID.

WorkflowId

String

Yes

The workflow ID.

Status

String

Yes

The status of the workflow task. Valid values:

  • Init: The task is being initialized.

  • Processing: The task is in progress.

  • Succeeded: The task completed successfully.

  • Failed: The task failed.

  • Canceled: The task has been canceled.

CreateTime

String

Yes

The workflow task creation time in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

VideoAnalysisComplete

Sample message body:

{
    "EventType": "VideoAnalysisComplete",
    "UserId": 183322097756****,
    "EventTime": "2022-07-15T08:52:17Z",
    "MessageBody": {
        "Status": "Success",
        "FileUrl": "https://outin-***.oss-cn-shanghai.aliyuncs.com/sv/51246387-182010e2655/51246387-182010e****.mp4",
        "MediaId": "4c3a4a30041b71edbfc96732b68f****",
        "MetaInfo": {
            "Size": "77570208",
            "Fps": 24.0,
            "Duration": "68.576667",
            "Height": "1440",
            "Width": "3120",
            "Bitrate": "9049.17"
        }
    }
}

The message body contains the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

MediaId

String

Yes

The media asset ID.

FileUrl

String

Yes

The file URL.

UserData

String

No

The user-defined data.

Status

String

Yes

The status. Valid values: Success, Fail.

MetaInfo

-

Object

Yes

The analysis result.

Duration

String

Yes

The duration, in seconds.

Height

String

Yes

The height, in pixels.

Width

String

Yes

The width, in pixels.

Bitrate

String

Yes

The bitrate, in Kbps.

Size

String

Yes

The size, in bytes.

Fps

Double

Yes

The frame rate, in frames per second (fps).

SnapshotComplete

Example message body:

{
  "EventType": "SnapshotComplete",
  "UserId": 183320223010****,
  "EventTime": "2021-09-28T01:30:19Z",
  "MessageBody": {
    "JobId": "11a32131403478e92cc01399855****",
    "TriggerSource": "API",
    "Name": "test job",
    "Type": "Sprite",
    "Input": "{\"type\":\"OSS\",\"media\":\"http://bucket-empty.oss-cn-shanghai.aliyuncs.com/xxx.mp4\",\"ossFile\":{\"Bucket\":\"bucket-empty\",\"Location\":\"oss-cn-shanghai\",\"Object\":\"xxx.mp4\"}}",
    "Output": "{\"type\":\"OSS\",\"media\":\"http://bucket-empty.oss-cn-shanghai.aliyuncs.com/yyy-{Count}.jpg\",\"ossFile\":{\"Bucket\":\"bucket-empty\",\"Location\":\"oss-cn-shanghai\",\"Object\":\"yyy-{Count}.jpg\"}}",
    "Count": 5,
    "TemplateConfig": "{\"Count\":5,\"FrameType\":\"normal\",\"Height\":720,\"Interval\":5,\"Time\":20,\"Type\":\"Normal\",\"Width\":1280}",
    "TemplateId": "2590d131403478e92cc01399833****",
    "PipelineId": "3a791131403478e92cc01399862****",
    "Status": "Success",
    "ErrorCode": "ResourceNotFound",
    "ErrorMessage": "The input resource cannot be found.",
    "UserData": "{\"aaa\": \"bbb\"}",
    "SubmitTime": "2021-09-28T01:10:19Z",
    "FinishTime": "2021-09-28T01:20:19Z"
  }
}

The message body contains the following parameters.

Parameter

Type

Required

Description

JobId

String

Yes

The task ID.

TriggerSource

String

Yes

The trigger source. Valid values:

  • API: OpenAPI.

  • Console: the console.

  • Workflow: the workflow.

Name

String

Yes

The task name.

Type

String

Yes

The snapshot task type. Valid values:

  • Normal: a static snapshot.

  • Sprite: a sprite.

  • WebVtt: a WebVTT snapshot.

Input

String

Yes

The task input, a JSON string.

Output

String

Yes

The task output, a JSON string.

Count

Integer

Yes

The number of snapshots.

TemplateConfig

String

Yes

The task parameters.

TemplateId

String

Yes

The task template ID.

PipelineId

String

No

The pipeline ID.

SubmitTime

String

Yes

The task submission time. The time is in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ.

FinishTime

String

Yes

The task completion time. The time is in UTC and formatted as yyyy-MM-ddTHH:mm:ssZ.

UserData

String

No

The user-defined data.

Status

String

Yes

The task status. Valid values:

  • Success: The task succeeded.

  • Fail: The task failed.

ErrorCode

String

No

The error code returned when the task fails.

ErrorMessage

String

No

The error message returned when the task fails.

DynamicImageComplete: Dynamic image generation

Sample message body:

{
  "EventType": "DynamicImageComplete",
  "UserId": 183320223010****,
  "EventTime": "2021-09-28T01:30:19Z",
  "MessageBody": {
    "JobId": "11a32131403478e92cc01399855****",
    "TriggerSource": "API",
    "Name": "test job",
    "Input": "{\"type\":\"OSS\",\"media\":\"http://bucket-empty.oss-cn-shanghai.aliyuncs.com/xxx.mp4\",\"ossFile\":{\"Bucket\":\"bucket-empty\",\"Location\":\"oss-cn-shanghai\",\"Object\":\"xxx.mp4\"}}",
    "Output": "{\"type\":\"OSS\",\"media\":\"http://bucket-empty.oss-cn-shanghai.aliyuncs.com/yyy.gif\",\"ossFile\":{\"Bucket\":\"bucket-empty\",\"Location\":\"oss-cn-shanghai\",\"Object\":\"yyy.gif\"}}",
    "TemplateConfig": "{\"Count\":5,\"FrameType\":\"normal\",\"Height\":720,\"Interval\":5,\"Time\":20,\"Type\":\"Normal\",\"Width\":1280}",
    "TemplateId": "2590d131403478e92cc01399833****",
    "PipelineId": "3a791131403478e92cc01399862****",
    "Status": "Success",
    "ErrorCode": "ResourceNotFound",
    "ErrorMessage": "The input resource cannot be found.",
    "UserData": "{\"aaa\": \"bbb\"}",
    "SubmitTime": "2021-09-28T01:10:19Z",
    "FinishTime": "2021-09-28T01:20:19Z"
  }
}

The message body contains the following parameters:

Parameter

Type

Required

Description

JobId

String

Yes

The task ID.

TriggerSource

String

Yes

The task's trigger source. Valid values:

  • API: Triggered by an OpenAPI call.

  • Console: Triggered from the console.

  • Workflow: Triggered by a workflow.

Name

String

Yes

The task name.

Input

String

Yes

The task input, a JSON string.

Output

String

Yes

The task output, a JSON string.

TemplateConfig

String

Yes

The parameters for the task.

TemplateId

String

Yes

The task template ID.

PipelineId

String

No

The pipeline ID.

SubmitTime

String

Yes

The time the task was submitted, in UTC, formatted as yyyy-MM-ddTHH:mm:ssZ.

FinishTime

String

Yes

The time the task was completed, in UTC, formatted as yyyy-MM-ddTHH:mm:ssZ.

UserData

String

No

The user-defined pass-through data.

Status

String

Yes

The status of the task. Valid values:

  • Success: The task succeeded.

  • Fail: The task failed.

ErrorCode

String

No

The error code. Returned only if the task fails.

ErrorMessage

String

No

The error message. Returned only if the task fails.

Transcode complete

Sample message body:

{
  "EventType": "TranscodeComplete",
  "UserId": 183322097756****,
  "EventTime": "2022-06-27T08:41:32Z",
  "MessageBody": {
    "Status": "Success",
    "FinishTime": "2022-06-27T08:41:32Z",
    "OutFileMeta": {
      "audioStreamInfoList": [],
      "subtitleStreamInfoList": [],
      "videoStreamInfoList": [
        {
          "time_base": "1/12800",
          "level": "31",
          "sar": "32:21",
          "profile": "High",
          "fps": "25.0",
          "index": "0",
          "avg_fps": "25.0",
          "codec_name": "h264",
          "duration": "403.040000",
          "pixFmt": "yuv420p",
          "bit_rate": "316.728",
          "start_time": "0.000000",
          "codec_tag": "0x31637661",
          "has_b_frames": "4",
          "dar": "16:9",
          "codec_time_base": "1/50",
          "width": "700",
          "codec_tag_string": "avc1",
          "lang": "und",
          "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
          "height": "600"
        }
      ],
      "fileBasicInfo": {
        "duration": "403",
        "fileName": "yinhuazengqinag0627001.mp4",
        "fileSize": "16078713",
        "fileStatus": "Normal",
        "formatName": "mov,mp4,m4a,3gp,3g2,mj2",
        "width": "700",
        "bitrate": "319",
        "fileUrl": "http://laisi-vedio-****.oss-cn-shanghai.aliyuncs.com/output/01iceout/yinhuazengqinag062****.mp4",
        "region": "cn-shanghai",
        "fileType": "transcode_file",
        "height": "600"
      }
    },
    "ParentJobId": "a11f624c98e84f6b839d4ffb74b7****",
    "TriggerSource": "Console",
    "JobId": "533d2c5eac5b4f0aaf2d09c7ee884cae",
    "OutputUrl": "http://laisi-vedio-****.oss-cn-shanghai.aliyuncs.com/output/01iceout/yinhuazengqinag062****.mp4"
  }
}

The message body contains the following fields:

Parameter

Type

Required

Description

ParentJobId

String

Yes

The ID of the main task.

JobId

String

Yes

The ID of the subtask.

TriggerSource

String

Yes

The trigger source. Valid values:

  • API: An OpenAPI call.

  • Console: The console.

  • Workflow: A workflow.

OutFileMeta

Object

Yes

Details of the output file. For details, see GetTranscodeJob response parameters.

OutputUrl

String

Yes

The URL of the output file.

FinishTime

String

Yes

The end time of the task, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

UserData

String

No

The user-defined pass-through data.

Status

String

Yes

The status of the task. Valid values:

  • Success: The task is successful.

  • Fail: The task failed.

ErrorCode

String

No

The error code that is returned if the task fails.

ErrorMessage

String

No

The error message that is returned if the task fails.

TranscodeParentComplete: Main task completed

Sample message body:

{
  "EventType": "TranscodeParentComplete",
  "UserId": 183322097756****,
  "EventTime": "2022-06-27T08:41:32Z",
  "MessageBody": {
    "Status": "Success",
    "FinishTime": "2022-06-27T08:41:32Z",
    "Jobs": [
      {
        "Status": "Success",
        "JobId": "533d2c5eac5b4f0aaf2d09c7ee88****",
        "OutputUrl": "http://laisi-vedio****.oss-cn-shanghai.aliyuncs.com/output/01iceout/yinhuazengqinag062****.mp4"
      }
    ],
    "ParentJobId": "a11f624c98e84f6b839d4ffb74b7****",
    "TriggerSource": "Console",
    "Name": "Audio and image enhancement-0001"
  }
}

The message body includes the following parameters:

Parameter

Type

Required

Description

ParentJobId

String

Yes

The ID of the main task.

Jobs

Array

Yes

An array of subtask objects, each with the following fields:

  • Status: The status of the subtask. Valid values: Success and Fail.

  • JobId: The ID of the subtask.

  • OutputUrl: The URL of the output file.

TriggerSource

String

Yes

Specifies how the task was triggered. Valid values:

  • API: The task was triggered by an OpenAPI call.

  • Console: The task was triggered from the console.

  • Workflow: The task was triggered by a workflow.

Name

String

Yes

The task name.

FinishTime

String

Yes

The task's completion time in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

UserData

String

No

The user-defined pass-through data.

Status

String

Yes

The final state of the main task. Valid values:

  • Success: The task was successful.

  • Fail: The task failed.

MediaConvertComplete: Media transcoding completed

Event description:

To trigger a callback when the transcoding job completes, call SubmitTranscodeJob or .

Sample message body:

{
  "EventType": "MediaConvertComplete",
  "UserId": 183322097756****,
  "EventTime": "2022-07-15T08:48:14Z",
  "MessageBody": {
    "FinishTime": "2025-06-17T06:14:23Z",
    "JobId": "6f6739ea9c4a45c4bfce6eb17189ca6f",
    "Status": "Complete",
    "TriggerSource": "Console"
  }
}

The message body includes the following parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The event time in UTC, formatted as yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

JobId

String

Yes

The job ID.

Status

String

Yes

The job status.

TriggerSource

String

Yes

The trigger source.

UserData

String

Yes

The user data.

FinishTime

String

Yes

The finish time.

MediaConvertOutputGroupComplete: Media transcoding completion

Event description:

For a transcode job submitted via SubmitTranscodeJob, a callback is triggered after an output group completes.

Example message body:

{
  "EventType": "ApsaraVideoForMediaProcessingOutputGroupComplete",
  "UserId": 183322097756****,
  "EventTime": "2022-07-15T08:48:14Z",
  "MessageBody": {
    "JobId": "6c5f4e6a4bbc4d06b774eaaf63cd35f6",
    "Name": "HLS",
    "Status": "Success",
    "TaskId": "6d4c8431636f4ff88c638e7d54036a30",
    "TriggerSource": "API"
  }
}

The message body contains the following parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event was generated, in UTC. Format: yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

TriggerSource

String

Yes

The trigger source.

JobId

String

Yes

The job ID.

TaskId

String

Yes

The output group ID.

Name

String

Yes

The output group name.

Status

String

Yes

The output group status.

UserData

String

No

The user data.

MediaConvertOutputComplete

Event description:

When you call SubmitTranscodeJob, a callback is triggered after the transcoding output is generated.

Sample message body:

{
  "EventType": "MediaConvertOutputComplete",
  "UserId": 183322097756****,
  "EventTime": "2022-07-15T08:48:14Z",
  "MessageBody": {
    "JobId": "2e083368d3224d22a8f3170ff9ff1cac",
    "MediaId": "054589a03aaa71f09951e7f6c6586302",
    "OutFileMeta": {
      "audioStreamInfoList": [
        {
          "bitrate": "129.063",
          "channelLayout": "stereo",
          "channels": "2",
          "codecLongName": "AAC (Advanced Audio Coding)",
          "codecName": "aac",
          "codecTag": "0x6134706d",
          "codecTagString": "mp4a",
          "codecTimeBase": "1/44100",
          "duration": "25.588005",
          "index": "1",
          "jobId": "da68bc722dab477d960026e6eba153e8",
          "lang": "und",
          "profile": "LC",
          "sampleFmt": "fltp",
          "sampleRate": "44100",
          "startTime": "0.000000",
          "timebase": "1/44100"
        }
      ],
      "fileBasicInfo": {
        "bitrate": "7224",
        "duration": "25",
        "fileName": "4B7680E8-1978719125A-1833-2209-775-60785.mp4.mp4",
        "fileStatus": "Normal",
        "fileType": "transcode_file",
        "fileUrl": "http://pyh-bucket-shanghai.oss-cn-shanghai.aliyuncs.com/054589a03aaa71f09951e7f6c6586302/transcode/normal/4B7680E8-1978719125A-1833-2209-775-60785.mp4.mp4",
        "formatName": "mov,mp4,m4a,3gp,3g2,mj2",
        "height": "720",
        "region": "cn-shanghai",
        "width": "1280"
      },
      "playStreamInfo": {
        "bitrate": "7224",
        "creationTime": "2025-06-19T07:33:02Z",
        "definition": 3,
        "duration": "25",
        "encrypt": 0,
        "fileSize": 23147779,
        "fileUrl": "http://pyh-bucket-shanghai.oss-cn-shanghai.aliyuncs.com/054589a03aaa71f09951e7f6c6586302/transcode/normal/4B7680E8-1978719125A-1833-2209-775-60785.mp4.mp4",
        "format": "mp4",
        "fps": "30.0",
        "height": 720,
        "jobId": "da68bc722dab477d960026e6eba153e8",
        "state": 1,
        "transTemplateType": 1,
        "type": 1,
        "userId": 1833220977560785,
        "width": 1280
      },
      "subtitleStreamInfoList": [],
      "videoStreamInfoList": [
        {
          "avg_fps": "30.0",
          "bit_rate": "7086.421",
          "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
          "codec_name": "h264",
          "codec_tag": "0x31637661",
          "codec_tag_string": "avc1",
          "codec_time_base": "1/60",
          "dar": "0:1",
          "duration": "25.633333",
          "fps": "30.0",
          "has_b_frames": "2",
          "height": "720",
          "index": "0",
          "jobId": "da68bc722dab477d960026e6eba153e8",
          "lang": "und",
          "level": "31",
          "pixFmt": "yuv420p",
          "profile": "High",
          "sar": "0:1",
          "start_time": "1.466000",
          "time_base": "1/90000",
          "width": "1280"
        }
      ]
    },
    "Name": "720P",
    "OutputUrl": "http://pyh-bucket-shanghai.oss-cn-shanghai.aliyuncs.com/054589a03aaa71f09951e7f6c6586302/transcode/normal/4B7680E8-1978719125A-1833-2209-775-60785.mp4.mp4",
    "Status": "Success",
    "TaskId": "da68bc722dab477d960026e6eba153e8",
    "TriggerSource": "IceWorkflow",
    "UserData": "{\"ImsSrc\":\"Workflow\",\"TaskId\":\"f521e6845595417b83a9efaa5bf9342d\"}"
  }
}

This table describes the message body parameters.

Parameter

Type

Required

Description

EventType

String

Yes

Event type.

UserId

Long

Yes

User ID.

EventTime

String

Yes

The time the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

Message body.

TriggerSource

String

Yes

Trigger source.

JobId

String

Yes

Job ID.

TaskId

String

Yes

Output ID.

Name

String

Yes

Output name.

Status

String

Yes

Output status.

UserData

String

No

User data.

MediaId

String

No

The ID of the output media.

OutputUrl

String

No

The URL of the output file.

OutFileMeta

FileMeta

No

The metadata of the output file.

AIMediaAuditComplete

Sample message body:

{
    "EventType":"AIMediaAuditComplete",
    "UserId":183322097756****,
    "EventTime":"2022-07-19T03:06:12Z",
    "MessageBody":{
        "Status":"Success",
        "MediaId":"{\"media\":\"02389c00031e71edbfdc90a58843****\",\"type\":\"Media\"}",
        "JobId":"12fa59321345435e84d610d4cb1e****"
    }
}

The following table lists the parameters in the message body.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time when the event occurred, in UTC. The time is in the yyyy-MM-ddTHH:mm:ssZ format.

MessageBody

JobId

String

Yes

The job ID.

Status

String

Yes

The status of the task. Valid values:

  • Success: The task was successful.

  • Fail: The task failed.

MediaId

String

Yes

The media ID.

AIProduceComplete

Sample message body:

{
    "EventType": "AIProduceComplete",
    "UserId": 171533008416****,
    "EventTime": "2022-07-14T02:26:54Z",
    "MessageBody": {
        "Status": "Success",
        "FunctionName": "Cover",
        "UserData": "{\"www\":111}",
        "OutputFiles": ["meinv-00002.jpg", "meinv-00001.jpg", "meinv-00003.jpg"],
        "JobId": "168510ad1a2a4806bfce31fe1799532c",
        "Result": "[{\"Score\":5.891979105782871,\"Time\":\"1966.6666666666665\",\"Url\":\"meinv-00002.jpg\"},{\"Score\":5.610427496267542,\"Time\":\"2966.666666666667\",\"Url\":\"meinv-00001.jpg\"},{\"Score\":4.963208311043985,\"Time\":\"10966.666666666666\",\"Url\":\"meinv-00003.jpg\"}]"
    }
}

The following table describes the parameters in the message body.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time when the event was generated in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

JobId

String

Yes

The task ID.

Status

String

Yes

The task state. Valid values:

  • Success: The task succeeded.

  • Fail: The task failed.

FunctionName

String

Yes

The type of AI function. Valid values:

  • Cover: intelligent thumbnail, including static and dynamic thumbnails.

  • VideoClip: video summary.

  • VideoDelogo: logo removal.

  • VideoDetext: subtitle removal.

OutputFiles

String[]

Yes

A list of generated files.

Result

String

Yes

Additional information output by the algorithm, such as the confidence level.

UserData

String

Yes

The user-defined data.

MediaAiAnalysisComplete

Sample message body:

{
  "EventType": "MediaAiAnalysisComplete",
  "UserId": 183320223010****,
  "EventTime": "2022-06-23T13:11:33Z",
  "MessageBody": {
    "Status":"Success", // Indicates whether the AI analysis result was stored successfully. Valid values: Success and Failed.
    "JobStatus": "AnalyzeSuccess", // The AI task state. Valid values: AnalyzeSuccess and AnalyzeFailed.
    "Type": "StandardSmartTag", // The AI task type.
    "MediaId":"****b391419aj294m83b459f7435****" // The media asset ID.
  }
}

The following table lists the message body parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The event time (UTC), formatted as yyyy-MM-ddTHH:mm:ssZ.

MessageBody

Status

String

Yes

Indicates whether the AI analysis result was stored. Valid values:

  • Success: The AI analysis result was stored successfully.

  • Fail: The AI analysis result failed to be stored.

JobStatus

String

Yes

The status of the AI task. Valid values:

  • AnalyzeSuccess: The AI task was successful.

  • AnalyzeFailed: The AI task failed.

Type

String

Yes

The type of the AI task. The value is always StandardSmartTag.

MediaId

String

Yes

The media asset ID.

ProduceMediaComplete

Sample message body:

{
  "EventType": "ProduceMediaComplete",
  "UserId": 183320223000****,
  "EventTime": "2022-07-13T10:49:45Z",
  "MessageBody": {
    "Status": "Success",
    "MediaURL": "https://your-bucket.oss-cn-shanghai.aliyuncs.com/xxxxx.mp4",
    "MediaId": "1d1cbbc46da24edd9cf11ba5d193****",
    "ProjectId": "aded28bac782446a8e5a7cf86b67****",
    "ErrorCode": "",
    "ErrorMessage": "",
    "JobId": "8bc08c859569446ca5303ea903ca****",
    "UserData": "{\"NotifyAddress\":\"http://xx.xx.xxx\"}"
  }
}

The message body contains the following parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time when the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

Status

String

Yes

The task status. Valid values: Success and Fail.

MediaURL

String

Yes

The output media asset URL.

MediaId

String

Yes

The media asset ID.

ProjectId

String

Yes

The online editing project ID.

ErrorCode

String

No

The error code. Returned only if the task fails.

ErrorMessage

String

No

The error message. Returned only if the task fails.

JobId

String

Yes

The online editing job ID.

UserData

String

No

The user-defined data.

MasterJobId

String

No

The main task ID. Returned only if the current online editing task is a subtask of an intelligent and quick batch video production task.

BatchProduceMediaComplete

Sample message body:

{
	"EventType": "BatchProduceMediaComplete",
	"UserId": 183320223000****,
	"EventTime": "2024-01-09T08:37:24Z",
	"MessageBody": {
		"Status": "Finished",
		"UserData": "{\"NotifyAddress\":\"https://**.**.**\"}",
		"JobId": "61195f35cc7d4786a0bda02390cb4587"
	}
}

The message body contains the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

Event time (UTC), in the format yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

-

The message body.

Status

String

Yes

The job status.

JobId

String

Yes

The ID of the intelligent one-click batch video production job.

UserData

String

No

The user-defined data.

SmartJobComplete

Sample message body:

{
	"EventType": "SmartJobComplete",
	"UserId": 183320223000****,
	"EventTime": "2024-07-28T16:36:43Z",
	"MessageBody": {
		"Status": "Finished",
		"JobType": "TextToSpeech",
		"ModifiedTime": "2024-07-28T16:36:31Z",
		"UserData": "{\"NotifyAddress\":\"https://**.**.com/**\"}",
		"CreateTime": "2024-07-28T16:36:31Z",
		"JobId": "7a5d99e67ecc4fd0a7937fa2fa******"
	}
}

This table describes the message body parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The UTC time when the event was generated, formatted as yyyy-MM-ddTHH:mm:ssZ.

MessageBody

JobType

String

Yes

The job type. Valid values:

TextToSpeech: Text-to-speech (TTS).

ASR: Automatic speech recognition (ASR).

TextGenerate: Keyword expansion.

VideoTranslation: Video translation.

HighlightExtraction: Highlight extraction.

Segmentation: Video segmentation.

Status

String

Yes

The job status.

JobId

String

Yes

The job ID.

UserData

String

No

Custom data specified by the user.

ModifiedTime

String

Yes

The time the job was last modified.

CreateTime

String

Yes

The time the job was created.

Live recording file created

Sample message body:

{
    "EventType": "LiveRecordFileCreated",
    "UserId": 123456,
    "EventTime": "2022-06-29T01:36:02Z",
    "MessageBody": {
        "duration": 35.09,
        "jobId": "d6a856d4-ca81-47e8-9d66-*****",
        "record_id": "13a10bbb-f717-4228-9e53-db8f****",
        "start_time": 1656466420,
        "stop_time": 1656466456,
        "uri": "record/d6a856d4-ca81-47e8-9d66-*****/***.m3u8"
    }
}

The message body contains the following parameters:

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event was generated, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

duration

float

Yes

The recording duration, in seconds.

jobId

String

Yes

The recording task ID, in UUID format.

record_id

String

Yes

The recording file ID, in UUID format.

start_time

Long

Yes

The UNIX timestamp when the recording started.

stop_time

Long

Yes

The UNIX timestamp when the recording ended.

uri

String

Yes

The storage path of the recording file in an Object Storage Service (OSS) bucket.

LiveRecordTaskStatus

Sample message body:

{
    "EventType": "LiveRecordTaskStatus",
    "UserId": 123456,
    "EventTime": "2022-06-29T01:35:32Z",
    "MessageBody": {
        "jobId": "d6a856d4-ca81-47e8-9d66-*****",
        "created": "2022-06-29T01:35:31.716Z",
        "session": "725d15ba-c589-3aeb-a3b6-*****",
        "event": "record_paused"
    }
}

The message body contains the following parameters.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event occurred, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

event

String

Yes

The recording event. Valid values:

  • record_error: An error occurred during the recording task.

  • record_started: The recording task started.

  • record_paused: The recording task paused.

  • record_resumed: The recording task resumed.

  • record_force_transcode_fail: The forced transcoding for the recording task failed.

jobId

String

Yes

The recording task ID in UUID format.

session

String

No

The recording session ID.

created

String

No

The time the recording session was created.

error_info

-

Object

No

Information about the recording error.

code

String

Yes

The error code.

message

String

Yes

The error message.

file_info

-

Object

No

The file information.

uri

String

Yes

The file path.

start_time

Long

Yes

The recording file's start time, as a UNIX timestamp.

stop_time

Long

Yes

The recording file's end time, as a UNIX timestamp.

LiveSnapshotFileCreated

Sample message body:

{
    "MessageBody": {
        "SnapshotUrl": "http://example.com/bucket/snapshot.jpg",
        "JobId": "cef3de8c-b02c-4462-ad02-****",
        "StreamInputUrl": "rtmp://example.com/app/stream",
        "Bucket": "OssBucket",
        "Height": 720,
        "Width": 1280,
        "Endpoint": "oss-cn-shanghai.aliyuncs.com",
        "Object": "app/snapshot.jpg",
        "Size": 50000
    },
    "EventTime": "2022-08-08T09:10:02Z",
    "UserId": 123456,
    "EventType": "LiveSnapshotFileCreated"
}

This table describes the parameters of the message body.

Parameter

Type

Required

Description

EventType

String

Yes

The event type.

UserId

Long

Yes

The user ID.

EventTime

String

Yes

The time the event was generated, in UTC. The format is yyyy-MM-ddTHH:mm:ssZ.

MessageBody

-

Object

Yes

The message body.

SnapshotUrl

String

Yes

The URL of the snapshot file.

jobId

String

Yes

The ID of the recording task in UUID format.

StreamInputUrl

String

Yes

The input URL of the live stream.

Bucket

String

Yes

The name of the OSS bucket.

Height

Integer

Yes

The height of the snapshot, in pixels.

Width

Integer

Yes

The width of the snapshot, in pixels.

Endpoint

String

Yes

The OSS endpoint.

Object

String

Yes

The OSS object path.

Size

Integer

Yes

The size of the file, in bytes.