Introduction
Videon devices support inserting SCTE-35 splice markers via REST API commands. Our general REST API documentation can be found here for the following products:
Inserting SCTE-35 splice markers is most popularly used for denoting when ads are to be run in a stream in order to further monetize live video content.
SCTE-35 splice markers are currently supported for any MPEG2-TS output. These include Unicast, Multicast, RTSP, SRT, Zixi, and Beta support for HLS (HTTP Push).
Steps to insert SCTE-35 splice markers
The process for inserting a SCTE-35 marker for downstream use is fairly simple. The prerequisites are the following:
- Know the IP of the target Videon device
- Have a Unicast, Multicast, HTTP Push (HLS-only), RTSP, SRT, or Zixi stream successfully running to the desired destination with the SCTE-35 data encoder attached to it
- Have a method of sending a REST API command to the IP of the target Videon device (cURL, Postman, Advanced REST Client, etc.)
Once those prerequisites are met, perform the following steps:
- Power on and confirm the IP of the Videon device by entering it in a browser URL. This should load the Videon Web UI. You may close out of that webpage once the device is confirmed to be booted up.
-
Configure the SCTE-35 settings by sending a command via your preferred REST
command method. Below is an example. Refer to the REST API documentation
for more details on command parameters
- The only setting - duration - is how many milliseconds will be between the start and end of the splice marker section in the MPEG2-TS stream (in this instance, the splice marker section will be 30 seconds in duration)
-
Check for SCTE-35 in available codecs by running the following REST command:
GET http://[IP_ADDRESS]:2020/v2/encoders/data_encoders -
If SCTE-35 is present already, note the data_encoder_id for "codec": "scte35" and do not run the POST command below in step 5 or you will receive a 500 error. Please proceed to step 7.
However, if no data_encoder_id was returned for "codec": "scte35" (as below), continue to step 5.
-
Run the following REST command to create a new SCTE-35 data encoder:
POST http://[IP_ADDRESS]:2020/v2/encoders/data_encoders
Example:#Place the following in the Body of the POST command as raw JSON:
{
"name": "SCTE-35 Data Encoder", #the name may be whatever you choose
"codec": {
"value": "scte35",
"scte35": {
"splice_duration": 30000 #set the splice duration (in milliseconds) here
}
}
}
-
You should now receive an id in the Body of the response from the POST command
Example:
-
If you wish to change the splice duration once the SCTE-35 data encoder has been created, run the following REST command replacing the id for the PUT command returned in step 6:
PUT http://[IP_ADDRESS]:2020/v2/encoders/data_encoders/[id]
#replace [id] with the id returned in step 6
Example:#Place the following in the Body of the PUT command:
{
"name": "SCTE-35 Data Encoder", #the name may be whatever you choose
"codec": {
"value": "scte35",
"scte35": {
"splice_duration": 30000 #set the splice duration (in milliseconds) here
}
}
}
- If you happen to receive any unexpected 500 errors from these requests, make sure to remove any comments beginning with '#'
-
Insert a splice marker according to the configuration set
above by making the following command. For further information on the parameters
within the Body of this command, please reference the appropriate REST API
documentation under Data Encoders >
SCTE-35 Splice Commands >
Create Splice Commands:
- LiveEdge Max
-
LiveEdge Node
POST http://[IP_ADDRESS]:2020/v2/encoders/data_encoders/[id]/splice_commands{ "process_time_utc": "1980-01-04T04:20:30.789Z", "splice_command": { "value": "splice_insert", "splice_insert": { "preroll_time_msec": 4000, "duration_msec": 30000 }
} }
This will create a splice command to insert into the stream. The command will be processed at the given UTC time or immediately if process_time_utc is omitted from the request.
-
splice_insert - Creates a splice_insert command with the given pre-roll and duration. If pre-roll is not specified, 4 seconds is used. If the duration is not specified, the duration configured in the SCTE-35 encoder will be used. The command will be inserted into the stream at the process time and will be reinserted every 2 seconds of pre-roll for redundancy.