Uploads transcoded streams to ApsaraVideo VOD from external storage.
Operation description
- Make sure that you understand the billing method and price of ApsaraVideo VOD before you call this operation. You are charged storage fees after you upload media files to ApsaraVideo VOD. For more information, see Billing of media asset storage. If you have activated the acceleration service, you are charged acceleration fees when you upload media files to ApsaraVideo VOD. For more information, see Billing of acceleration traffic.
- This operation is available only in the China (Shanghai) and Singapore regions.
- You can call this operation to upload transcoded streams to ApsaraVideo VOD from external storage. The following HDR types of transcoded streams are supported: HDR, HDR 10, HLG, Dolby Vision, HDR Vivid, and SDR+.
- You can call the GetURLUploadInfos operation to query the upload status. After the upload is complete, the callback of the UploadByURLComplete event is returned.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vod:UploadStreamByURL | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
StreamURL | string | Yes | The URL of the transcoded stream. If URL authentication is required, you must pass authentication information in this parameter and make sure that the URL can be accessed over the Internet. | https://example.com/lesson-01.mp4 |
MediaId | string | Yes | The media ID in ApsaraVideo VOD. | ca3a8f6e49*****57b65806709586 |
Definition | string | Yes | The quality of the video stream. For more information about valid values of this parameter, see Parameters for media assets. | HD |
FileExtension | string | No | The file name extension of the transcoded stream. For more information, see the Supported media file formats section in Overview . If you set a value for this parameter, the file name extension specified in StreamURL is overwritten. Note
This parameter is required if you do not specify a file name extension in StreamURL.
| mp4 |
HDRType | string | No | The HDR type of the transcoded stream. Valid values:
Note
| HDR10 |
UserData | string | No | The user-defined parameter. For more information, see the "UserData: specifies the custom configurations for media upload" section of the Request parameters topic. Note
The callback configurations you specify for this parameter take effect only after you specify the HTTP callback URL and select specific callback events in the ApsaraVideo VOD console. For more information about how to configure HTTP callback settings in the ApsaraVideo VOD console, see Configure callback settings.
| {"MessageCallback":{"CallbackURL":"http://aliyundoc.com"}, "Extend":{"localId":"xxx","test":"www"}} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "7AE96389-DF1E-598D-816B-7B40F13B4620",
"StreamJobId": "e304b34fb3d959f92baef97b6496****",
"FileURL": "http://outin-31059bcee7810a200163e1c8dba****.oss-cn-shanghai.aliyuncs.com/lesson-01.mp4",
"SourceURL": "https://example.com/lesson-01.mp4"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2021-12-22 | The response structure of the API has changed | View Change Details |
2021-12-20 | The response structure of the API has changed | View Change Details |
2021-11-16 | The request parameters of the API has changed | View Change Details |
2021-10-28 | Add Operation | View Change Details |