onCuePoint Message Insertion

OvenMediaEngine Enterprise supports the onCuePoint messages insertion feature starting with version 0.17.3.0-1.

When re-streaming (Push Publishing) a live stream to another system using the RTMP protocol, you can insert AMF0 messages. Utilizing this feature, you can deliver messages such as subtitle insertions and advertisement markers to another system. The method for inserting messages is as follows:

  • If the Media Source received through the RTMP Provider includes a message, it will be automatically inserted.

  • You can insert messages dynamically through the OvenMediaEngine's Send Event API.

Inserting onCuePoint message

The onCuePoint message is used for the purpose of automatic ad cue point insertions to YouTube live broadcasts.

API Interface

Request

chevron-rightPOST /v1/vhosts{vhost}/apps/{app}/streams/{stream}:sendEventhashtag

Header

Authorization: Basic {credentials}

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

Body

{
  "eventFormat": "amf",
  "events":[
    {
      "amfType": "onCuePoint.YouTube",
      "version": "0.1",
      "preRollTimeSec": 2.56,
      "cuePointStart": true,
      "breakDurationSec": 30,
      "spliceEventId": 0
    }
  ]
}
chevron-rightPOST /v1/vhosts{vhost}/apps/{app}/streams/{stream}:sendEventshashtag

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": "amf",
    "events":[
      {
        "amfType": "onCuePoint.YouTube",
        "version": "0.1",
        "preRollTimeSec": 2.56,
        "cuePointStart": true,
        "breakDurationSec": 30,
        "spliceEventId": 0
      }
    ]
  }
]

Responses

chevron-right200 Okhashtag

The request has succeeded

Header

Content-Type: application/json

Body

{
    "message": "OK",
    "statusCode": 200
}
chevron-right400 Bad Requesthashtag

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

chevron-right401 Unauthorizedhashtag

Authentication required

Header

Body

chevron-right404 Not Foundhashtag

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

Body

Payload Example

Here’s an example of a payload encoded in AMF0 format for an onCuePoint message:

Last updated

Was this helpful?