All Products
Search
Document Center

ApsaraVideo VOD:UploadStreamByURL

最終更新日:Jul 19, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
StreamURLstringYes

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
MediaIdstringYes

The media ID in ApsaraVideo VOD.

ca3a8f6e49*****57b65806709586
DefinitionstringYes

The quality of the video stream.

For more information about valid values of this parameter, see Parameters for media assets.

HD
FileExtensionstringNo

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
HDRTypestringNo

The HDR type of the transcoded stream. Valid values:

  • HDR
  • HDR10
  • HLG
  • DolbyVision
  • HDRVivid
  • SDR+
Note
  • The HDR type of the transcoded stream is not case-sensitive.

  • You can leave this parameter empty for non-HDR streams.

HDR10
UserDatastringNo

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

ParameterTypeDescriptionExample
object

The basic information.

RequestIdstring

The ID of the request.

7AE96389-DF1E-598D-816B-7B40F13B4620
StreamJobIdstring

The ID of the stream upload job. This parameter is used when you call the GetURLUploadInfos operation.

In ApsaraVideo VOD, you can upload only one transcoded stream in an upload job. For more information, see the PlayInfo: the playback information about a video stream section in Basic structures.

e304b34fb3d959f92baef97b6496****
FileURLstring

The URL of the OSS object.

http://outin-31059bcee7810a200163e1c8dba****.oss-cn-shanghai.aliyuncs.com/lesson-01.mp4
SourceURLstring

The URL of the input stream. This parameter is used when you call the GetURLUploadInfos operation.

https://example.com/lesson-01.mp4

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
2021-12-22The response structure of the API has changedView Change Details
2021-12-20The response structure of the API has changedView Change Details
2021-11-16The request parameters of the API has changedView Change Details
2021-10-28Add OperationView Change Details