Skip to main content

Individual recording with postponed transcoding

Postponed transcoding generates a single MP4 file containing both audio and video, unlike individual recording, which produces separate audio and video files for each UID. With postponed transcoding, Cloud Recording processes the files within 24 hours (or 48 hours in special cases) after recording and uploads the MP4 file to your specified third-party cloud storage. This option is ideal for use-cases where combining audio and video streams into one file is preferred and immediate transcoding is unnecessary.

Note

In postponed transcoding, recorded files are cached on Agora's edge server for up to 24 hours. If data security is important to your business, consider this when deciding whether to use postponed transcoding. For questions, contact Agora technical support.

Implementation

To set up postponed transcoding, use the following clientRequest configuration:

  • Set the appsCollection.combinationPolicy field to postpone_transcoding.
  • Set the transcodeOptions.transConfig.transMode field to postponeTranscoding.
  • Set the field format as needed. For supported values, see the API documentation.

The following request example shows how to enable postponed transcoding:


_52
{
_52
"cname": "httpClient463224",
_52
"uid": "527841",
_52
"clientRequest": {
_52
"token": "<token if any>",
_52
// highlight-start
_52
"appsCollection": {
_52
"combinationPolicy": "postpone_transcoding"
_52
},
_52
"transcodeOptions": {
_52
"container": {
_52
"format": "mp4"
_52
},
_52
"transConfig": {
_52
"transMode": "postponeTranscoding"
_52
}
_52
},
_52
// highlight-end
_52
"recordingConfig": {
_52
"channelType": 1,
_52
"streamTypes": 2,
_52
"streamMode": "default",
_52
"videoStreamType": 0,
_52
"maxIdleTime": 30,
_52
"subscribeAudioUids": [
_52
"123",
_52
"456"
_52
],
_52
"subscribeVideoUids": [
_52
"123",
_52
"456"
_52
],
_52
"subscribeUidGroup": 0
_52
},
_52
"recordingFileConfig": {
_52
"avFileType": [
_52
"hls"
_52
]
_52
},
_52
"storageConfig": {
_52
"vendor": 2,
_52
"region": 3,
_52
"bucket": "xxxxx",
_52
"accessKey": "xxxxx",
_52
"secretKey": "xxxxx",
_52
"fileNamePrefix": [
_52
"directory1",
_52
"directory2"
_52
]
_52
}
_52
}
_52
}

vundefined