Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**Specifications**

* [Monitoring](/specifications/monitoring/MONITORING.md)

* [Standard Connector](/specifications/standard-connector/METADATA.md)

**Components**

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/Specifications/error-schema.json",
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/public/specifications/monitoring/schemas/error-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/Specifications/start-schema.json",
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/public/specifications/monitoring/schemas/start-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/Specifications/status-schema.json",
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/public/specifications/monitoring/schemas/status-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
Expand Down
166 changes: 166 additions & 0 deletions public/specifications/standard-connector/METADATA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Standard Metadata Specification

---

**Version:** 1.0 |
**Date:** October 05, 2026

---

## Introduction

Metadata associated with media playback is usually pretty standard. A player namely expects to know what is being played (stream URL) and have basic metadata (title, subtitle, artwork) that can be displayed to the user.

For products that do not already provide this metadata through a dedicated backend, Pillarbox defines a comprehensive, standard metadata format that can be adopted when implementing a playback metadata endpoint. All Pillarbox players natively understand this format, eliminating the need for custom metadata connector implementations.

## JSON Format

The Pillarbox standard metadata format is made of the following top-level structure:

| Key | Description | Format | Examples |
|----------------|--------------------------------------------|-----------------------------------------|-------------------------------------------------------|
| `chapters` | Chapters | JSON array (of _Chapters_, see below) | `[ ... ]` |
| `customData` | Custom data | JSON dictionary | `{ ... }` |
| `description` | A long description of the content | String | `Picking up the story where Back to the Future (...)` |
| `drm` | DRM information | JSON dictionary (_DRM_, see below) | `{ ... }` |
| `episodeNumber`| The episode number | Integer | 2 |
| `identifier` | A unique content identifier | String | `back_to_future_2` |
| `posterUrl` | The URL of an image describing the content | String | `https://...` |
| `seasonNumber` | The season number | Integer | 1 |
| `source` | Source information | JSON dictionary (_Source_, see below) | `{ ... }` |
| `subtitle` | A subtitle describing the content | String | `Science-fiction` |
| `subtitles` | Information about external subtitles | JSON array (of _Subtitles_, see below) | `[ ... ]` |
| `timeRanges` | Time ranges | JSON array (of _Time range_, see below) | `[ ... ]` |
| `title` | A title describing the content | String | `Back to the Future II` |
| `version` | The version of the JSON format | Number | 1 |
| `viewport` | The viewport | `STANDARD`, `MONOSCOPIC` (360°) | `STANDARD` |

> [!INFO]
> All keys listed above are optional.

Objects appearing as JSON dictionaries or arrays are described below.

### Chapter

Describes a chapter associated with the content.

| Key | Description | Format | Examples | Mandatory? |
|--------------|--------------------------------------------|----------------------|---------------------|------------|
| `endTime` | The chapter's end time | Time in milliseconds | `30000` | Y |
| `identifier` | A unique identifier | String | `hill_valley_1955` | N |
| `posterUrl` | The URL of an image describing the chapter | String | `https://...` | N |
| `startTime` | The chapter's start time | Time in milliseconds | `10000` | Y |
| `title` | A title describing the chapter | String | `Hill Valley, 1955` | Y |

### Custom data

A JSON dictionary which can be used to convey any arbitrary useful information.

### DRM

The DRM configuration.

| Key | Description | Format | Examples | Mandatory? |
|------------------|-----------------------------|---------------------------------------------------|---------------------|------------|
| `certificateUrl` | The certificate URL | String | `https://...` | N |
| `keySystem` | The key system | `WIDEVINE`, `FAIRPLAY`, `CLEAR_KEY`, `PLAY_READY` | `FAIRPLAY` | Y |

@defagos defagos Oct 8, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must rather be com.apple.fps (and other similar values, see Pillarbox backend Sources configuration).

| `licenseUrl` | The license acquisition URL | String | `https://...` | Y |
| `multisession` | If multi session is enabled | Boolean | `true` | N |

### Source

Describes the source of the content.

| Key | Description | Format | Examples | Mandatory? |
|-----------------------|---------------------------------------------------|----------------------------|-------------------------|------------|
| `audioFragmentFormat` | The audio fragment format | String | `TS` | N |
| `mimeType` | The MIME type | String | `application/x-mpegURL` | N |
| `type` | The type of content | `ON-DEMAND`, `LIVE`, `DVR` | `ON-DEMAND` | N |
| `url` | The URL to be played | String | `https://...` | Y |
| `videoFragmentFormat` | The video fragment format | String | `FMP4` | N |

