Agora Cloud Recording Composite Host (person that requested) not recorded in Web

67 Views Asked by At

https://api.agora.io/v1/apps/{{APPID}}/cloud_recording/resourceid/{{resourceId}}/mode/{{mode-type}}/start

When I try to use Cloud Recording Composite with the official Agora API documentation in Postman, I do get the recordings in MP4 format fine, all users in the call are present except for the person who requested (uid passed in the request). How do I include the hosts audio and video streams to the MP4 composite recording?

(In this example all users present are using the web version)

{
    "cname":"yXazJoR5lR7LXaay9g4l",
    "uid": "123",// Person with this UID will not be included in the composite recording.
    "clientRequest": {
        "token": "",
        "recordingConfig": {
            "channelType": 0,
            "streamTypes": 2,
            "audioProfile": 1,
            "videoStreamType": 0,
            "maxIdleTime": 120,
            "transcodingConfig": {
                "width": 1920,
                "height": 1080,
                "fps": 30,
                "bitrate": 3150,
                "maxResolutionUid": "123",
                "mixedVideoLayout": 0
            },
            "subscribeUidGroup": 1
        },
        "recordingFileConfig": {
            "avFileType": ["hls","mp4"]
        },
        "storageConfig": {
            "vendor": 6,
            "region": 6,
            "bucket": "x",
            "accessKey": "x",
            "secretKey": "x"
        }
    }
}

I tried specifying subscribeVideoUids and subscribeAudioUids but that did not help, the host was still not present in the agora composite recording MP4.

1

There are 1 best solutions below

0
On

Solved this by using a unique, random user UID in the uid field. Make sure to specify subscribeVideoUids and subscribeAudioUids

Documentation

The recording service is equivalent to a non-streaming client in the channel. The uidparameter in the request body is used to identify the recording service and cannot be the same as any existing user ID in the channel. For example, if there are two users already in the channel and their user IDs are 123 and 456, the uid cannot be "123" or "456".