Mengunggah aliran yang telah dikodekan ulang ke ApsaraVideo VOD dari penyimpanan eksternal.
Deskripsi operasi
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.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:UploadStreamByURL |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| StreamURL |
string |
Yes |
URL aliran yang telah dikodekan ulang. Jika otentikasi URL diperlukan, Anda harus meneruskan informasi otentikasi pada parameter ini dan memastikan bahwa URL dapat diakses melalui Internet. |
https://example.com/lesson-01.mp4 |
| MediaId |
string |
Yes |
ID media di ApsaraVideo VOD. |
ca3a8f6e49*****57b65806709586 |
| Definition |
string |
Yes |
Kualitas aliran video. Untuk informasi lebih lanjut tentang nilai valid parameter ini, lihat Parameter untuk Aset media. |
HD |
| FileExtension |
string |
No |
Ekstensi nama file aliran yang telah dikodekan ulang. Untuk informasi lebih lanjut, lihat bagian Format file media yang didukung di Ikhtisar. Jika Anda menetapkan nilai untuk parameter ini, ekstensi nama file yang ditentukan di StreamURL akan ditimpa. Catatan
Parameter ini wajib jika Anda tidak menentukan ekstensi nama file di StreamURL. |
mp4 |
| HDRType |
string |
No |
Tipe HDR dari aliran yang telah dikodekan ulang. Nilai valid:
Catatan
|
HDR10 |
| UserData |
string |
No |
Parameter yang ditentukan pengguna. Untuk informasi lebih lanjut, lihat bagian "UserData: menentukan konfigurasi kustom untuk unggahan media" pada topik Parameter permintaan. Catatan
Konfigurasi callback yang Anda tentukan untuk parameter ini hanya berlaku setelah Anda menentukan URL callback HTTP dan memilih event callback tertentu di Konsol ApsaraVideo VOD. Untuk informasi lebih lanjut tentang cara mengonfigurasi pengaturan callback HTTP di Konsol ApsaraVideo VOD, lihat Konfigurasikan pengaturan callback. |
{"MessageCallback":{"CallbackURL":"http://aliyundoc.com"}, "Extend":{"localId":"xxx","test":"www"}} |
| UploadMetadata |
string |
No |
Metadata untuk file media yang diunggah, dalam format string JSON. Untuk informasi lebih lanjut, lihat tabel UploadMetadata di bawah ini. |
{"AddressMapping":"1","CustomPath":"test/xxx","CustomFileName":"xxx.mp4","isOverwritePath":"0"} |
| Nama | Tipe | Wajib | Deskripsi |
| AddressMapping | String | Tidak | Aturan pemetaan alamat. Nilai valid: 1 memetakan URL aliran yang telah dikodekan ulang, dan 2 menentukan jalur kustom. |
| CustomPath | String | Tidak | Jalur file kustom. Panjang nilai tidak boleh melebihi 1.000 byte dan harus dikodekan dalam UTF-8. |
| CustomFileName | String | Tidak | Nama file kustom. Panjang nilai tidak boleh melebihi 1.000 byte dan harus dikodekan dalam UTF-8. |
| IsOverwritePath | String | Tidak | Apakah akan menimpa jalur file kustom jika sudah ada. Nilai valid: 0 tidak menimpa, dan 1 menimpa. |
Jika Anda menetapkan AddressMapping ke 2, Anda harus menentukan CustomPath dan CustomFileName.
Jika Anda menetapkan IsOverwritePath ke 0 dan jalur file kustom sudah ada, operasi akan mengembalikan kegagalan.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The basic information. |
||
| RequestId |
string |
The ID of the request. |
7AE96389-DF1E-598D-816B-7B40F13B4620 |
| StreamJobId |
string |
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**** |
| FileURL |
string |
The URL of the OSS object. |
http://outin-31059bcee7810a200163e1c8dba****.oss-cn-shanghai.aliyuncs.com/lesson-01.mp4 |
| SourceURL |
string |
The URL of the input stream. This parameter is used when you call the GetURLUploadInfos operation. |
https://example.com/lesson-01.mp4 |
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.