Menambahkan aturan subtitle.
Deskripsi operasi
-
After you add a subtitle template by calling the AddLiveAISubtitle operation, you can call this operation to add a subtitle rule.
-
To play a subtitle stream, append _{Subtitle template name} to the StreamName in the playback URL.
-
RTMP: rtmp://example.aliyundoc.com/app/stream_{Subtitle template name}?auth_key={access token}
-
FLV: http://example.aliyundoc.com/app/stream_{Subtitle template name}.flv?auth_key={access token}
-
M3U8: http://example.aliyundoc.com/app/stream_{Subtitle template name}.m3u8?auth_key={access token}
-
The real-time subtitle feature is in invitational preview. You can add up to 300 subtitle templates.
QPS limits
The queries per second (QPS) limit for this operation is 60 per user. If you exceed this limit, API calls are throttled. This may affect your business. Plan your calls accordingly.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:AddLiveAIProduceRules |
create |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah. |
cn-shanghai |
| Domain |
string |
Yes |
Domain streaming. |
demo.aliyundoc.com |
| App |
string |
Yes |
Nama aplikasi live aliran. Nama dapat memiliki panjang hingga 256 karakter dan dapat berisi digit, huruf besar dan kecil, tanda hubung (-), serta garis bawah (_). AppName harus sesuai dengan AppName di URL ingest agar templat dapat berlaku. |
AppName |
| Suffix |
string |
No |
Sufiks yang akan dicocokkan. |
test01 |
| SubtitleName |
string |
No |
Nama templat subtitle. |
sub01 |
| StudioName |
string |
No |
Nama templat latar belakang virtual. |
sub02 |
| IsLazy |
boolean |
No |
Apakah aturan dipicu oleh penarikan aliran. Nilai valid:
|
true |
| LiveTemplate |
string |
Yes |
Spesifikasi subtitle output. Nilai valid:
|
lp_ld |
| Description |
string |
No |
Deskripsi aturan subtitle. Deskripsi dapat berisi karakter Mandarin dan Inggris, digit, serta karakter khusus. Panjangnya dapat mencapai 128 karakter. |
live AI subtitle template |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
5c6a2a0df228-4a64-af62-20e91b96**** |
| RulesId |
string |
The ID of the subtitle rule. |
445409ec-7eaa-461d-8f29-4bec2eb9**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "5c6a2a0df228-4a64-af62-20e91b96****",
"RulesId": "445409ec-7eaa-461d-8f29-4bec2eb9****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | %s. | |
| 400 | InvalidParameter | %s. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.