media server logo
Toggle documentation navigation
Callaba home

Recordings

Use Recordings to capture a live input as a continuous file or timed segments for archive, replay, compliance, or post-production.

What it doesCapture a live source

Choose this whenA live source must become a continuous or segmented file.

Use another module whenUse Files when media is already stored; use Restreams when the output must stay live.

1Select the source2Start recording3Save the asset
POST /api/recording/create
10 endpoints

Before you start

All methods require a valid x-access-token. Create or verify the input first, confirm local disk capacity, select the output format, and define any retention setting before the event.

What you can do

  • create and update configure input, format, recording mode, processing, and retention.
  • getAll, getCount, and getById inspect jobs and produced artifacts.
  • start and stop control capture.
  • getStat reports available bitrate, frame cadence, encode speed, and output progress.
  • removeFile deletes one produced file without removing the job.
  • remove deletes the recording job.

Example workflow

  1. Create a job from an SRT server, RTMP server, video-call source, or supported stream URL.
  2. Select MP4, HLS, or another supported output format and continuous or time-split mode.
  3. Start the job before the required capture window.
  4. Use getStat to confirm input bitrate and output time continue to advance.
  5. Stop the job, verify the files, and copy them to configured storage.

Common use cases

  • Create a continuous program archive for a live event.
  • Split a long surveillance or broadcast recording into predictable intervals.
  • Record a compatible RIST contribution feed for archive or replay.
  • Keep a backup recording with automatic age-based cleanup.

Limits and troubleshooting

A recording needs a healthy live input plus enough disk and processing capacity. Monitor input bitrate and recording progress while it runs, verify the produced files before cleanup, and test any RIST source with the required profile and security settings before the event.

Next steps

Use Files to inspect or transfer the result and Storages to configure durable off-instance retention.

REST solution recipe

Record a live input continuously or in segments

Create a recording from a healthy live source, choose continuous or timed output, start capture, and monitor progress.

  1. Create the recordingChoose the source, format, recording mode, processing, and retention.POST /api/recording/create
  2. Start captureStart only after the source and storage path are ready.POST /api/recording/start
  3. Monitor progressWatch bitrate, frame cadence, encode speed, and output progress.POST /api/recording/getStat

Confirm disk capacity and retention before the event. Verify produced files before automated deletion or off-instance transfer.

POST
/api/recording/create
API token required

Create a managed recording job with its source, output format, clip behavior, optional processing, retention settings, and initial active state. Send the dashboard-issued JWT in the x-access-token header.

Supported sources include SRT and RTMP servers, video-call rooms or participants, and URL inputs such as HLS, MPEG-DASH, RTSP, RTP, UDP, and RIST. For a RIST URL, use INPUT_TYPE_RIST_URL and set input_stream_url.

Request examples

Choose the preset that matches the desired archive format and capture behavior, then add only the processing options required by the output.

Common use cases

  • Capture a complete event as MP4 for archive or post-production.
  • Create time-split files for long-running or continuous inputs.
  • Record HLS output for a file-based playback workflow.

After the job starts, use getStat for bitrate, FPS, and progress, and inspect recordedFiles for produced output.

Continuous archive

Use this preset when the main goal is one stable archive file from a live SRT contribution.

SRT URL to MP4 archive

This is the most common recording shape: preserve the incoming stream as one continuous archive and keep the processing layer minimal.

SRT URL to MP4 archive
Copy code
curl --request POST \
--url http://localhost/api/recording/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"recording_name": "Main program archive",
"recording_type": "RECORDING_STREAM_TO_FILE",
"input": {
"input_type": "INPUT_TYPE_SRT_URL",
"application": "IO_APPLICATION_FFMPEG",
"input_stream_url": "srt://127.0.0.1:1935",
"input_stream_listen_port": {},
"input_settings": {},
"input_module_id": "",
"input_stream_id": "",
"entity_name": "Main program archive",
"module_name": "MODULE_RECORDINGS"
},
"output_format": "mp4",
"recording_mode": "RECORDING_MODE_INFINITY",
"recording_mode_settings": {
"hours": 0,
"minutes": 0,
"seconds": 0
},
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"delete_after": 0,
"active": true
}'
Segmented archive