### Subtitles

Describes external subtitles provided for the content.

| Key | Description | Format | Examples |
|------------|---------------------------------------------------|----------------------------------------|---------------|
| `kind` | The kind of subtitles | `SUBTITLES`, `DESCRIPTION`, `CAPTIONS` | `SUBTITLES` |
| `label` | A label describing the subtitles | String | `English` |
| `language` | The language code | String (BCP 47) | `en` |
| `url` | The URL where the subtitles can be loaded | String | `https://...` |

> [!INFO]
> All keys listed above are mandatory.

### Time range

Describes a time range associated with the content.

| Key | Description | Format | Examples |
|-------------|--------------------------|-------------------------------------------------|-----------|
| `endTime` | The chapter's end time | Time in milliseconds | `60000` |
| `startTime` | The chapter's start time | Time in milliseconds | `50000` |
| `type` | The type of time range | `BLOCKED`, `OPENING_CREDITS`, `CLOSING_CREDITS` | `BLOCKED` |

> [!INFO]
> All keys listed above are mandatory.

## Example

```json
{
"chapters": [
{
"endTime": 30000,
"identifier": "hill_valley_1955",
"posterUrl": "https://...",
"startTime": 10000,
"title": "Hill Valley, 1955"
}
],
"customData": {
},
"description": "Picking up the story where Back to the Future (...)",
"drm": {
"certificateUrl": "https://...",
"keySystem": "FAIRPLAY",
"licenseUrl": "https://...",
"multisession": true
},
"episodeNumber": 2,
"identifier": "back_to_future_2",
"posterUrl": "https://...",
"seasonNumber": 1,
"source": {
"audioFragmentFormat": "TS",
"mimeType": "application/x-mpegURL",
"type": "ON-DEMAND",
"url": "https://...",
"videoFragmentFormat": "FMP4"
},
"subtitle": "Science-fiction",
"subtitles": [
{
"kind": "SUBTITLES",
"label": "English",
"language": "en",
"url": "https://..."
}
],
"timeRanges": [
{
"endTime": 60000,
"startTime": "50000",
"type": "BLOCKED"
}
],
"title": "Back to the Future II",
"version": 1,
"viewport": "STANDARD"
}
```

## JSON Schema

[metadata-schema.json](specifications/standard-connector/schemas/metadata-schema.json ':ignore')
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"$id": "https://github.com/SRGSSR/pillarbox-documentation/blob/main/public/specifications/standard-connector/schemas/metadata-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"chapters": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"required": [
"endTime",
"startTime",
"title"
],
"properties": {
"endTime": {
"type": "number"
},
"identifier": {
"type": "string",
"minLength": 1
},
"posterUrl": {
"type": "string",
"minLength": 1
},
"startTime": {
"type": "number"
},
"title": {
"type": "string",
"minLength": 1
}
}
}
},
"customData": {
"type": "object",
"properties": {
},
"required": [
]
},
"description": {
"type": "string",
"minLength": 1
},
"drm": {
"type": "object",
"properties": {
"certificateUrl": {
"type": "string",
"minLength": 1
},
"keySystem": {
"type": "string",
"minLength": 1
},
"licenseUrl": {
"type": "string",
"minLength": 1
},
"multisession": {
"type": "boolean"
}
},
"required": [
"keySystem",
"licenseUrl"
]
},
"episodeNumber": {
"type": "number"
},
"identifier": {
"type": "string",
"minLength": 1
},
"posterUrl": {
"type": "string",
"minLength": 1
},
"seasonNumber": {
"type": "number"
},
"source": {
"type": "object",
"properties": {
"audioFragmentFormat": {
"type": "string",
"minLength": 1
},
"mimeType": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"minLength": 1
},
"videoFragmentFormat": {
"type": "string",
"minLength": 1
}
},
"required": [
"url"
]
},
"subtitle": {
"type": "string",
"minLength": 1
},
"subtitles": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"required": [
"kind",
"label",
"language",
"url"
],
"properties": {
"kind": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"language": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"minLength": 1
}
}
}
},
"timeRanges": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"required": [
"endTime",
"startTime",
"type"
],
"properties": {
"endTime": {
"type": "number"
},
"startTime": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"minLength": 1
}
}
}
},
"title": {
"type": "string",
"minLength": 1
},
"version": {
"type": "number"
},
"viewport": {
"type": "string",
"minLength": 1
}
},
"required": [
]
}
Loading