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
  1. Advanced Management Tools

Inserting Ad Markers (EXT-X-CUE-OUT/EXT-X-CUE-IN) | v0.17.3.0+

You can dynamically insert Ad Markers into LL-HLS and HLS playlists using the REST API.

When requesting the CUE-OUT event, the following tags will be added to the playlist:

#EXT-X-CUE-OUT:DURATION=<time>
…
#EXT-X-CUE-IN

#EXT-X-CUE-OUT and #EXT-X-CUE-IN are a pair, and the entire section between the two tags will be replaced with ad content by the ad server.

DURATION=<time> is required and represents the duration of the ad.

You can request the CUE-IN event to end an inserted ad early. When the event is called, the #EXT-X-CUE-IN tag is immediately added to the playlist, and the previously added #EXT-X-CUE-IN tag is removed.

API Interface

Request

POST /v1/vhosts{vhost}/apps/{app}/streams/{stream}:sendEvent

Header

Authorization: Basic {credentials}

# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>

Body

{
  "eventFormat": "cue",
  "events":[
    {
      "cueType": "out", // out | in
      "duration": 60500 // milliseconds, only available when cueType is out
    }
  ]
}
POST /v1/vhosts{vhost}/apps/{app}/streams/{stream}:sendEvents

Header

Authorization: Basic {credentials}

# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>

Body

[
  {
    "eventFormat": "id3v2",
    "eventType": "video", // "eventTarget": "video" is same
    "events":[
      {
        "frameType": "TXXX",
        "info": "AirenSoft",
        "data": "OvenMediaEngine"
      },
      {
        "frameType": "TIT2",
        "data": "OvenMediaEngine 123"
      }
    ]
  },
  {
    "eventFormat": "cue",
    "events":[
      {
        "cueType": "out", // out | in
        "duration": 60500 // milliseconds, only available when cueType is out
      }
    ]
  }
]

Responses

200 Ok

The request has succeeded

Header

Content-Type: application/json

Body

{
    "message": "OK",
    "statusCode": 200
}
400 Bad Request

Invalid request. Body is not a Json Object or does not have a required value

401 Unauthorized

Authentication required

Header

WWW-Authenticate: Basic realm=”OvenMediaEngine”

Body

{
    "message": "[HTTP] Authorization header is required to call API (401)",
    "statusCode": 401
}
404 Not Found

The given vhost name or application name could not be found.

Body

{
    "message": "[HTTP] Could not find the application: [default/app2] (404)",
    "statusCode": 404
}
PreviousInserting AMF0 messages in RTMP Push Publisher | 0.17.3.0+NextInserting SEI into H.264 (AVC) Streams | v0.18.0.0+

Last updated 15 days ago