Use this preset when long captures should be cut into predictable time windows for storage, automation, or post-production.

SRT URL to split-by-time archive

The recording mode changes from one continuous file to rolling segments while keeping the rest of the capture pipeline largely the same.

SRT URL to split-by-time archive
Copy code
curl --request POST \
--url http://localhost/api/recording/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"recording_name": "Program segments every 10 minutes",
"recording_type": "RECORDING_STREAM_TO_FILE",
"input": {
"input_type": "INPUT_TYPE_SRT_URL",
"application": "IO_APPLICATION_FFMPEG",
"input_stream_url": "srt://127.0.0.1:1935",
"input_stream_listen_port": {},
"input_settings": {},
"input_module_id": "",
"input_stream_id": "",
"entity_name": "Program segments every 10 minutes",
"module_name": "MODULE_RECORDINGS"
},
"output_format": "mp4",
"recording_mode": "RECORDING_MODE_SPLIT_BY_TIME",
"recording_mode_settings": {
"hours": 0,
"minutes": 10,
"seconds": 0
},
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"delete_after": 0,
"active": true
}'
Format-specific capture

Use this preset when the output side should be written as HLS-style media instead of one classic archive container.

SRT URL to HLS recording

This is useful when the stored output format matters for later playback or downstream delivery tooling.

SRT URL to HLS recording
Copy code
curl --request POST \
--url http://localhost/api/recording/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"recording_name": "HLS archive output",
"recording_type": "RECORDING_STREAM_TO_FILE",
"input": {
"input_type": "INPUT_TYPE_SRT_URL",
"application": "IO_APPLICATION_FFMPEG",
"input_stream_url": "srt://127.0.0.1:1935",
"input_stream_listen_port": {},
"input_settings": {},
"input_module_id": "",
"input_stream_id": "",
"entity_name": "HLS archive output",
"module_name": "MODULE_RECORDINGS"
},
"output_format": "m3u8",
"recording_mode": "RECORDING_MODE_INFINITY",
"recording_mode_settings": {
"hours": 0,
"minutes": 0,
"seconds": 0
},
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"delete_after": 0,
"active": true
}'
Request body parameters
Identity
recording_name
string
Copy direct link

Dashboard label: Name.

Human-readable job name. The dashboard validates this as a required field and uses the same character guidance shown in the UI: A-Z, a-z, 0-9, and -.

recording_type
string
Copy direct link

The current recording flow uses RECORDING_STREAM_TO_FILE.

Input
input
object
Copy direct link

Input definition built from the source form. It determines which live source is being captured. URL-based RIST capture uses INPUT_TYPE_RIST_URL with input_stream_url through the shared I/O input path.

Output
output_format
string
Copy direct link

Dashboard label: Output format.

Real product options include mp4, avi, flv, mp3, m3u8, mpegts, and mkv, depending on the selected input protocol.

recording_mode
string
Copy direct link

Dashboard label: Auto Clip Mode.

Controls whether the recorder writes one continuous file or splits output by time. The real modes are RECORDING_MODE_INFINITY and RECORDING_MODE_SPLIT_BY_TIME.

recording_mode_settings
object
Copy direct link

Used with split-by-time mode. The dashboard sends hours, minutes, and seconds, and presents this as a drag-and-drop timing control.

Processing
transcoding
object
Copy direct link

Optional transcoding profile for the FFmpeg worker. The dashboard still sends this block when transcoding is disabled.

modify_audio
object
Copy direct link

Optional audio modification settings. Disabled-state objects are still part of the normal payload shape.

modify_video
object
Copy direct link

Optional video modification settings.

overlay
object
Copy direct link

Optional overlay settings for branded or annotated recordings.

Runtime
delete_after
integer
Copy direct link

Dashboard label: Auto deletion after.

Optional auto-deletion horizon in days. 0 means no automatic deletion, and the default UI guidance keeps 0 as the normal disabled state.

active
boolean
Copy direct link

Dashboard label: Enable once created.

Controls whether the recording worker should be active after provisioning.

