OvenMediaEngine Enterprise
English
English
  • Introduction
  • OvenMediaEngine Configuration
  • Getting Started
    • Getting Started with Ubuntu
    • Getting Started with RHEL
    • Getting Started with Docker
  • Enterprise-grade Features
    • Web Console
      • Web Console Configuration
      • Sign In
      • Change Password
      • Web Console Home
        • Stream List
      • Stream Monitoring
        • Managed and Instant Streams
        • Scheduled Channels | 0.16.4.0+
        • Multiplex Channels | 0.16.5.0+
      • Monitoring
      • Logs
      • Configuration Files
      • Settings
        • Server
        • Live Sources (Ingress Protocols)
          • RTMP | 0.9.0.0+
          • WebRTC/WHIP | 0.12.0.0+/0.15.1.0+
          • SRT | 0.12.0.0+
          • MPEG-2 TS | 0.10.4.0+
          • Scheduled Channels | 0.16.4.0+
          • Multiplex Channels | 0.16.5.0+
        • ABR and Transcoding
          • Transcoding
          • Output Profiles
          • Adaptive Bitrate Streaming (ABR) | 0.14.3.0+
          • Encodes
          • Conditional Transcoding
        • Streaming (Egress Protocols)
          • WebRTC/WHIP | 0.9.0.0+/0.15.1.0+
          • Low Latency HLS (LLHLS) | 0.14.0.0+
          • Legacy HLS | 0.16.6.0+
        • TLS Encryption | 0.14.0.0+
        • Access Control
          • Signed Policy | 0.12.0.0+
          • Admission Webhooks | 0.12.2.0+
        • Thumbnail | 0.15.7.0+
        • Recording | 0.16.5.0+
        • Push Publishing | 0.15.14.0+
        • REST API | 0.11.0.0+
        • Alert | 0.15.11.0+
      • Restart
    • Record Delivery | 0.16.5.0+
    • Digital Rights Management (DRM)
      • OvenMediaEngine Configuration for DRM | 0.16.0.0+
      • PallyCon DRM Configuration | 0.16.4.0+
    • Hardware-Accelerated Video Encoding | 0.16.4.0+
    • Proxy Protocol Integration | 0.16.6.2+
    • Event Monitoring | 0.18.1.0+
      • Configuration
      • Event Specification
    • Web Console Publishing | 0.18.1.2+
  • Advanced Management Tools
    • API Storage | 0.17.0.0+
    • Restart Application | 0.17.0.0+
    • Publisher Extension
    • RTMP Authentication | 0.17.2.0+
    • Generating Audio PTS | 0.17.2.3+
    • Inserting AMF0 messages in RTMP Push Publisher | 0.17.3.0+
    • Inserting Ad Markers (EXT-X-CUE-OUT/EXT-X-CUE-IN) | v0.17.3.0+
    • Inserting SEI into H.264 (AVC) Streams | v0.18.0.0+
  • Release Notes
    • 0.18.1 (May 9, 2025 update)
    • 0.18.0
    • 0.17.3
    • 0.17.2
    • 0.17.1
    • 0.17.0
    • 0.16.8
    • 0.16.7
    • 0.16.6
    • 0.16.5
    • 0.16.4
Powered by GitBook
On this page
  • Step 1: Configuring Recording in OvenMediaEngine
  • Automatic Recording Settings
  • Recording Settings Using REST API
  • Step 2: Setting Up and Activating the Delivery Service
  • Delivery Service Settings
  • Activating the Delivery Service
  • Step 3: Starting Recording and Delivery
  • Using the Automatic Recording Feature
  • Using the Recording REST API
  • Monitoring the Delivery Status
  1. Enterprise-grade Features

Record Delivery | 0.16.5.0+

Record Delivery is supported starting with OvenMediaEngine Enterprise 0.16.5.0-1.

Describes how to record a live stream using OvenMediaEngine and transfer the recorded files to Object Storage.

In this guide, we will practice the following:

  • Setting up OvenMediaEngine and OvenMediaEngine Delivery to enable recording file delivery.

  • Using the automatic recording feature of OvenMediaEngine or the recording REST API to start recording and delivering.

  • Monitoring the recording delivery status.

Step 1: Configuring Recording in OvenMediaEngine

Enable the stream recording feature by activating the File Publisher feature of OvenMediaEngine.

Configuration File Path:

  • The File Publisher can be enabled in /usr/share/ovenmediaengine/conf/Server.xml.

Automatic Recording Settings

Configure OvenMediaEngine to automatically start recording and delivering as soon as the stream broadcast begins.

Example Server.xml:

<Applications>
  <Application>
    <Name>app</Name>
    ...
    <Publishers>
      <FILE>
        <RootPath>/mnt/shared_volumes/records</RootPath>
        <StreamMap>
          <Enable>true</Enable>
          <Path>./record_map.xml</Path>
        </StreamMap>
      </FILE>
    </Publishers>
    ...
  </Application>
</Applications>

To enable OvenMediaEngine to automatically record and deliver, define the recording file path, format, and Object Storage information in the FILE.StreamMap.Path file.

Create the record_map.xml file as specified in Server.xml:

  • Path: /usr/share/ovenmediaengine/conf/record_map.xml

Example record_map.xml:

