Server APIs v2

Merge recorded files on CDN

Update Time:2021-10-25 17:43

1 Description

Merges multiple recorded files into one. Currently, only mp3 and mp4 files are supported.

To use the CDN recording service, you will need to contact ZEGO Technical Support to enable it first. For pricing details, you can check with our sales.

2 Request method and endpoint

  • Request method: GET
  • Request endpoint: https://rtc-api.zego.im/?Action=MergeMedia
  • Transmission protocol: HTTPS
  • Rate limit: 20 requests/second

3 Request parameters

Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Server APIs public request parameters.

Parameter Type Required Description
Vendor String Yes The CDN provider.
  • Tencent: Tencent Cloud
Format String No Recording file format (for Tencent Cloud: mp3, mp4).
InputFileId[] Array of String Yes File IDs of the files to be merged. The merging will be done in listing order.
Example: InputFileId[]=5285890813221514958&InputFileId[]=5285890813221513290
OutputFileName String Yes The file name of the merged file, excluding the file format.

4 Request example

https://rtc-api.zego.im/?Action=MergeMedia
&Vendor=Tencent
&Format=mp3
&InputFile[]=5285890813221514958&InputFile[]=5285890813221513290
&OutputFile=dt6
&<Public Request Parameters>

5 Response parameters

Parameter Type Description
Code Number Return code.
Message String Description of the request execution result.
RequestId String Request ID.
Data Object Returned data.

6 Response example

{
    "Code":0,
    "Message":"success",
    "Data":null,
    "RequestId":"3574501647605445341"
}

7 Return codes

Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.

Return code Description
41001 Failed to save live stream.
41002 Failed to save channel.
41003 Live stream does not exist.
41004 Stream no longer exists.
42001 Failed to forbid live stream.
42002 Failed to resume live stream.
43001 Failed to create recording index file.