# Channels

A channel represents one live stream or one video-on-demand (VOD) asset in OptiView Ads. It is the place where you decide how ads behave for that content: how break start times are interpreted, which breaks are announced to players and when, and whether ad markers in the stream are detected automatically.

Everything else in OptiView Ads hangs off a channel. Origins, marker rules, breaks, events, templates, and integrations are all created for — or looked up through — a channel.

Channels are scoped to an organization. In the OptiView Unified Dashboard, open **Ads → Channels** to create and manage them.

In the Dashboard, opening a channel gives you access to each of these tabs:

| Tab                                                                                                | Use it for                                                                         |
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Overview                                                                                           | View channel settings and Break Manifest configuration.                            |
| [Breaks](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/breaks.md)                    | Schedule, inspect, and delete breaks for the channel, and set its [slate](#slate). |
| [Events](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/events.md)                    | Prepare breaks for an event on your live stream.                                   |
| [Origins](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/origins.md)                  | Add, enable, disable, and prioritize manifest origins.                             |
| [Break Detection](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/marker-detection.md) | Configure marker rules to turn ad markers in your stream into breaks.              |
| [Integrations](https://docs-preview.optiview.dolby.com/pr-973/ads/integrations.md)                 | Manage the channel's default integrations.                                         |

## Channel identity

Every channel has a customer-facing `id`. We recommend using a UUID as the channel `id`, and the `name` property as a human-readable name. If you omit `id` on creation, one is generated for you.

## Timing and delivery settings

These channel settings determine how break start times are interpreted and how breaks are delivered to players through the [Break Manifest](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/break-manifest.md).

### Stream type

The `streamType` determines the use case of the channel:

* **`live`** (default) — a live stream. Players poll the Break Manifest continuously and receive breaks as they become relevant. See [Live](https://docs-preview.optiview.dolby.com/pr-973/ads/workflows/live.md).
* **`vod`** — an on-demand asset. The Break Manifest lists all breaks upfront and players fetch it once. VOD channels have no events. See [VOD](https://docs-preview.optiview.dolby.com/pr-973/ads/workflows/vod.md).

### Timebase

The `timebase` determines which timeline break start times are expressed on:

* **`wallclock`** — breaks are scheduled with a UTC timestamp that is matched against the wallclock timeline carried by the stream itself. Use this when the stream carries wallclock timing: in HLS this comes from `EXT-X-PROGRAM-DATE-TIME` tags, in DASH from the MPD's `availabilityStartTime` combined with the segment timeline (optionally synchronized through a `UTCTiming` element). Available for live and VOD channels.
* **`mediatime`** — breaks are scheduled with a position in the asset, in seconds from its start (for example `600` for 10 minutes in). VOD channels only.

Use `wallclock` for live channels. For VOD channels, use `mediatime` (recommended) or `wallclock`.

Choose the stream type and the timebase when creating the channel; both are fixed afterwards, and all breaks on the channel use the same timebase.

### DVR window

*Default: measured on the origin, otherwise `300000` ms (5 minutes)*

`dvrWindowMs` describes how far behind live a viewer can be while watching the channel — the time-shifted (DVR) window of the stream.

It directly impacts the Break Manifest: a break is included in the manifest as long as it is still relevant for a viewer anywhere inside the DVR window. With a larger DVR window, breaks remain in the manifest for longer so that time-shifted viewers still receive them; with a small window, only breaks near the live edge are returned to the player.

You usually don't need to set it. The channel uses the first of these that is available:

1. The `dvrWindowMs` set on the channel.
2. The DVR window [measured on the channel's origin](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/origins.md#measured-live-offset-and-dvr-window): how much media the origin's manifest makes available behind its live edge.
3. `300000` ms (5 minutes).

Set it when your players offer a different DVR window than the manifest, or when the channel has no origins.

### Live offset

*Default: measured on the origin, otherwise `0` ms*

`liveOffsetMs` describes how far the player's playhead is behind live. Players never play exactly at the live edge — they buffer a few seconds behind it.

OptiView Ads uses this offset mainly to allow you to schedule a break in the past: because viewers watch behind the live edge, a break aimed at the viewer's current playhead position lies slightly behind raw server time. With the offset configured, break start times are evaluated against the position viewers are actually watching instead of raw server time, so such a break is accepted and activates when the playhead reaches it.

You usually don't need to set it. The channel uses the first of these that is available:

1. The `liveOffsetMs` set on the channel. A value of `0` turns the offset off, even when the origin reports one.
2. The live offset [measured on the channel's origin](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/origins.md#measured-live-offset-and-dvr-window): how far a player following the origin's manifest trails real time, from the manifest's own latency target or hold-back plus any delay of its live edge. VOD channels have no live point, so their live offset is never measured.
3. `0` ms.

Set it when your players play further behind live than the manifest suggests, or when the channel has no origins.

Which live point a new break's start is checked against depends on how the break was created:

* **Breaks created through the API or the Dashboard** are checked against the channel's live offset, as described above.
* **Breaks created by break detection** are checked against the live point of the origin the ad marker was found on, measured from that same manifest. A marker sits on that origin's timeline, so that origin's live point is where its viewers actually are. This applies even when you set a live offset on the channel. When the manifest has no measurable live point, the channel's live offset is used instead.

> **Recommended: let break detection measure the values**
>
> We recommend leaving `liveOffsetMs` and `dvrWindowMs` unset on the channel and using the values that break detection measures on the origin. The measured values follow your stream, also when detection fails over to another origin, while a value set on the channel stays fixed until you change it. Only set them on the channel in the cases described above.

### Ad prefetch window

*Default: `10000` ms (10 seconds)*

`adPrefetchMs` defines how far ahead of a break's start time the break is announced to the player through the Break Manifest.

With the default of `10000` (10 seconds), a break whose start time is within the next 10 seconds is included in the manifest. This lead time gives players room to prepare and prefetch the ad content before the break actually starts.

### Delivery

*Default: none, every device uses SGAI*

`delivery` is an ordered list of rules that steer devices to server-guided (`sgai`) or server-side (`ssai`) ad insertion, by device type, platform, OS and OS version. See [Delivery rules](https://docs-preview.optiview.dolby.com/pr-973/ads/workflows.md#delivery-rules).

For creating, updating, listing, and deleting channels programmatically, see the Ads API reference.

## Slate

*Default: none, breaks return to the content when no ad covers them*

`slate` is the image or video that players show during the part of a break that no ad covers: the whole break when no ad can play, or the rest of the break when the ads end early. Setting it turns the slate on for every break of the channel, live or VOD; `null` removes it. See [Slate](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/breaks.md#slate) for how breaks are filled, and [Set up a slate](https://docs-preview.optiview.dolby.com/pr-973/ads/how-to-guides/set-up-a-slate.md) for how to configure one.

## Related resources

A channel is the parent or lookup point for the rest of the OptiView Ads model:

| Resource                                                                                           | Relationship                                                                                                                             |
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [Breaks](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/breaks.md)                    | Scheduled or detected ad opportunities for the channel.                                                                                  |
| [Templates](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/templates.md)              | Reusable break presets that can be scheduled on the channel.                                                                             |
| [Events](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/events.md)                    | An event on your channel for which you want to prepare breaks.                                                                           |
| [Origins](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/origins.md)                  | Manifest URLs monitored for ad markers. A channel can have multiple origins.                                                             |
| [Break detection](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/marker-detection.md) | Configure marker rules to turn ad markers in your stream into breaks.                                                                    |
| [Break Manifest](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/break-manifest.md)    | The manifest that announces the channel's breaks to players.                                                                             |
| [Integrations](https://docs-preview.optiview.dolby.com/pr-973/ads/integrations.md)                 | The channel's default integrations, which an [event](https://docs-preview.optiview.dolby.com/pr-973/ads/concepts/events.md) can replace. |
