All Products
Search
Document Center

TranscodeComplete

Last Updated: Sep 05, 2018

Event type

TranscodeComplete

Event description

A TranscodeComplete event is generated after all video stream transcoding tasks are completed.

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 TranscodeComplete.
VideoId String The ID of the video.
Status String The status of the video transcoding tasks. A value of success indicates that the recording task is successful. A value of fail indicates that the recording task has failed. The value is set to success once one video stream is successfully transcoded.
StreamInfos Array A video stream information list.

StreamInfos is an array that contains the following fields for a video stream:

Name Type Description
Status String The status of the video 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 Float 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 the 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, this address cannot be accessed.
Format String The format of the video stream. Values include mp4 and m3u8.
Fps Float 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": "TranscodeComplete",
  4. "VideoId": "43q9fjasjdflask",
  5. "Status": "success",
  6. "StreamInfos":
  7. [
  8. {
  9. "Status": "success",
  10. "Bitrate": 925,
  11. "Definition": "LD",
  12. "Duration": 15,
  13. "Encrypt": false,
  14. "FileUrl": "http://vod.aliyunsample.com/ABEBDE15CC479FD4D1329/62cb3151eba5289f8e2da3b55bc57c49.mp4",
  15. "Format": "mp4",
  16. "Fps": 30,
  17. "Height": 960,
  18. "Size": 1815321,
  19. "Width": 540
  20. },
  21. {
  22. "Status": "success",
  23. "Bitrate": 1575,
  24. "Definition": "SD",
  25. "Duration": 15,
  26. "Encrypt": false,
  27. "FileUrl": "http://vod.aliyunsample.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4",
  28. "Format": "mp4",
  29. "Fps": 30,
  30. "Height": 960,
  31. "Size": 3090951,
  32. "Width": 540
  33. }
  34. ]
  35. }