-
Notifications
You must be signed in to change notification settings - Fork 11
Optiview live overlays and usage data #578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jeroentempels-dolby
merged 7 commits into
main
from
optiview-live-overlays-and-usage-data
Apr 3, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
87b78c8
Add image overlays page to media engine docs
jeroentempels-dolby 1246f04
Refine image overlays page: add ingest resolution note, simplify exam…
jeroentempels-dolby 5016ad9
Add usage monitoring page with transcoding, viewing minutes and bytes…
jeroentempels-dolby df050d8
Change viewer insights icon to light bulb
jeroentempels-dolby a0f3cbb
Fix prettier formatting
jeroentempels-dolby 61b6337
Add THEOlive engine changelog fetched from S3
jeroentempels-dolby 4937d37
Remove details to prevent docs from getting outdated
jeroentempels-dolby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| .docusaurus | ||
| .cache-loader | ||
| static/theoplayer-license.txt | ||
| theolive/changelog.md | ||
|
|
||
| # Misc | ||
| .DS_Store | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import fs from 'fs'; | ||
| import path from 'path'; | ||
| import { fileURLToPath } from 'url'; | ||
|
|
||
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
| const url = 'https://engine-changelog.s3.eu-west-3.amazonaws.com/CHANGELOG.md'; | ||
| const outputPath = path.join(__dirname, '..', 'theolive', 'changelog.md'); | ||
|
|
||
| try { | ||
| const response = await fetch(url); | ||
| if (!response.ok) { | ||
| throw new Error(`Failed to fetch changelog: ${response.status} ${response.statusText}`); | ||
| } | ||
| const content = await response.text(); | ||
| fs.writeFileSync(outputPath, content); | ||
| console.log('Fetched THEOlive engine changelog.'); | ||
| } catch (error) { | ||
| console.warn(`Warning: Could not fetch THEOlive engine changelog: ${error.message}`); | ||
| if (!fs.existsSync(outputPath)) { | ||
| fs.writeFileSync(outputPath, '# Changelog\n\nChangelog could not be fetched.\n'); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| --- | ||
| sidebar_position: 4 | ||
| sidebar_label: Image overlays | ||
| sidebar_custom_props: | ||
| icon: 🖼️ | ||
| description: Add static image overlays like logos or watermarks to your live stream. | ||
| --- | ||
|
|
||
| # Image overlays | ||
|
|
||
| Image overlays let you burn static images — such as logos or watermarks — directly into your transcoded stream. Overlays are configured per engine and rendered on top of the video at the specified position and opacity. | ||
|
|
||
| ## Configuration | ||
|
|
||
| Each engine supports one or more overlays. An overlay is defined by: | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | ---------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------- | | ||
| | `url` | `string` | Yes | URL of the overlay image. | | ||
| | `position` | `object` | No | Where to place the overlay on the video frame. If omitted, the image is placed at the top-left corner (0, 0). | | ||
| | `opacity` | `number` | No | Overlay opacity, from `0` (invisible) to `1` (fully visible). Defaults to `1`. | | ||
|
|
||
| ### Position | ||
|
|
||
| The `position` object accepts the following properties, all specified in **pixels**: | ||
|
|
||
| | Property | Type | Description | | ||
| | -------- | -------- | ------------------------------------------------------- | | ||
| | `top` | `number` | Distance from the top edge of the video frame. | | ||
| | `bottom` | `number` | Distance from the bottom edge. Ignored if `top` is set. | | ||
| | `left` | `number` | Distance from the left edge of the video frame. | | ||
| | `right` | `number` | Distance from the right edge. Ignored if `left` is set. | | ||
|
|
||
| Use a combination of one vertical (`top` or `bottom`) and one horizontal (`left` or `right`) property to anchor the overlay. The pixel values are relative to the **ingest resolution** (i.e. the width and height of the incoming source stream). | ||
|
|
||
| ## API example | ||
|
|
||
| Add a logo overlay in the bottom-right corner when [creating](../api/create-channel-engine.api.mdx) or [updating](../api/update-engine.api.mdx) an engine: | ||
|
|
||
| `POST https://api.theo.live/v2/channels/{channelId}/engines` | ||
|
|
||
| ```json | ||
| { | ||
| "name": "my-engine", | ||
| "region": "europe-west", | ||
| "quality": { | ||
| "abrLadderId": "your-abr-ladder-id" | ||
| }, | ||
| "overlays": [ | ||
| { | ||
| "url": "https://example.com/logo.png", | ||
| "position": { | ||
| "bottom": 20, | ||
| "right": 20 | ||
| }, | ||
| "opacity": 0.8 | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - Use **PNG images with transparency** for clean overlays that blend naturally with the video. | ||
| - The overlay is burned into the transcoded output, so it will appear on all quality levels and all output protocols. | ||
| - To remove overlays, update the engine with an empty `overlays` array and restart the engine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
| sidebar_position: 20 | ||
| sidebar_label: Usage monitoring | ||
| sidebar_custom_props: | ||
| icon: 📊 | ||
| description: Track viewing minutes, bytes transferred, and transcoding minutes per channel. | ||
| --- | ||
|
|
||
| # Usage monitoring | ||
|
|
||
| The usage monitoring page lets you track how your streams are consumed and how much transcoding capacity is used. The [dashboard](https://dashboard.optiview.dolby.com/) shows these metrics visually. You can also query them directly through the API. | ||
|
|
||
| Your usage — and pricing — is made up of two independent components: | ||
|
|
||
| 1. **Transcoding** — the time your engines spend actively transcoding video. This is measured in **transcoding minutes**. | ||
| 2. **Viewing** — the consumption by your viewers. Depending on your contract, this is measured either in **viewing minutes** (time spent watching) or **bytes transferred** (data delivered). | ||
|
|
||
| ## Common parameters | ||
|
|
||
| All three endpoints share the same base parameters: | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | ------------ | -------- | -------- | ------------------------------------------------------------------------ | | ||
| | `start` | `string` | Yes | Start date for the analytics period. | | ||
| | `end` | `string` | Yes | End date for the analytics period. | | ||
| | `resolution` | `string` | Yes | Time granularity: `15min`, `hour`, `day`, or `month`. | | ||
| | `utcOffset` | `string` | No | UTC offset in minutes. Adjusts how data points align to time boundaries. | | ||
|
|
||
| ## Viewing minutes | ||
|
|
||
| Returns how many minutes viewers spent watching a channel's streams. | ||
|
|
||
| `GET https://api.theo.live/v2/channels/{channelId}/analytics/viewing-minutes` | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | ------------------ | -------- | -------- | ------------------------------------------------------- | | ||
| | `groupBy` | `string` | No | `channel`, `distribution`, or `streaming-format`. | | ||
| | `distributionIds` | `string` | No | Comma-separated list of distribution IDs to filter by. | | ||
| | `streamingFormats` | `string` | No | Comma-separated list of streaming formats to filter by. | | ||
|
|
||
| ### Example | ||
|
|
||
| ``` | ||
| GET /v2/channels/{channelId}/analytics/viewing-minutes?start=2025-01-01&end=2025-01-31&resolution=day&groupBy=distribution | ||
| ``` | ||
|
|
||
| ## Bytes transferred | ||
|
|
||
| Returns the total amount of data delivered to viewers for a channel. | ||
|
|
||
| `GET https://api.theo.live/v2/channels/{channelId}/analytics/bytes-transferred` | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | ------------------ | -------- | -------- | ------------------------------------------------------- | | ||
| | `groupBy` | `string` | No | `channel`, `distribution`, or `streaming-format`. | | ||
| | `streamingFormats` | `string` | No | Comma-separated list of streaming formats to filter by. | | ||
|
|
||
| ### Example | ||
|
|
||
| ``` | ||
| GET /v2/channels/{channelId}/analytics/bytes-transferred?start=2025-01-01&end=2025-01-31&resolution=day&groupBy=streaming-format | ||
| ``` | ||
|
|
||
| ## Transcoding minutes | ||
|
|
||
| Returns how many minutes of transcoding capacity was used by a channel's engines. | ||
|
|
||
| `GET https://api.theo.live/v2/channels/{channelId}/analytics/transcoding-minutes` | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| | ----------- | -------- | -------- | ------------------------------------------------ | | ||
| | `groupBy` | `string` | No | `engine` or `channel`. | | ||
| | `engineIds` | `string` | No | Comma-separated list of engine IDs to filter by. | | ||
|
|
||
| ### Example | ||
|
|
||
| ``` | ||
| GET /v2/channels/{channelId}/analytics/transcoding-minutes?start=2025-01-01&end=2025-01-31&resolution=month&groupBy=engine | ||
| ``` | ||
|
|
||
| ## Response format | ||
|
|
||
| All three endpoints return the same response structure: | ||
|
|
||
| ```json | ||
| { | ||
| "data": [ | ||
| { | ||
| "timestamp": "2025-01-01T00:00:00.000Z", | ||
| "records": [ | ||
| { | ||
| "id": "channel-id-or-group-id", | ||
| "amount": 1234.5 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| - **`timestamp`** — the start of the time bucket, based on the chosen `resolution`. | ||
| - **`records`** — one entry per group (e.g. per distribution, per engine). When no `groupBy` is specified, there is a single record per bucket. | ||
| - **`id`** — identifier of the grouped entity (channel ID, distribution ID, engine ID, or streaming format name). | ||
| - **`amount`** — the metric value for that time bucket. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.