Set up server-side ad insertion
Turn on SSAI for a channel, allow your stream host, test it with a test ad, and open sessions from your player.
With server-side ad insertion (SSAI), LtvAdx stitches ads into your stream before it reaches the viewer, so the player sees one continuous stream. Use it when your player can't run a client-side ad SDK, or when you need ads to survive ad blockers. If your player can call a VAST tag, a tag is simpler.
What it stitches
- HLS with MPEG-TS segments, or fMP4/CMAF segments, with muxed audio or with separate AAC audio and WebVTT subtitles. VOD and live.
- DASH with CMAF segments addressed by
SegmentTemplate. VOD and live.
These streams play exactly as your origin serves them, without ads: encrypted or low-latency HLS, HLS with separate audio but TS video, fMP4 HLS with IMSC subtitles, and DASH with several Periods, DRM or SegmentBase / SegmentList addressing. Ads are cut in only from creatives that are uploaded to LtvAdx and ready. An advertiser's VAST tag link can't be stitched.
Before you start
- The channel must be APPROVED. A session for an unapproved channel is refused.
- Your stream must be served over https from a public address, from a host you can list. It must reply in under 1.5 seconds and not redirect.
- Decide where breaks come from. Cue markers in the stream win (
EXT-X-CUE-OUT,EXT-X-DATERANGESCTE-35, or binary SCTE-35 for HLS, and a SCTE-35 event stream for DASH). Live breaks come only from cue markers. A VOD stream without cues uses the break positions you set, otherwise the length of the content.
Steps
- Open SSAI Setup and choose your channel.
- Tick SSAI on for this channel.
- In Origin hosts, list the hosts your stream is served from, one per line. Use
*.example.comfor any subdomain. You can list up to 10. A session for any other host is refused. - For VOD without cue markers, set Break positions, such as
start,50%,end. Each entry isstart,end, a percentage or seconds like600s. You can list up to 20, and each break lasts up to 60 seconds. Leave it blank to place breaks by content length. - Under Ad reporting choose Server or Client (see below).
- Select Save settings.
The same switches are on the Ad Configuration tab of the channel on Channels & Apps. SSAI Setup is the place for the slate, the house promo and the test player.
Server or client reporting
- Server. LtvAdx counts the impression and quartile events as your player fetches each ad segment. There is nothing to build.
- Client. Your player reads a tracking address and fires the events as the ad actually plays. It is more accurate and needs player work.
This is the channel default. A session request can ask for the other one.
Slate and house promo
A slate fills the rest of a live break when the ads are shorter than the break. Select Upload a slate to use your own. It must be a video of 5 to 300 seconds. Until it shows *Ready*, the previous slate, or the LtvAdx slate, plays. Select Use the LtvAdx slate to go back. VOD breaks are as long as their ads and need no slate.
A house promo is your own video for breaks that no campaign filled. Select Upload a house promo, a video of 5 to 60 seconds. In a live break it plays instead of your stream's own break content, then slate fills the remaining time. Tick Also fill empty VOD breaks to use it in VOD too. It is never billed and never counted as an ad. Without one, an empty break plays your stream as it is.
If your account is not yet approved, an uploaded slate or promo shows as processed and goes live once the account is approved.
Test it
The Test player opens a test session on the stream you give it. Every break is filled with a 30-second LtvAdx test ad. Nothing is recorded, billed or counted. It uses the channel's saved settings, so save first.
- Enter your stream address, or pick one of the LtvAdx test streams if
cdn.ltvadx.comis on your host list. - Choose a reporting mode or leave it on the channel default.
- Select Start test session.
- Watch the Breaks list on the right. It shows where breaks fall, how many ads each holds and whether live breaks were replaced.
- Select End session when done.
Open sessions from your player
When a viewer presses play, your app opens a session, plays the address it gets back instead of your stream address, and ends the session when playback stops. The Integration box on the page has a ready command with your channel ID. The request carries channelId, originUrl, a householdId, and the platform. The full reference is in SSAI integration, and tested packager and player setups are in SSAI recipes.
Open sessions from the viewer's device, not from your server. LtvAdx reads the viewer's country from whoever creates the session. A session created by your server is placed where your server is. Passing the viewer's address in the request is only believed from a stitcher LtvAdx has vetted for your account.
Limits
- 120 new sessions a minute from one address.
- 40 playlist requests per session every 10 seconds. Poll live playlists once per target duration.
- A session ends after 4 hours without a request, and 24 hours after it started in any case.
Errors you may see when opening a session
| Message | Fix |
|---|---|
| The channel is not approved for serving | Wait for review. |
| SSAI is not enabled for this channel | Tick SSAI on for this channel and save. |
| The origin host is not on this channel's SSAI allowlist | Add the host to Origin hosts. |
| originUrl must be https | Use an https stream address. |
| The origin host resolves to a non-public address | Your host must be reachable on the public internet. |
| Too many sessions from this address | Wait a minute. |
If you get a delivery alert
A SSAI delivery alert appears when one of these holds over the last 24 hours:
| What the alert says | What it means and what to do |
|---|---|
| Players started ads but fewer than 50% of them reported an impression (at least 20 starts) | In client mode your player is not firing the events. Check that it reads the tracking address and can reach LtvAdx's ad host, or switch to Server. |
| Fewer than 50% of impressions completed (at least 20 impressions) | Viewers leave during ads, or the player stops fetching ad segments. Test on the test player first. |
| 5% or more of playlist requests could not read your origin in time | Those viewers got your stream with no ads. Your origin must reply in under 1.5 seconds. Check its speed and any rate limits against LtvAdx. |
| 20% or more of playlist requests were passed through | The stream is one SSAI does not stitch, for example encrypted, low-latency, or a DASH layout it can't cut. See the list at the top of this page. |
The alert opens this page.