Recording calls with the Daily API

A notification to start recording a call appears on top of the call participants in Daily Prebuilt

There are multiple ways to record calls of up to three hours with the Daily API. This guide walks through the different options, including why and how to use each recording type:

It also covers how to transcode the .webm files returned by most of the recording types, and recommends best practices for recording calls with Daily.

Receive a $15 credit for free

Try Daily pay-as-you-go features for free! New accounts have a $15 credit automatically applied when you add a credit card to the account. Learn more about pay-as-you-go features on our pricing page.

Daily recording types

cloud

The cloud recording type records a Daily call server-side. By default, "cloud" outputs video at 1920x1080, 30 fps encoded as H.264 at 5 Mbps, and audio encoded as AAC at 96 kbps, in the MP4 container format. The .mp4 files can be retrieved via the Daily REST API, or from the Daily dashboard. Recordings are stored in the Daily cloud until a Daily domain owner deletes them through the REST API or through the dashboard.

With cloud recording, it's possible to configure the layout of the recording.

Cloud is the best choice if your users need to record from any browser or device, or if you want control over the look and feel of the recording output. Cloud recordings are also conveniently available for download from the Daily dashboard.

Cloud recording is available for HIPAA use cases. To use cloud recording for a HIPAA-enabled call, you must store recordings in an S3 bucket.

Turn on cloud recording

To allow any participant in a room to start a cloud recording, set the enable_recording property to "cloud" at the room level.

This can be done through an API request:

If instead of the whole room, only select participants should be able to start a recording, set the enable_recording property to "cloud" on those participants’ meeting tokens.

Once cloud recording is enabled, you can call the daily-js methods startRecording(), updateRecording() and stopRecording() in your app to manage the recording process.

You also have the option of having the recording start automatically as soon as the user with the appropriate meeting token joins the room. This is done by using the "start_cloud_recording" boolean property when generating the meeting token.

Customize cloud recording layouts

You can pass configuration properties to either startRecording() or updateRecording() to control the look and feel of the final output.

The options currently include:

  • height, width: Controls the resolution of the recording.
  • backgroundColor: Specifies the background color of the recording, formatted as #rrggbb or #aarrggbb string.
  • layout: an object specifying the way participants’ videos are laid out in the recording. A preset key with one of the following values must be provided:
    • "default": This is the default grid layout, which renders participants in a grid, or in a vertical grid to the right, if a screen share is enabled. Optionally, a max_cam_streams integer key can be provided to specify how many cameras to include in the grid. The default value is 20, which is also the maximum number of cameras in a grid. The maximum may be increased at a later date.

Example "default" layout:

Grid of nine participants on a video call

Example screenshare "default" layout:

A screenshare takes up the main video call screen with participant videos to the right vertically

  • "single-participant": Use this layout to limit the audio and video to be streamed to a specific participant. The selected participant’s session ID must be specified via a session_id key.

Example "single-participant" layout:

One participant video screen takes up the entire video call

  • "active-participant": This layout focuses on the current speaker, and places up to 9 other cameras to the right in a vertical grid in the order in which they last spoke.

Example "active-participant" layout:

One participant video screen takes up the majority of space on a call with two others to the right in a small vertical bar

  • "portrait": Allows for mobile-friendly layouts. The video will be forced into portrait mode, where up to 2 participants will be shown. An additional variant key may be specified. Valid values are "vertical" for a vertical grid layout (the default), and "inset" for having one participant's video take up the entire screen and the other inset in a smaller rectangle. Participants' videos are scaled and cropped to fit the entire available space. Participants with the is_owner flag are shown lower in the grid (vertical variant), or full screen (inset variant).

Example "portrait" layout with "vertical" variant:

Two participant screens on a mobile vertical video call

Example "portrait" layout with "inset" variant:

Two participant screens on a mobile vertical video call

  • "custom": Allows for a custom layout, including text overlay, image overlay, and more. This option provides access to Daily's Video Component System, which allows you to pass composition_params and session_assets to customize the appearance of your recording. It is available for "cloud" recordings and live streaming feeds. A full list of available parameters is available in the reference docs. You can also test available options with the VCS Simulator.

Example "custom" layout with a text overlay:

Text overlay and dominant video layout example

Retrieve cloud recordings

You can retrieve all your completed cloud recordings from the Daily dashboard "Recordings" tab.

To learn how to manage your recordings with the Daily /recordings endpoint, head to our reference docs.

Using cloud recording with Daily Prebuilt

For rooms where cloud recording is enabled, end users can start their own recordings using the "Record" button. When a recording is started, a layout is automatically selected for the user based on their current layout:

If "Grid view" is selected, then a preset of "default" is used If "Speaker view" is selected, then a preset of "active-speaker" is used

For programmatic control over recording and additional layout presets, use the startRecording() and updateRecording() methods.

For the best user experience when using a single-participant recording, use a meeting token for the recorded user where the enable_recording property is set to "cloud". This will ensure that only the recorded participant sees the recording UI.

local

Because local recording happens on a participant's own device and relies on local compositing, the final recording quality will be subject to browser and device limitations.