Create recording
Copy code
curl --request POST \
--url http://localhost/api/recording/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"recording_name": "Main program archive",
"recording_type": "RECORDING_STREAM_TO_FILE",
"input": {
"input_type": "INPUT_TYPE_SRT_URL",
"application": "IO_APPLICATION_FFMPEG",
"input_stream_url": "srt://127.0.0.1:1935",
"input_stream_listen_port": {},
"input_settings": {},
"input_module_id": "",
"input_stream_id": "",
"entity_name": "Main program archive",
"module_name": "MODULE_RECORDINGS"
},
"output_format": "mp4",
"recording_mode": "RECORDING_MODE_INFINITY",
"recording_mode_settings": {
"hours": 0,
"minutes": 0,
"seconds": 0
},
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"delete_after": 0,
"active": true
}'
Response
Identity
_id
string
Copy direct link

Resource id returned when you create or list the recording job.

id
string
Copy direct link

Convenience alias for _id.

recording_name
string
Copy direct link

Name stored for the recording job.

recording_type
string
Copy direct link

Recording type returned by the backend.

Input
input[]
array
Copy direct link

Linked input object or objects used by the capture pipeline.

Output
output_format
string
Copy direct link

Stored output format for the recording.

recording_mode / recording_mode_settings
object
Copy direct link

Recording mode and any split-by-time settings stored on the job object.

Processing
transcoding / modify_audio / modify_video / overlay
object
Copy direct link

Processing settings attached to the recording job.

Files
recordedFiles[]
array
Copy direct link

Recorded files already linked to the job. This becomes especially important for finished or segmented captures.

Runtime
delete_after
integer
Copy direct link

Auto-deletion setting in days.

active
boolean
Copy direct link

Current running-state flag for the recording job.

created / modified
string
Copy direct link

Timestamps managed by the backend.

Operation result
success
boolean
Copy direct link

The model exposes success: true as a virtual field in successful responses.

Response: Create recording
JSON
Copy code
{
"_id": "66004d2997300f9385d32b00",
"id": "66004d2997300f9385d32b00",
"recording_name": "Main program archive",
"recording_type": "RECORDING_STREAM_TO_FILE",
"input": [
{
"_id": "66004d2997300f9385d32b01",
"id": "66004d2997300f9385d32b01",
"input_type": "INPUT_TYPE_SRT_URL",
"application": "IO_APPLICATION_FFMPEG",
"input_stream_url": "srt://127.0.0.1:1935",
"input_stream_listen_port": {},
"input_settings": {},
"input_module_id": "",
"input_stream_id": "",
"entity_name": "Main program archive",
"module_name": "MODULE_RECORDINGS"
}
],
"output_format": "mp4",
"recording_mode": "RECORDING_MODE_INFINITY",
"recording_mode_settings": {
"hours": 0,
"minutes": 0,
"seconds": 0
},
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"delete_after": 0,
"active": true,
"recordedFiles": [
{
"_id": "66004d2997300f9385d32b10",
"id": "66004d2997300f9385d32b10",
"file_name": "main-program-archive-2026-03-24_12-00-00.mp4",
"file_path": "/recordings/main-program-archive-2026-03-24_12-00-00.mp4",
"module_name": "MODULE_RECORDINGS",
"file_visibility": "FILE_VISIBILITY_PUBLIC",
"output_format": "mp4",
"entity_name": "Main program archive",
"entity_id": "66004d2997300f9385d32b00",
"size_bytes": 184320000,
"duration_ms": 1800000,
"created": "2026-03-24T12:30:00.000Z"
}
],
"created": "2026-03-24T12:00:00.000Z",
"modified": "2026-03-24T12:00:00.000Z",
"success": true
}
POST
/api/recording/getCount
API token required
POST
/api/recording/getAll
API token required
POST
/api/recording/getById
API token required
POST
/api/recording/update
API token required
POST
/api/recording/start
API token required
POST
/api/recording/stop
API token required
DELETE
/api/recording/remove
API token required
POST
/api/recording/removeFile
API token required
POST
/api/recording/getStat
API token required