SFU Recording


SFU recording can be used to save audio/video calls for offline viewing. SFU recording supports both individual and composite recordings.

Types of SFU recording

Individual recording

Media for each peer is provided as a seperate mp4 file. This file will have both audio and video of the peer. These files can be used for offline review or in implementating custom composition.

Composite recording

Audio and video of all peers is composed as per their joining/leaving the meeting and provided as a single mp4. This file can be used for offline viewing of the meeting.

How to enable SFU recording

Using Dashboard

SFU Recording can be enabled when creating a room

Enable recording when creating a room

Using API

Uploading destination configuration

By default recordings will be uploaded to 100ms storage and a presigned URL for the same will be provided to customers via a webhook. The presigned url will expire in 12hours. Customers can also configure the recordings to be stored in their cloud storage. Following are the configurations for the same.

typestringUpload Destination type. Currently, only s3 is supportedYes
locationstringName of the AWS s3 bucket in which you want to store all recordingsYes
prefixstringUpload prefix pathNo
optionsobjectAdditional configurations of type Options to be used for uploadingNo
credentialsobjectObject of type Credentials. This is used to share AWS credentials to access the s3 bucket specifiedNo

Where Options is

regionstringRegion of the AWS account hosting the s3 bucket for storing recordings. If not provided it is assumed to be ap-south-1No

Where Credentials is

keystringAccess Key for the AWS account hosting the s3 bucket for storing recordingsYes
secretstringSecret for the AWS account hosting the s3 bucket for storing recordingsYes

Composite recording mp4 will be placed at - s3://<location>/<prefix>/<room_id>/<start_date>/<session_id>/Rec-<session_id>-<epoch>.mp4. Example s3://test-bucket/test-prefix/61101349d0f56e684b608c08/20210721/5fccb7dc72909272bf999014/Rec-5fccb7dc72909272bf999014-1626898422000.mp4

Individual recording mp4s will be placed at - s3://<location>/<prefix>/<room_id>/<start_date>/<session_id>/<peer_id>/<stream-id>/<stream-id>.mp4. Example s3://test-bucket/test-prefix/61101349d0f56e684b608c08/20210721/5fccb7dc72909272bf999014/76539d6b-d10d-4790-bdd2-ab57fa7facb0/9aeec8db-524d-4129-874d-7a71d340bdec/9aeec8db-524d-4129-874d-7a71d340bdec.mp4