OvenMediaEngine
0.18.0
0.18.0
  • Introduction
  • Quick Start
    • Online Demo
  • Getting Started
    • Getting Started with Docker
    • Getting Started with OME Docker Launcher
  • Configuration
    • TLS Encryption
    • IPv6
  • Live Source
    • RTMP
    • WebRTC / WHIP
    • SRT
    • MPEG-2 TS
    • RTSP Pull
    • Scheduled Channel
    • Multiplex Channel
  • ABR and Transcoding
    • Transcoding
    • ABR
    • TranscodeWebhook
    • GPU Acceleration
  • Streaming
    • WebRTC Streaming
    • Low-Latency HLS
    • HLS
    • SRT
  • CrossDomains
  • Access Control
    • SignedPolicy
    • AdmissionWebhooks
  • Clustering
  • Thumbnail
  • Recording
  • Push Publishing
  • REST API
    • v1
      • VirtualHost
        • Reload Certificate
        • Application
          • Output Profile
          • Record
          • Push
          • Stream
            • Send Event
            • HLS Dump
            • Conclude HLS Live
          • ScheduledChannel
          • MultiplexChannel
      • Statistics
        • Current
  • Alert
  • Performance Tuning
  • Logs and Statistics
  • Troubleshooting
  • P2P Delivery (Experiment)
Powered by GitBook
On this page
  • Configuration
  • Bind
  • Application
  • Encoders and streamid
  • OBS Studio
  • Blackmagic Web Presenter
  • Multiple Audio Track
  • SRT Socket Options

Was this helpful?

Export as PDF
  1. Live Source

SRT

Was this helpful?

Secure Reliable Transport (or SRT in short) is an open source video transport protocol and technology stack that optimizes streaming performance across unpredictable networks with secure streams and easy firewall traversal, bringing the best quality live video over the worst networks. We consider SRT to be one of the great alternatives to RTMP, and OvenMediaEngine can receive video streaming over SRT. For more information on SRT, please visit the .

SRT uses the MPEG-TS format when transmitting live streams. This means that unlike RTMP, it can support many codecs. Currently, OvenMediaEngine supports H.264, H.265 and AAC codecs received by SRT.

Configuration

Bind

Set the SRT listen port as follows:

<Bind>
    <Providers>
        ...
        <SRT>
            <Port>9999</Port>
            <!-- <WorkerCount>1</WorkerCount> -->
        </SRT>
    </Providers>

Application

SRT input can be turned on/off for each application. As follows Setting enables the SRT input function of the application.

<Applications>
    <Application>
        <Name>app</Name>
        <Providers>
            <SRT/>

Encoders and streamid

There are various encoders that support SRT such as FFMPEG, OBS Studio, and srt-live-transmit. Please check the specifications of each encoder on how to transmit streams through SRT from the encoder. We describe an example using OBS Studio.

streamid = percent_encoding("srt://{host}[:port]/{app name}/{stream name}[?query=value]")

OBS Studio

srt://{full domain or IP address}:port?streamid=srt%3A%2F%2F{full domain or IP address}[%3APort]%2F{App name}%2F{Stream name}&latency=2000000

The streamid has to be the urlencoded address of the server name as specified in the ome server configuration plus the app name and the stream name, each separated by /. The latency configures the size of the server-side recive buffer and the time limit for SRT in nanoseconds. Typical value for latency are 150000 (150ms) for stremaing to a server in the local network, 600000 (600ms) for streaming to a server over the internet in the local region, and 2000000 (2 seconds) when stremaing over long distance.

Blackmagic Web Presenter

For configuring a Blackmagic Web Presenter, ATEM Mini Pro or similar device to stream to OvenMediaEngine over SRT, choose the "Custom URL H264/H265" platform option with the following syntax:

Server: srt://your-server-domain.com:<SRT_PORT>
Key: <PERCENT_ENCODED_STREAM_ID>

Multiple Audio Track

The SRT Provider supports multiple audio track inputs. This is automatically applied to the LLHLS Publisher.

If you want to label the input audio tracks, configure them as follows. This affects the player's audio selection UI when playing LLHLS.

<Application>
  <Providers>
    <SRT>
      <AudioMap>
        <Item>
          <Name>English</Name> 
          <Language>en</Language> <!-- Optioanl, RFC 5646 -->
          <Characteristics>public.accessibility.describes-video</Characteristics> <!-- Optional -->
        </Item>
        <Item>
          <Name>Korean</Name>
          <Language>ko</Language> <!-- Optioanl, RFC 5646 -->
          <Characteristics>public.alternate</Characteristics> <!-- Optional -->
        </Item>
        <Item>
          <Name>Japanese</Name>
          <Language>ja</Language> <!-- Optioanl, RFC 5646 -->
          <Characteristics>public.alternate</Characteristics> <!-- Optional -->
        </Item>
      </AudioMap>
   ...

SRT Socket Options

You can configure SRT's socket options of the OvenMediaEngine server using <Options>. This is particularly useful when setting the encryption for SRT, and you can specify a passphrase by configuring as follows:

<Server>
    <Bind>
        <Providers>
            <SRT>
                ...
                <Options>
                    <Option>
                        <Key>SRTO_PBKEYLEN</Key>
                        <Value>16</Value>
                    </Option>
                    <Option>
                        <Key>SRTO_PASSPHRASE</Key>
                        <Value>thisismypassphrase</Value>
                    </Option>
                </Options>
            </SRT>
...

OvenMediaEngine classifies each stream using SRT's streamid. This means that unlike MPEG-TS/udp, OvenMediaEngine can receive multiple SRT streams through one port. For more information on streamid, see .

Therefore, in order for the SRT encoder to transmit a stream to OvenMediaEngine, the following information must be included in the streamid as .

The streamid contains the URL format, so it must be ****

OBS Studio 25.0 or later supports SRT. Please refer to the for more information. Enter the address of OvenMediaEngine in OBS Studio's Server as follows: When using SRT in OBS, leave the Stream Key blank.

The default streaming profiles work well, and there are more advanced configuration options available if you

For more information on SRT socket options, please refer to .

SRT Alliance website
Haivision's official documentation
percent encoded
percent encoded
OBS official documentation
edit the streaming.xml settings file
https://github.com/Haivision/srt/blob/master/docs/API/API-socket-options.md#list-of-options