<RecordInfo>
  <Record>
    <Enable>true</Enable>
    <StreamName>stream</StreamName>
    <VariantNames>video_1080, aac_audio</VariantNames>
    <FilePath>${VirtualHost}/${Application}/${Stream}-${StartTime:YYYYMMDDhhmmss}_${EndTime:YYYYMMDDhhmmss}.mp4</FilePath>
    <InfoPath>${VirtualHost}/${Application}/${Stream}-${StartTime:YYYYMMDDhhmmss}_${EndTime:YYYYMMDDhhmmss}.xml</InfoPath>
    <Metadata>aws_access_key_id='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',aws_secret_access_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',endpoint='https://object.storage.com',region='us-east-1',bucket_name='bucket_name',object_dir='my/vod/path/',delete='true'</Metadata>
  </Record>
</RecordInfo>

In Metadata, set the delivery information in the format key='value',key='value',....

Basic format:

aws_access_key_id='****',aws_secret_access_key='****',endpoint='https://object.storage.com',region='us-east-1',bucket_name='record-bucket',object_dir='/my/vod/path/',delete='true'
  • aws_access_key_id (required): Specify the access key ID to access Object Storage.

  • aws_secret_access_key (required): Specify the secret access key to access Object Storage.

  • endpoint (optional): Specify the connection endpoint of Object Storage. If empty, the AWS S3 endpoint is used.

  • region (optional): Specify the region of Object Storage. If empty, the default region of AWS S3 is used.

  • bucket_name (required): Enter the bucket name to which the recorded file will be delivered.

  • object_dir (required): Specify the path within the bucket to deliver the recorded file.

  • delete (optional): Specify true or false for whether to delete the recorded file created in the RootPath of Server.xml after the delivery is complete.

Recording Settings Using REST API

Configure OvenMediaEngine to record and deliver streams using the recording REST API.

(Note: The recording format and Object Storage information can be set when calling the recording start REST API.)

Example Server.xml:

<Applications>
  <Application>
    <Name>app</Name>
    ...
    <Publishers>
      <FILE>
        <RootPath>/mnt/shared_volumes/records</RootPath>
        <FilePath>${VirtualHost}/${Application}/${Stream}-${StartTime:YYYYMMDDhhmmss}_${EndTime:YYYYMMDDhhmmss}.ts</FilePath>
        <InfoPath>${VirtualHost}/${Application}/${Stream}-${StartTime:YYYYMMDDhhmmss}_${EndTime:YYYYMMDDhhmmss}.xml</InfoPath>
      </FILE>
    </Publishers>
    ...
  </Application>
</Applications>

Automatic recording and recording via REST API can be configured simultaneously.

Step 2: Setting Up and Activating the Delivery Service

Delivery Service Settings

In the delivery service settings, configure the path where OvenMediaEngine generates the recorded files.

Delivery service configuration file path:

  • /usr/share/ovenmediaengine/delivery/conf/config.ini

Set RECORD_INFO_FILE_BASE_DIR to the path where OvenMediaEngine's File Publisher generates the recorded files. (Other settings usually do not need to be changed.)

Example config.ini:

[DELIVERY]
# database uri
DATABASE_URI = /usr/share/ovenmediaengine/delivery/delivery.db
# log file will saved
LOG_DIR = /var/log/ovenmediaengine/delivery/
# dump base directory
DUMP_INFO_FILE_BASE_DIR = 
# recording base directory
RECORD_INFO_FILE_BASE_DIR = /mnt/shared_volumes/records

Activating the Delivery Service

The delivery service is disabled by default. Activate the delivery service:

sudo systemctl start ovenmediaengine-delivery

Step 3: Starting Recording and Delivery

Using the Automatic Recording Feature

Start streaming app/stream. OvenMediaEngine will automatically start recording and deliver the recorded file to the configured Object Storage.

Using the Recording REST API

Start streaming app/stream. Call the recording start REST API for app/stream to have OvenMediaEngine start recording. Once recording is complete, the delivery service will deliver the recorded file to Object Storage.

Example of calling the recording start API:

curl --location 'http://{OME_HOST}:{OME_REST_API_PORT}/v1/vhosts/default/apps/app:startRecord' \
--header 'Authorization: Basic b21lOmRlZmF1bHQ=' \
--header 'Content-Type: application/json' \
--data '{
    "id": "unique_id",
    "stream": {
        "name": "stream",
        "variantNames": ["video_1080", "aac_audio"]
    },
    "metadata": "aws_access_key_id='\''xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'\'',aws_secret_access_key='\''xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'\'',endpoint='\''https://object.storage.com'\'',region='\''us-east-1'\'',bucket_name='\''bucket_name'\'',object_dir='\''my/vod/path/'\'',delete='\''true'\''"
}'

Monitoring the Delivery Status

Check the delivery service logs to monitor the delivery status of the recorded file:

tail -f /var/log/ovenmediaengine/delivery/delivery-daemon.log

This concludes the guide on using OvenMediaEngine to record live streams and deliver recorded files to Object Storage.

PreviousRestartNextDigital Rights Management (DRM)

Last updated 9 months ago

For more details on the recording format, see .

For detailed recording settings, see .

For the recording REST API, see .

OvenMediaEngine Recording
OvenMediaEngine Recording
OvenMediaEngine REST API