All Products
Search
Document Center

StreamTranscodeComplete

Last Updated: Sep 04, 2018

Event type

StreamTranscodeComplete

Event description

A StreamTranscodeComplete event is generated after a transcoding task (such as converting the video to the SD MP4 format) is completed. A video is playable after it is transcoded to any format for the specified definition.

Note: If URL authentication has been enabled, you must generate an authentication key (auth_key) to access the video stream playback address. Otherwise, an HTTP 403 error is returned.

Event content

Name Type Description
EventTime String The time when the event occurs in UTC-8. Format: yyyy-MM-ddTHH:mm:ssZ.
EventType String The type of the event. The value is StreamTranscodeComplete.
VideoId String The ID of the video.
Status String The status of the stream transcoding task. A value of success indicates that the recording task is successful. A value of fail indicates that the recording task has failed.
Bitrate String The bit rate of the video stream in Kbit/s.
Definition String The definition of the video stream. Values include FD, LD, SD, HD, OD, 2K, and 4K.
Duration Float The length of the video stream in seconds.
Encrypt Boolean Indicates whether the video stream has been encrypted.
ErrorCode String The error code returned when video transcoding task fails.
ErrorMessage String The error message returned when the video transcoding task fails.
FileUrl String The playback address of the video stream. The address does not contain the auth_key key. If URL authentication has been enabled, you must generate an authentication key (auth_key) to access the video stream playback address.
Format String The format of the video stream. Values include mp4 and m3u8.
Fps String The FPS of the video stream.
Height Long The height of the video stream in pixels.
Size Long The size of the video stream in bytes.
Width Long The width of the video stream in pixels.

Callback example

The following example shows the body of an HTTP POST request for HTTP callbacks.

  1. {
  2. "EventTime": "2017-03-20T07:49:17Z",
  3. "EventType": "StreamTranscodeComplete",
  4. "VideoId": "43q9fjasjdflask",
  5. "Status": "success",
  6. "Bitrate": "925",
  7. "Definition": "LD",
  8. "Duration": 15.0,
  9. "Encrypt": false,
  10. "FileUrl": "http://vod.aliyunsample.com/DBEBDE15CC479BE4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4",
  11. "Format": "mp4",
  12. "Fps": "30",
  13. "Height": 960,
  14. "Size": 1815321,
  15. "Width": 540
  16. }