Menambahkan konfigurasi Transkoding kustom untuk domain streaming dengan Real-Time Streaming (RTS) diaktifkan.
Deskripsi operasi
Usage notes
You can call this operation to add a custom RTS transcoding configuration. This operation supports only the following types of custom transcoding templates: h264, h264-nbhd, h264-origin, and audio.
QPS limits
You can call this operation up to 50 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions. For more information, see QPS limits.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:AddRtsLiveStreamTranscode |
create |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah. |
cn-shanghai |
| Domain |
string |
Yes |
Domain streaming. |
example.com |
| App |
string |
Yes |
AppName dari aliran langsung. Persyaratan:
|
aliyun-test |
| Template |
string |
Yes |
Nama template Transcoding kustom. Persyaratan:
Catatan
Nama tidak boleh sama dengan nama template transkoding standar. |
ld |
| TemplateType |
string |
Yes |
Tipe template transkoding kustom. Nilai valid:
Catatan
Untuk tipe video, Height, Width, FPS, VideoBitrate, dan DeleteBframe diperlukan. |
h264 |
| Height |
integer |
No |
Tinggi video output dalam piksel. Penting
Diperlukan jika Anda menetapkan TemplateType ke h264, h264-nbhd, atau h264-origin. Persyaratan:
Misalnya, resolusi 1560 × 1560 (video dengan format persegi) tidak valid. Catatan
Untuk template h264-origin, resolusi dapat mencapai 4K untuk mempertahankan informasi aliran sumber. |
1280 |
| Width |
integer |
No |
Lebar video output dalam piksel. Penting
Diperlukan jika Anda menetapkan TemplateType ke h264, h264-nbhd, atau h264-origin. Persyaratan:
Misalnya, resolusi 1560 × 1560 (video dengan format persegi) tidak valid. Catatan
Untuk template h264-origin, resolusi dapat mencapai 4K untuk mempertahankan informasi aliran sumber. |
720 |
| FPS |
integer |
No |
Laju frame video output. Unit: frame per detik (FPS). Nilai valid: 1 hingga 60. Penting
Diperlukan jika Anda menetapkan TemplateType ke h264, h264-nbhd, atau h264-origin. . |
30 |
| VideoBitrate |
integer |
No |
Bitrate video output. Unit: kbps. Nilai valid: 1 hingga 6000. Penting
Diperlukan jika Anda menetapkan TemplateType ke h264, h264-nbhd, atau h264-origin. Catatan
Sistem mencoba untuk melakukan transkoding video pada bitrate yang ditentukan. Namun, bitrate aktual mungkin tidak sama dengan nilai yang ditentukan, terutama jika nilai yang ditentukan terlalu tinggi atau terlalu rendah. |
2000 |
| AudioBitrate |
integer |
No |
Bitrate audio output. Unit: kbps. Nilai valid: 1 hingga 1000. Penting
Diperlukan jika Anda menetapkan TemplateType ke audio. . |
128 |
| Gop |
string |
No |
Ukuran Group of Pictures (GOP), yang menentukan interval keyframe. Unit: detik. Nilai valid: 1 hingga 3. |
2 |
| DeleteBframes |
boolean |
No |
Mengontrol apakah akan menghapus B-frame dari video output yang telah dikodekan ulang. Nilai valid: Penting
Diperlukan jika Anda menetapkan TemplateType ke h264, h264-nbhd, atau h264-origin.
|
false |
| Opus |
boolean |
No |
Apakah akan menggunakan codec Opus untuk transkoding audio. Ini terutama untuk kompatibilitas dengan WebRTC native. Nilai valid:
|
true |
| Profile |
integer |
No |
Profil codec video. Nilai yang lebih besar menunjukkan kualitas video yang lebih baik dan konsumsi Sumber daya yang lebih tinggi untuk encoding dan decoding. Nilai valid:
|
2 |
| AudioProfile |
string |
No |
Profil codec audio. Nilai valid:
|
aac_low |
| AudioCodec |
string |
No |
Kodek audio. Nilai valid:
Catatan
Untuk menggunakan codec Opus, atur parameter Opus ke true. |
aac |
| AudioRate |
integer |
No |
Laju sampel audio. Nilai valid: 22050 hingga 96000. Disarankan: 44100. Unit: Hz. Catatan
Jika AudioProfile diatur ke aac_ld, laju sampel tidak boleh melebihi 44100. |
44100 |
| AudioChannelNum |
integer |
No |
Jumlah saluran audio. Nilai valid:
|
2 |
| Lazy |
string |
No |
Apakah akan mengaktifkan transkoding sesuai permintaan. Nilai valid:
|
no |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameters | %s Please check and try again later. | |
| 400 | ConfigAlreadyExists | %s Please check and try again later. | |
| 400 | TemplateLimit | %s Please check and try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.