Uploads a media stream file based on the URL of the source file.
Operation description
-
Pull a media stream file based on a URL and upload the file. After the media stream file is uploaded, the media stream is associated with the specified media asset ID.
-
Upload media stream files only to ApsaraVideo VOD, but not to your own Object Storage Service (OSS) buckets. To upload a media stream file to an OSS bucket, pull the file to a local directory, use OSS SDK to upload the file to an OSS bucket, and then call the RegisterMediaStream operation to associate the media stream with the specified media asset ID.
-
This operation is available only in the China (Shanghai), China (Beijing), and China (Shenzhen) regions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:UploadStreamByURL |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| StreamURL |
string |
No |
The URL of the transcoded stream file. If the URL of the transcoded stream requires authentication, you must specify the authentication parameters in the stream URL and make sure that the URL can be accessed over the Internet. |
https://example.com/sample-stream.mp4 |
| MediaId |
string |
No |
The ID of the media asset. |
411bed50018971edb60b0764a0ec6*** |
| Definition |
string |
No |
The quality of the media stream. Valid values:
|
HD |
| FileExtension |
string |
No |
The file name extension of the media stream. |
mp4 |
| HDRType |
string |
No |
The high dynamic range (HDR) format of the transcoded stream. Valid values:
Note
|
HDR10 |
| UserData |
string |
No |
The user data. |
{"MessageCallback":{"CallbackURL":"http://test.test.com"}, "Extend":{"localId":"xxx","test":"www"}} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
******89-C21D-4B78-AE24-3788B8****** |
| JobId |
string |
The ID of the upload job. |
****cdb3e74639973036bc84**** |
| MediaId |
string |
The ID of the media asset. |
411bed50018971edb60b0764a0ec6*** |
| FileURL |
string |
The OSS URL of the file. |
http://outin-***.oss-cn-shanghai.aliyuncs.com/stream/48555e8b-181dd5a8c07/48555e8b-181dd5a8c07.mp4 |
| SourceURL |
string |
The URL of the source file that is uploaded in the upload job. |
https://example.com/sample-stream.mp4 |
Examples
Success response
JSON format
{
"RequestId": "******89-C21D-4B78-AE24-3788B8******",
"JobId": "****cdb3e74639973036bc84****",
"MediaId": "411bed50018971edb60b0764a0ec6***",
"FileURL": "http://outin-***.oss-cn-shanghai.aliyuncs.com/stream/48555e8b-181dd5a8c07/48555e8b-181dd5a8c07.mp4",
"SourceURL": "https://example.com/sample-stream.mp4"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.