All Products
Search
Document Center

ApsaraVideo Live:UpdateLiveAppRecordConfig

Last Updated:Jun 10, 2026

Memperbarui konfigurasi perekaman aliran langsung yang menyimpan output ke Object Storage Service (OSS).

Deskripsi operasi

QPS limit

You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

live:UpdateLiveAppRecordConfig

update

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DomainName

string

Yes

Domain streaming utama.

example.com

AppName

string

Yes

AppName aliran langsung.

liveApp****

OssEndpoint

string

Yes

Titik akhir untuk penyimpanan OSS. Anda harus membuat Bucket OSS sebelum menggunakan fitur ini. Lihat Configure OSS.

learn.developer.aliyundoc.com

StreamName

string

No

Nama aliran langsung.

teststream

StartTime

string

No

Waktu mulai perekaman. Format: yyyy-MM-ddTHH:mm:ssZ (waktu UTC).

Catatan

Parameter ini hanya berlaku untuk perekaman tingkat aliran (yaitu, ketika StreamName ditentukan). Waktu harus berada dalam 7 hari dari waktu mulai aliran sebenarnya.

2018-04-10T09:57:21Z

EndTime

string

No

Waktu akhir perekaman. Format: yyyy-MM-ddTHH:mm:ssZ (waktu UTC).

Catatan

Parameter ini hanya berlaku untuk perekaman tingkat aliran. Interval antara EndTime dan StartTime tidak boleh melebihi 7 hari.

2018-04-16T09:57:21Z

OnDemand

integer

No

Menentukan mode perekaman. Nilai valid:

  • 0: Menonaktifkan perekaman sesuai permintaan.

  • 1: Perekaman sesuai permintaan melalui callback HTTP.

  • 2: Perekaman sesuai permintaan dengan Penguraian parameter di URL ingest.

  • 7: Perekaman manual. Anda dapat memanggil API RealTimeRecordCommand untuk memulai atau menghentikan perekaman secara manual.

Catatan

Jika Anda mengatur OnDemand menjadi 1, Anda harus memanggil API AddLiveRecordNotifyConfig untuk mengonfigurasi parameter OnDemandUrl. Jika tidak, ApsaraVideo Live tidak akan melakukan perekaman sesuai permintaan.

1

DelayTime

integer

No

Jendela dalam detik untuk menggabungkan rekaman terfragmentasi setelah gangguan. Jika aliran terputus dan tersambung kembali dalam jendela ini, perekaman berlanjut dalam file yang sama. Nilai valid: 15 hingga 21600.

180

RecordFormat

array<object>

No

Detail perekaman.

object

No

CycleDuration

integer

No

The duration of a single recording cycle in seconds. If not specified, the default value is 6 hours

Catatan

If a live stream is interrupted during a recording cycle but resumes normal streaming within the merge window, recording will continue in the same file. A recording file is generated only when a live stream is interrupted for longer than the merge window.

1

Format

string

No

The recording format. Valid values:

Penting

If you choose m3u8 or cmaf, you must also set SliceOssObjectPrefix and SliceDuration. At least one of RecordFormat or TranscodeRecordFormat must be specified.

  • m3u8

  • flv

  • mp4

  • cmaf

m3u8

SliceDuration

integer

No

The duration of a single segment. Unit: seconds

Catatan

This parameter takes effect only if you set the RecordFormat.N.Format parameter to m3u8 or cmaf.

If you do not specify this parameter, the default value 30 seconds is used. Valid values: 5 to 30.

30

TranscodeRecordFormat

array<object>

No

Konfigurasi perekaman aliran yang telah dikodekan ulang.

object

No

CycleDuration

integer

No

The transcoded stream recording cycle. Unit: seconds. If you do not specify this parameter, the default value 6 hours is used.

21600

Format

string

No

The format of the transcoded stream recording. Valid values:

Catatan

If you choose m3u8 or cmaf, you must specify the TranscodeRecordFormat.N.SliceOssObjectPrefix and TranscodeRecordFormat.N.SliceDuration parameters.

  • m3u8

  • flv

  • mp4

  • cmaf

m3u8

SliceDuration

integer

No

The duration of a single segment for transcoded stream recording. Unit: seconds.

Catatan

This parameter takes effect only if you set the TranscodeRecordFormat.N.Format parameter to m3u8 or cmaf.

If you do not specify this parameter, the default value 30 seconds is used. Valid values: 5 to 30.

30

TranscodeTemplates

array

No

Detail kelompok template transkoding.

string

No

  • The transcoding template. You can configure up to 10 transcoding templates at a time.

  • If you specify the TranscodeRecordFormat.N.xxx parameters, configure at least one transcoding template.

  • To record multiple or all transcoded streams, you can set TranscodeTemplates.1 to ***** (five asterisks).

Catatan

TranscodeTemplates is not allowed to pass in raw, which is a reserved identifier.
The .N in TranscodeTemplates.N represents an incremental index for specifying multiple templates. For example: TranscodeTemplates.1=sd, TranscodeTemplates.2=hd.

sd

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 InvalidOssBucket.Malformed Specified parameter OssBucket is not valid.
400 InvalidOssBucket.NotFound The parameter OssBucket does not exist.
400 InvalidFormat.Malformed Specified parameter Format is not valid.
400 InvalidCycleDuration.Malformed Specified CycleDuration Format is not valid.
400 InvalidSliceDuration.Malformed Specified SliceDuration Format is not valid.
400 InvalidTemplateLength.Malformed Specified record template length is not valid.
400 InvalidTemplate.ForbidRaw Template named raw is Forbidden.
400 MissingTemplate Template is mandatory for this action.
400 MissingOssObjectPrefix OssObjectPrefix is mandatory for this action.
400 MissingSliceOssObjectPrefix SliceOssObjectPrefix is mandatory for this action.
400 InvalidOssObjectPrefix.Malformed Specified parameter OssObjectPrefix is not valid.
400 InvalidSliceOssObjectPrefix.Malformed Specified parameter SliceOssObjectPrefix is not valid.
400 ConfigAlreadyExists Config has already exist.
400 InvalidFormat.IllegalOperation Specified parameter Format can not be multiple.
400 InvalidDelayTime Specified Delaytime is invalid.
400 Live2Vod.ConfigAlreadyExists Had live2vod record config already.
400 InvalidStartTime.Malformed Specified StartTime is malformed.
400 InvalidEndTime.Malformed Specified EndTime is malformed.
400 InvalidEndTime.Mismatch Specified EndTime does not math the specified StartTime or current time.
400 InvalidStartTime.Mismatch Specified StartTime does not math the current time.
400 Forbidden Ram Permission is forbidden.
400 InvalidOssEndpoint.Malformed %s, please check and try again later.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.