Launch template format
The launch template consists of three main parts
Here is an example of a launch template.
{
"data": {
"assets": [
{
"id": "123",
"creationDate": "1977-05-04T13:37:00.000Z",
"updateDate": "1977-05-25T13:37:00.000Z",
"metadata": [
{
"key": "title",
"value": "Example asset"
}
],
"files": [
{
"id": "234",
"type": "VIDEO",
"url": "https://example.com/video.mp4",
"container": {
"videoStreams": [
{
"frameRateNumerator": 30,
"frameRateDenominator": 1
}
],
"audioStreams": [
{
"channels": 2
}
]
},
"metadata": [
{
"key": "language",
"value": "en"
}
]
},
{
"url": "https://example.com/audio.mp4",
"type": "AUDIO",
"container": {
"audioStreams": [
{
"channels": 2
}
]
}
},
{
"type": "SUBTITLE",
"url": "https://example.com/subtitle.vtt",
"container": {
"format": "vtt"
}
},
{
"type": "SUBTITLE",
"url": "https://example.com/subtitle.stl",
"container": {
"format": "stl",
"startTime": {
"frame": 3600,
"numerator": 1,
"denominator": 1
}
}
},
{
"type": "STILL_FRAME",
"url": "https://example.com/thumbnail.001.jpg",
"metadata": [
{
"key": "still_frame:timestamp",
"value": "27361@24:1"
}
]
},
{
"type": "SPRITE_MAP",
"url": "https://example.com/spritemap.jpg",
"manifest": {
"width": 240,
"height": 135,
"sprites": [
{
"x": 0,
"y": 0,
"t": 13152384000
}
]
}
},
{
"type": "WAVEFORM",
"url": "https://example.com/waveform.dat",
"metadata": [
{
"key": "waveform:source_file_id",
"value": "234"
},
{
"key": "waveform:track",
"value": "0"
}
]
}
],
"markerGroups": [
{
"title": "Group title",
"readOnly": false,
"markerStyle": {
"backgroundColor": "var(--AP-SUCCESS)"
},
"markerTracks": [
{
"title": "Track title",
"markers": [
{
"metadata": [
{
"key": "name",
"value": "Marker name"
},
{
"key": "description",
"value": "Marker description"
}
],
"start": {
"frame": 100,
"numerator": 24,
"denominator": 1
},
"end": {
"frame": 9000,
"numerator": 24,
"denominator": 1
}
}
]
}
]
}
]
}
],
"project": {
"metadata": [
{
"key": "av_frame_rate_numerator",
"value": "24"
},
{
"key": "av_frame_rate_denominator",
"value": "1"
},
{
"key": "av_drop_frame",
"value": "false"
},
{
"key": "av_aspect_ratio_width",
"value": "256"
},
{
"key": "av_aspect_ratio_height",
"value": "109"
}
],
"segments": [
{
"start": {
"frame": 0,
"numerator": 24,
"denominator": 1
},
"end": {
"frame": 121,
"numerator": 24,
"denominator": 1
},
"metadata": [
{
"key": "z-index",
"value": "0"
},
{
"key": "source-in",
"value": "0"
},
{
"key": "source-out",
"value": "3557400000"
},
{
"key": "track-type",
"value": "V"
},
{
"key": "track",
"value": "V0"
},
{
"key": "source-track",
"value": "0"
},
{
"key": "source-channel",
"value": "0"
},
{
"key": "target-track",
"value": "0"
},
{
"key": "source-rate-drop-frame",
"value": "false"
},
{
"key": "source-asset-id",
"value": "123"
},
{
"key": "source-file-id",
"value": "234"
}
]
}
]
}
},
"endpoints": {
"publish": {
"download": false,
"http": {
"url": "https://example.com/export",
"method": "POST",
"headers": {
"Authorization": "Bearer ..."
}
}
}
},
"settings": {
"features": {
"videoContextMenu": false
}
}
}
Data
Contains all session data. Information about the assets that are to be opened. It is possible to define multiple assets although in most cases a single asset is sufficient.
Asset Files
An asset can hold multiple files. Typically, files consist of a id
, type
, url
, container
(technical metadata) and metadata
(user defined metadata).
id
is optional but helps with identifying the file when you publish your changes. An autogenerated id
is used if it is not set explicitly.
Video
MP4 video files are analyzed on the fly to extract container information like frame rate and channel count. HLS/DASH streams are not analyzed, and format, frame rate and audio channel counts needs to be added manually.
{
"id": "234",
"type": "VIDEO",
"url": "https://example.com/dash_video.mpd",
"container": {
"format": "dash",
"videoStreams": [
{
"frameRateNumerator": 24,
"frameRateDenominator": 1
}
],
"audioStreams": [
{
"channels": 2
}
]
},
"metadata": [
{
"key": "language",
"value": "en"
}
]
}
Container
The frontend application will try to figure out some of these properties by analyzing the file. Information provided in the launch template will however always take precedence over the file analysis.
Container property | Required | Description |
---|---|---|
format | No | The video file format. Needs to be set to dash for MPEG Dash manifests (.mpd) and hls for HLS manifests (.m3u8). It does not need to be set for simple video proxies, played with progressive download. |
startTime | No | The start time offset for the video. Specified as a time code object. This example uses a start time offset of 1 hour (01:00:00:00 ): { "frame": 3600, "numerator": 1, "denominator": 1} |
videoStreams | No | Array of videoStream objects |
audioStreams | No | Array of audioStream objects |
subtitleStreams | No | Array of subtitleStream objects |
Video stream object
Video stream property | Required | Type | Description |
---|---|---|---|
timeBaseNumerator | No | number | Time base numerator |
timeBaseDenominator | No | number | Time base denominator |
duration | No | number | Duration of the video stream in the provided time base |
frameRateNumerator | No | number | Video frame rate numerator |
frameRateDenominator | No | number | Video frame rate denominator |
resolutionWidth | No | number | Video resolution width |
resolutionHeight | No | number | Video resolution height |
aspectRatioWidth | No | number | Video aspect ratio width |
aspectRatioHeight | No | number | Video aspect ratio height |
metadata | No | array | Array of key/value pairs. ex: [{ "key": "the key", "value": "the value" }] |
bitrate | No | number | bitrate information, used for display purposes only |
codec | No | string | codec information, used for display purposes only |
Audio stream object
Audio stream property | Required | Type | Description |
---|---|---|---|
timeBaseNumerator | No | number | Time base numerator |
timeBaseDenominator | No | number | Time base denominator |
duration | No | number | Duration of the video stream in the provided time base |
sampleRate | No | number | The sample rate |
channels | No | number | The number of channels in the stream |
metadata | No | array | Array of key/value pairs. ex: [{ "key": "the key", "value": "the value" }] |
bitrate | No | number | bitrate information, used for display purposes only |
codec | No | string | codec information, used for display purposes only |
Subtitle stream object
Subtitle stream property | Required | Type | Description |
---|---|---|---|
metadata | No | array | Array of key/value pairs. ex: [{ "key": "the key", "value": "the value" }] |
Audio
Audio files are not analyzed. They require channel count information to be provided.
{
"id": "456",
"type": "AUDIO",
"url": "https://example.com/audio.mp4",
"container": {
"audioStreams": [
{
"channels": 2
}
]
}
}
Container
Container property | Required | Description |
---|---|---|
audioStreams | No | Array of audioStream objects |
Subtitle
Subtitle files are not analyzed. They require container format to be defined.
{
"id": "789",
"type": "SUBTITLE",
"url": "https://example.com/subtitle.vtt",
"container": {
"format": "vtt",
"startTime": {
"frame": 3600,
"numerator": 1,
"denominator": 1
}
}
}
Container
Container property | Required | Description |
---|---|---|
format | Yes | The subtitle/caption format. One of: srt , vtt , scc , pac , imsc , .cap , .ìtt or stl |
startTime | No | The start time offset for the time codes in the file. Specified as a time code object. This example uses a start time offset of 1 hour (01:00:00:00 ): { "frame": 3600, "numerator": 1, "denominator": 1} |