This topic describes the StreamTranscodeComplete event as well as its notification content and sample callbacks.
Event type
StreamTranscodeComplete
Event description
The StreamTranscodeComplete event is generated after a video stream in a single definition and format (such as an SD stream in the MP4 format) is transcoded. A video stream in a single resolution can be played immediately after the video stream is transcoded in at least one format.
Note If you have enabled URL signing, you must generate your own auth_key to access the
playback URL of the video. Otherwise, the
HTTP 403
error code is returned for your request. For more information about URL signing,
see Configure URL authentication .
Event notification content
Field | Type | Required | Description |
---|---|---|---|
EventTime | String | Yes | The time when the event is generated. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format and in UTC. |
EventType | String | Yes | The event type. The value is StreamTranscodeComplete. |
VideoId | String | Yes | The ID of the video. |
Status | String | Yes | Indicates whether the video stream is transcoded. Valid values:
|
Bitrate | String | No | The bitrate of the video stream. Unit: Kbit/s. |
Definition | String | No | The definition of the video stream. Valid values:
|
Duration | Double | No | The length of the video stream. Unit: seconds. |
Encrypt | Boolean | No | Indicates whether the video stream is encrypted. |
ErrorCode | String | No | The error code. This parameter is available when an error occurs while the video stream is being transcoded. |
ErrorMessage | String | No | The error message. This parameter is available when an error occurs while the video stream is being transcoded. |
FileUrl | String | No | The playback URL of the video stream. The URL does not carry the signing auth_key. If you have enabled URL signing, you must generate your own auth_key to access the playback URL of the video stream. |
Format | String | No | The format of the video stream. Valid values:
|
Fps | String | No | The frame rate of the video stream, in frames per second. |
Height | Long | No | The height of the video stream. Unit: px. |
Size | Long | No | The size of the video stream. Unit: bytes. |
Width | Long | No | The width of the video stream. Unit: px. |
JobId | String | No | The ID of the transcoding job. |
Extend | String | No | The user-defined parameter that is returned in the pass-through mode in callbacks. For more information, see UserData. |
Sample callbacks
Description:
- For an HTTP callback, the following example is the body of the HTTP POST request.
- For an MNS callback, the following example is the message body.
{
"EventTime": "2017-03-20T07:49:17Z",
"EventType": "StreamTranscodeComplete",
"VideoId": "43q9fj74hdf****",
"Status": "success",
"Bitrate": "925",
"Definition": "LD",
"Duration": 15.0,
"Encrypt": false,
"FileUrl": "http://example.aliyundoc.com/DBEBDEAJS73J79BE4D****/52a53151eba5js73ke2da3b55bc5****.mp4",
"Format": "mp4",
"Fps": "30",
"Height": 960,
"Size": 1815321,
"Width": 540,
"JobId":"ddddddddddd",
"Extend":"test data"
}