This section provides a step-by-step guide to implementing Telos Ad Stitching using the provided URL structure.
1. Prepare the Master Playlist URL
The Master Playlist URL is the cornerstone of the streaming process. It defines the video source to be streamed and indicates where ads will be inserted.
Understanding the HLS Master Playlist
HLS (HTTP Live Streaming) uses a master playlist to reference multiple versions (variants) of the same content, each encoded at different bitrates or resolutions.
This allows the player to dynamically switch between these variants depending on the viewer’s network conditions and device capabilities, ensuring an optimal playback experience.
Encoding the URL
Why Base64?
The HLS master playlist URL must be encoded in Base64 to safely transmit it as a parameter in the macro. Base64 encoding ensures that the URL remains intact and avoids issues with special characters that could otherwise break the query string.
How to Encode:
Use any Base64 encoding tool (e.g., Base64.guru) to convert your original playlist URL into a Base64 string.
Check How to Encode a URL in Base64.
Replacing the {m} Macro
Once encoded, replace the {m} macro in the Telos URL with your Base64-encoded master playlist value.
This parameter tells the ad stitching service where to find the video source.
2. Set Up User Identification
User identification allows you to deliver personalized ads and gather valuable analytics on user engagement.
Determine the Unique User ID
The {u} macro represents the User ID, a unique identifier assigned to each viewer or session.
It helps track which ads were displayed and how the viewer interacted with the content.
Insert the User ID
Replace {u} with your actual user identifier (e.g., a numeric ID or username).
Example: u=testuser
3. Configure Ad Insertion Parameters
These parameters define how and when ads are inserted into the video stream.
No Slate Mode (Optional)
The {isNoSlate} parameter controls whether ads are added alongside the main content or replace parts of it.
Default: false
Set to true to allow ads to be added without interrupting playback.
Why it matters:
When {isNoSlate} is set to true, the main content continues playing seamlessly while ad blocks are dynamically inserted.
This creates a smooth, non-intrusive ad experience.
Example Behavior:
If
adDuration = 180but only 30 seconds of ads are available, only 30 seconds of ads will play before resuming the main content.If no ads are available, no ad block will appear, and playback continues uninterrupted.
Ad Insertion Interval (Optional)
The {adInterval} parameter determines how frequently ads are inserted, measured in seconds.
Example: adInterval=60
This means an ad will appear every 60 seconds of content.
Useful when combining with “no slate” mode to maintain balanced pacing.
Ad Duration
The {adDuration} parameter specifies the length (in seconds) of each ad block.
Example: adDuration=30
Setting an appropriate ad duration ensures ads remain effective without disrupting the viewing experience.
4. Enable Pre-Roll Ads
Pre-Roll Ads are displayed before the viewer accesses the main content.
Activate Pre-Roll Ads
Use {preroll} to enable pre-roll playback.
Example: preroll=1
Define Pre-Roll Offset (Optional)
The {prerollOffset} parameter defines a delay (in seconds) for when pre-roll ads should appear after playback starts.
5. Provide Device and App Information
Providing accurate device and app data helps optimize ad delivery and ensure compatibility.
| Parameter | Description | Example |
|---|---|---|
{ua} |
User-Agent string identifying the device/browser | Mozilla/5.0 (Linux; Android 2.2; Mobile; Safari/533.1) |
{uip} |
User IP address (used for geo and targeting) | 192.168.1.1 |
{device_model} |
Device model | iPhone10,6 |
{device_make} |
Device manufacturer | Apple |
{device_category} |
Device type code |
4 (Smart TV) |
{device_id} |
Unique device identifier | abcd1234 |
{app_name} |
Application name | ExampleApp |
{app_bundle} |
Application bundle ID | com.example.app |
{app_store_url} |
Link to app’s store page | https://itunes.apple.com/app/example |
More details: List of Macros and Definitions
6. Finalize the Production URL
Before deploying, ensure all macros are correctly populated with real values.
Verify Macro Completion
Double-check that all placeholders are replaced correctly.
Missing or incorrect values can result in failed ad insertions.
Test the URL
Always test the final URL in a controlled environment.
Use tools like stream analyzers or Telos testing utilities to confirm that ads are inserted as expected.
Example: Full Production URL
The completed URL might look like this:
https://example.telos.indicue.com/stream.m3u8?m=aHR0cDovL2hscy10cmFuc2NvZGVyLnR2c3RpdGNoLmNvbS9uby1zbGF0ZS9tYXN0ZXIubTN1OA==&u=testuser&isNoSlate=true&adInterval=60&adDuration=60&preroll=1&site_full_url=test.com&ua=Mozilla/5.0%20(Linux;%20U;%20Android%202.2)%20AppleWebKit/533.1%20(KHTML,%20like%20Gecko)%20Version/4.0%20Mobile%20Safari/533.1&uip=167.235.198.190&app_name=test_app_name&app_bundle=test_app_bundle&device_model=Android%202.2&device_make=Android&device_category=2&app_store_url=test_app_store_url.com&device_id=1&aid=1401
Replace “example” with your actual Indicue subdomain.
If your subdomain has not yet been configured, please contact your Indicue Sales Representative for setup assistance.