General configuration
To configure a connection to an ad server, follow these steps:
-
Select the Placement tab and configure the different fields as follows:
Parameter Description Can prefetch Enables anticipated calls to the ad server. Prefetch markers (HLS tag or DASH event stream) shall be present in the manifest/playlist and defined in a dedicated plugin. Prefetch cache duration can be configured. -
Go to the Placement Rules section then select Add to configure the ad decision server general parameters.
-
Configure the different fields as follows:
Parameter Description Name Provide a name to your ADS connection (e.g.: my_Ad_Server) Type This parameter defines the protocol/communication with the ad server. For Ad-related operations, Stream Personalization implements the following:
- VAST
- VMAP
- SCTE-130-3
- SCTE-224
Note: Other ad decision servers can be supported via ADS plugin (see Manage Stream Personalization plugins).Decision server URL This is the HTTP endpoint Stream Personalization connects to upon ad break detection (or upon first live/content request for pre-roll use case for instance). This configuration is usually ad server-dependent and conveys required audience and ad break details via a templated URL with well-defined key/value pair. Configuration is done via URL template, leveraging information from the following sources:
- Query parameters from the viewer manifest request
- Viewer request pathname
- HTTP header from the viewer manifest request
- Splice information retrieved in-manifest
- Global variables
Decision server URL example:http://ads.example/ads?RequestID=hostname-{random}& VAST=vast30&Version=1.0&ChannelID={#regex} {pathname}:/hls-(.+)/{/regex}&AvailNo={splice.availNum}& HHID={query.accountID}&DeviceID={query.deviceID}& Vdur={breakDurationSeconds}
Note: For a complete description of available variables to build such URL template, see Manage Decision server URL template.Trigger Select a trigger:
- Marker: Stream Personalization sends a placement request to the ad server when detecting in-manifest SCTE-35 markers in the source manifest.
- View Start: Stream Personalization sends a placement request to the ad server upon first connection. This can be used for live pre-roll, or VOD ad insertion based on VMAP response for instance.
- View Access: Stream Personalization sends a placement request upon first connection to an ACDS and replaces all the content if the rules apply (use case example: do not grant access to the playlist for unauthorized viewers).Skip live event ads in the past For live events only: when a viewer connects to a live playlist, prevent ad insertion in past content. -
Once you have configured the ad decision server general parameters, you can:
-
Select Ok to validate the new placement rule creation.
Manage Decision server URL
Upon placement opportunity detection such as ad break or alternate content (blackout for instance), or first content request using viewing start trigger mode, Stream Personalization connects to a decision server entity with a well-defined HTTP request. This HTTP connection carries a set of key/value pair (syntax being ADS-dependent), which value must be automatically filled by Stream Personalization.
Stream Personalization automatically retrieves information from two different sources:
- The manifest URL request (query parameter, and HTTP header)
- The source conditioned manifest, with splice information embedded
Since Stream Personalization manages audience/user-based manifest manipulation, the information to be conveyed to the ad server for instance will be different for each audience/user connected. You thus need to template the decision server URL with variables that will be automatically filled by Stream Personalization.
URL template using URL query parameters
A manifest request URL (sent by the player/CDN) is usually made of the path to the manifest itself, to which query parameters are appended. An example is given below:
http://stream.example/hls/catchup/hls-239192/plist/index.m3u8?deviceID=example-device&accountID=1234
Stream Personalization automatically detects these query parameters (regardless of the number), it can use them when sending outbound request (to a decision server for instance).
In this example, the query parameters deviceID and accountID values will be accessed the following way respectively: {query.deviceID} and {query.accountID}.
These two variables can be used and injected into the decision server URL template.
URL template using HTTP headers
Stream Personalization automatically retrieves HTTP header information and can use it in any outbound request. The general syntax to access HTTP header information is defined as follows:{headers.<http header param>}
For instance, if the Ad decision system needs Stream Personalization to pass cache-control http header (let’s name it UA at the Ad decision level), Stream Personalization will then add into the decision server URL query parameters: UA={headers.cache-control}
The following global variables can be used directly in the URL template:
| HTTP header template | Description |
|---|---|
{userIP} |
Viewer IP extracted from the HTTP header X-FORWARDED-FOR |
{userAgent} |
HTTP header user agent |
Example: UA = {userAgent}
URL template using SCTE-35 data from conditioned manifest
| SCTE-35 | Stream Personalization mapping | Description |
|---|---|---|
| Splice_event_id | {splice.id} |
Unique id of the ad break/splice event. |
| Break_duration() | {breakDuration} |
Ad break duration in terms of ticks of the program’s 90 kHZ clock |
{breakDurationSeconds} |
Break duration translated in seconds instead of program’s 90kHZ clock | |
{breakDurationMilliseconds} |
Break duration translated in milliseconds instead of program’s 90kHZ clock | |
{breakDurationISO} |
Break duration translated in ISO format instead of program’s 90kHZ clock | |
| avail_num | {splice.availNum} |
Avail number |
| Segmentation_type_id | {splice.segmentationTypeId} |
Value used to determine whether the splice indicates a program start/end, placement opportunity start/end etc. (see standard for all possible values) |
| Segmentation_descriptor() | {splice.segmentationDescriptor} |
Segmentation descriptor raw data bytes. These raw data can be used by 3rd party component to manage ad-hoc parsing. |
URL template using Manifest/playlist information
| Manifest | Stream Personalization mapping | Description |
|---|---|---|
| Manifest duration | {manifestDurationSeconds} |
For non linear only. Manifest duration in seconds. |
| Manifest duration | {manifestDurationMilliseconds} |
For non linear only. Manifest duration in milliseconds. |
| Manifest duration | {manifestDurationISO} |
For non linear only. Manifest duration in ISO format. |