Caption Instruction Structure

In Stamp’s terminology a caption instruction is a command sent to Stamp via the UI / REST API or File Caption Source that tells what to display, when, where and how. It’s a complex JSON object with a set of mandatory and optional attributes.

Caption instructions are fed in from various sources and are stored in the memory waiting for their activation conditions to be met, e.g. the start time arrives or the specified item in the playlist starts.

Instructions can be removed from the pool and can be updated through the API.

They can be assigned an explicit identifier via the id attribute. If that is not specified, Stamp calculates a fingerprint based on the attributes and uses that for identification.

Here are few sample instructions that can get you up to speed quickly:

{
  "start": "now+1", "end": "2100.12.31 12:00:00",
  "text": "This is really breaking news here",
  "position": {"x": 0.5, "y": 0.9},
  "style": {"font":"Verdana", "size":62, "style": "bold", "color": "yellow"},
  "transitionIn": {"type":"ticker", "speed": 4}
}

{
  "clock":"HH:mm:ss",
  "start":"2000.01.01 00:00:00.000","end":"2100.01.01 00:00:00.000",
  "style": {"font":"sansserif", "color":"#ffffff","style":"bold","size":40},
  "position":{"x":100.0,"y":100.0,"z":2,"anchor":"top-left"}
}

The REST API of Stamp including the structure of caption instructions is documented using OpenAPI specification using Swagger. You can find the explorable, interactive API documentation on the below link. Scroll down to the “Schemas” section to explore the structures.

http://streamtoolbox.com/swagger-ui/?url=http://streamtoolbox.com/api-docs/stamp.json

You can also find the API on SwaggerHub where you can download generated clients in various languages:

https://app.swaggerhub.com/apis/jantekb/Stamp/2020.04.13

An other nice way to explore the documentation is by loading it into ReDoc:

https://redocly.github.io/redoc/?url=https://streamtoolbox.com/api-docs/stamp.json