This topic describes the notification content and sample callbacks of the UploadByURLComplete event generated after a transcoded stream is uploaded.

Event type

UploadByURLComplete

Note The UploadByURLComplete event is generated after you upload a transcoded stream or a video by using URLs. However, the FileType and StreamFileURL parameters are added to the event when a transcoded stream is uploaded by using a URL. For more information, see UploadByURLComplete (for video uploads).

Event description

The UploadByURLComplete event is generated after a transcoded stream is uploaded by calling the UploadStreamByURL operation.

Event notification content

Parameter 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 UploadByURLComplete.
VideoId String Yes The ID of the video to which the transcoded stream is added.
JobId String Yes The ID of the transcoding job.
SourceURL String Yes The URL of the source file.
FileType String Yes The file type of the uploaded stream. Valid value: Stream.
Status String Yes Indicates whether the transcoded stream is uploaded. Valid values:
  • success: The transcoded stream is uploaded.
  • fail: The transcoded stream fails to be uploaded.
StreamFileURL String No The URL of the OSS object. This parameter is available when the transcoded stream is uploaded.
ErrorCode String No The error code. This parameter is available when an error occurs during upload.
ErrorMessage String No The error message. This parameter is available when an error occurs during upload.
Extend String No The user-defined parameter that is returned in the pass-through mode in callbacks. For more information, see Request parameters.

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.
  • The following sample code indicates that the upload is successful.
    {
    "Status":"success",
    "SourceURL":"https://example.com/record/live/03/2021-09-17-14-06-35_2021-09-17-14-07-29",
    "VideoId":"0a389969855b438a9eb2a1d1efc0****",
    "EventType":"UploadByURLComplete",
    "FileType":"Stream",
    "EventTime":"2021-12-21T04:04:01Z",
    "StreamFileURL":"http://outin-31059bcee78111eaa0a200163e1c****.oss-cn-shanghai.aliyuncs.com/0a389969855b438a9eb2a1d1efc0cb9f/5d018d2bc9400d1831f9868a04e4a5f****.flv",
    "JobId":"5d018d2bc9400d1831f9868a04e4****"
    }
  • The following sample code indicates that the upload failed.
    {
    "Status":"fail",
    "SourceURL":"https://example.com/record/live/03/2021-09-17-14-06-35_2021-09-17-14-07",
    "VideoId":"0a389969855b438a9eb2a1d1efc0****",
    "EventType":"UploadByURLComplete",
    "FileType":"Stream",
    "EventTime":"2021-12-21T04:05:33Z",
    "ErrorCode":"Fail",
    "ErrorMessage":"download status code = 404",
    "JobId":"c0b543f9347452c4d3e220ef3495****"
    }