The participant recording the call must also be using Chrome on desktop.

Please refer to our best practices for guidelines on ensuring a smooth user experience.

Local recording saves the finished recording as a .webm file on the participant's computer. The file may need to be transcoded in order to compress the size and to be played back on most devices.

Use this recording type if you would like to access recordings directly on a participant’s computer, instead of via the Daily cloud. Local recording is also HIPAA-friendly.

Turn on local recording

To allow any call participant to start a recording, set the enable_recording property to "local" at the room level. This can be done either through the Daily API or from the dashboard.

To create a room with "local" recording enabled from the dashboard:

  1. Open the "Rooms" tab and click the "Create Room" button.

  2. Select "Local recording".

  3. Click "Create room".

Arrow points to Recording option on the Daily dashboard create room page

If only select participants should be able to start a recording, set the enable_recording property to "local" on those participants’ meeting tokens.

Once local recording is enabled, you can call the daily-js methods startRecording() and stopRecording() in your app to manage the recording process.

Retrieve local recordings

Local recordings will be immediately downloaded to the computer of the participant who stops the recording.

Using local recording with Daily Prebuilt

If you're using local recording with Daily Prebuilt, be sure to tell the participant who clicked "Start" recording to click "Stop" before they leave the call.

If the participant who started a recording leaves the room without stopping it, then the recording will be lost. Daily Prebuilt attempts to warn the user before they leave to avoid losing any recordings.

raw-tracks

"raw-tracks" captures each individual media track from a call separately and stores them in your custom S3 bucket.

If you need to manage individual media tracks separately, use this recording type. This is often useful for high-quality audio transcription and media production, like for podcasts or video blogs.

Turn on raw-tracks recording

To allow any call participant to start a recording, set enable_recording to "raw-tracks" at the room level through a POST request to the Daily /rooms endpoint.

If only a specific participant or participants should be able to start a recording, set enable_recording to "raw-tracks" at the meeting token level, with a POST request to the Daily /tokens endpoint.

Once raw-tracks is enabled, you can call the daily-js methods startRecording() and stopRecording() in your app to manage the recording.

How to transcode .webm files

local and raw-tracks recording types return .webm files.

They must be transcoded, converted to .mp4 files, for most use cases.

There are two ways to do so:

  1. CloudConvert: Browser software that offers free and paid plains
  2. Handbrake: A free app for Windows and macOS

Transcode with CloudConvert

  • Sign up at https://www.cloudconvert.com
  • In the gray top bar, select your conversion settings. You probably want 'webm' to 'mp4'. (If you're extracting audio only, convert 'webm' to 'mp3').
  • Click "Select Files". Your webm file needs to be cloud accessible, with Dropbox, Google Drive, Box, etc.
  • At the bottom of your window, select where you want your converted files saved.
  • Click "Start Conversion".

CloudConvert UI show dropdown list of options to convert CloudConvert UI displays button to Start Conversion

Transcode with Handbrake on Windows

  • Download and install Handbrake.
  • Select the video or folder with your videos for encoding. Drag the videos into Handbrake. Or click either "Folder (Batch Scan)" or "File", to browse your computer for video files.
  • Handbrake’s default settings should be fine. However, setting Presets to "Fast 1080p30" and Format to "MP4" will produce a widely accessible transcoded video.

Handbrake UI displays options for the format tracks and filters for transcoding the file

  • Click "Browse" (bottom right corner) to assign a name/location for your transcoded video.
  • Press "Start Encode" to begin transcoding

Transcode with Handbrake on MacOS

  • Download and install Handbrake.
  • Select the video or folder with your videos for encoding. By default when opening Handbrake a window should appear where you can make this selection; however, if this doesn't appear, you can click "Open Source" (top left corner) to browse your computer for video files.
  • Handbrake’s default settings should be fine. However, setting Format to "MP4 File" and Video Encoder to "H.264 (x264)" will produce a widely accessible transcoded video.

Handbrake UI displays options for the format tracks and filters for transcoding the file on mac

  • Click "Browse" (on the right in the "Destination" section of the window) to assign a name/location for your transcoded video.
  • Press "Start" to begin transcoding.

Viewing recordings without transcoding

You also can view .webm files without transcoding in two ways:

  1. Viewing them in your browser with Chrome or Firefox
  2. Or using VLC Media Player, a versatile, open source media player which can be found at: https://www.videolan.org/vlc/index.html

Need more help with transcoding? Contact us.

Best practices for recording calls with Daily

We suggest sharing the following tips across your team, so it can be shared in places like:

  • Onboarding guides
  • In-product links
  • Help center FAQs

Feel free to copy and paste and repurpose any of the below. Please include this in your own material, rather than directing your customers to the Daily site!

Tips for the best recording experience

Use ethernet if possible

If participants will be recording a lot of calls, they should use wired Ethernet connections if available, rather than WiFi. Ethernet reduces network packet loss and makes a big difference for audio and video quality.

Stop the recording before leaving the call

Before the participant who started recording leaves the call, make sure they stop the recording. If they don't, the recording status could become stuck 'in-progress' and the file unable to be retrieved.