About "rtp-tracks" Recordings

The Daily API supports multiple modes for recording a meeting session, allowing you to save recordings locally or to the cloud. In addition to standard cloud recordings, we also support server-side recordings, referred to as "rtp-tracks" recordings, which capture the individual tracks from each user separately and save them to our cloud servers. After the recording is stopped, the tracks can then be downloaded and combined into a final output file.

Differences between standard "Cloud" recordings and "rtp-tracks" recordings

Using “rtp-tracks” provides developers more flexibility over standard cloud recordings:

  • Individual media tracks can be managed and post-processed separately

  • Media tracks are captured at the server-side, reducing client CPU and bandwidth requirements

  • Chrome is not required if you are using "rtp-tracks". Sessions can be recorded from Chrome, Safari, iOS Safari and Android Chrome

However, please note that the “rtp-tracks” recording mode cannot be used as a drop-in replacement for standard cloud recordings:

  • Recording controls for “rtp-tracks” are not built into the default UI

  • Only standard cloud recordings are listed in the Dashboard under the "Recordings" tab

  • Access links or share tokens cannot be used to download or access “rtp-tracks” recordings

  • Tracks must be downloaded individually and combined using third-party tools

Track information

During an “rtp-tracks” recording, multiple files are saved for each individual track. An individual track refers to the audio and video data from a participant’s camera or screen share. The following information for each track is available using the API:

  • Track ID

  • Download URL (used for retrieving the track)

  • File size, in bytes

  • Start and End Unix timestamps

  • Duration of the track, in seconds

  • Resolution (for video tracks)

  • Participant ID, User Name, User ID, and room owner status for the user that generated the track

  • Media tag, indicating whether the audio or video track was from a camera or screen share

  • Track type, either video or audio

Here is an example of the JSON-formatted response that is returned by the API for a single track:

"id": "f1bd4e4e-02a1-11eb-adc1-0242ac120002",
"download_url": "/v1/recordings/35362560-02a2-11eb-adc1-0242ac120002/track/f1bd4e4e-02a1-11eb-adc1-0242ac120002.webm",
"size": 742786,
"track_start_ts": "1222421596.934000",
"track_end_ts": "1222421821.342000",
"duration": 224.079999923706015,
"resolution": "1024x768",
"session_id": "3ea4971c-02a2-11eb-adc1-0242ac120002",
"media_tag": "screen-video",
"type": "video",
"is_owner": true,
"user_name": "sample",
"user_id": "45bfdcdc-02a2-11eb-adc1-0242ac120002"

Accessing “rtp-tracks” recordings with the API

Using the API to retrieve track information and download individual tracks is similar to making other REST API calls. The following information is needed to download a track:

  • A Daily API key, available from the Developers tab of your Dashboard

  • A recording ID

  • A track ID associated with the recording ID

The following examples make use of cURL, but any tool or library that can make HTTPS requests can be used. For more information, please refer to our reference docs.

Listing all recordings and tracks

Retrieving a list of recordings is done using the REST API. Recordings made using "rtp-tracks" will contain track information in the "tracks" array. Standard cloud recordings will return an empty array.

curl --request GET \
--url https://api.daily.co/v1/recordings \
--header 'authorization: Bearer API_TOKEN'

Retrieving information for a single recording

The REST API can also be used to retrieve information for a specific recording ID. If the recording was made using “rtp-tracks”, the response will include the track information as part of the "tracks" array.

curl --request GET \
--url https://api.daily.co/v1/recordings/RECORDING_ID \
--header 'authorization: Bearer API_TOKEN'

Retrieving information for a single track

To retrieve information about a specific track, include its track ID in the URL. This is the same information returned as part of the “tracks” array.

curl --request GET \
--url https://api.daily.co/v1/recordings/RECORDING_ID/track/TRACK_ID \
--header 'authorization: Bearer API_TOKEN'

Downloading tracks

To download a specific track, you will need its download URL, or the recording and track IDs associated with the track. Please note the inclusion of the “location” argument -L and the file extension .webm at the end of the URL. The resulting data can be redirected to a new file to save the track.

curl --request GET -L \
--header 'authorization: Bearer API_TOKEN' \
--url https://api.daily.co/v1/recordings/RECORDING_ID/track/TRACK_ID.webm >> track_file.webm
Did this answer your question?