Common Data Formats
This page describes the common data formats used by the Subly APIs.
Media Configuration
The Media Configuration object contains all the styling information for captions.
The options to set are:
font(string):fontSize(number)colorPrimary(string)colorSecondary(string)colorOutline(string)colorBack(string)bold(0 or -1). Set to-1to be bolditalic(0 or -1). Set to-1to be italicunderline(0 or -1). Set to-1to underlinestrikeOut(0 or -1). Set to-1to strike out textscaleX(number). Scale the captions on X axis (100 is no scaling)scaleY(number). Scale the captions on Y axis (100 is no scaling)spacing(number). Font spacingangle(number). Rotation of captions in degrees (0 is no rotation)borderStyle(number or“\r”).1- Outline with shadow,3- Opaque box,“\r”- resetoutline(number). Width of text outline in pixelsshadow(number). Depth of the text shadow in pixelsalignment(number). (see below)marginL(number). Left marginmarginR(number). Right marginmarginV(number). Vertical marginencoding(0)hasBackground(boolean). If captions have backgroundshowWatermark(boolean). Set to show “Made by Subly” watermarkbackgroundStyles(string). None, Outline, BackgroundcustomLogo(object - optional). Details of optional logo to displayid(string). Unique ID of logo asseturl(string): public URL for logo assetdimensions(object)width(number)height(number)
visible(boolean)position(string): Top Left, Top Right, Bottom Left, Bottom Right, Bottom Centreopacity(number): 0 - 100size(string): Small, Medium, Largepadding(object)x(number)y(number)
aspectRatio(object - optional). Details of the aspect ratio to display videooriginalRatio(string): 16:9, 9:16, 1:1, 4:5, Originalratio(string): 16:9, 9:16, 1:1, 4:5, Originalfit(string): crop, bordercolor(string): hex value for border color
headline(object - optional)visible(boolean)text(string): The headline textduration(number): Time in milliseconds to display the headlinestyle(object)
Subly Transcription
The transcription is an array of Cue items (see below)
Cue
A Cue object represents a section of captions in the transcription.
id(string): Unique ID of the cuestart(number): Start time in millisecondsend(number): End time in millisecondschildren(array ofCueWordobjects)
CueWord
A CueWord object represents a word in the transcription with optional individual styling.
text(string): The wordstart(number): Start time in millisecondsend(number): End time in millisecondsitalics(boolean): Set totrueto italicize the wordbold(boolean): Set totrueto bold the wordunderline(boolean): Set totrueto underline the wordcolorPrimary(string): Hex color value for the primary colorcolorOutline(string): Hex color value for the outline color
Common Values
Alignment
The Alignment is based on the number layout of the numerical keypad
- 1: Bottom Left
- 2: Bottom Centre
- 3: Bottom Right
- 4: Middle Left
- 5: Middle Centre
- 6: Middle Right
- 7: Top Left
- 8: Top Centre
- 9: Top Right
Available Values
Fonts
Latin Character Fonts
Abril FatfaceAlegreyaArchivoArialArvoB612BioRhymeCairoCardoConcert OneCormorantCourier NewCrimson TextFjalla OneFrank Ruhl LibreGeorgiaHelvetica NeueIBM Plex SansInterKarlaLatoLoraMontserratMuliOld Standard TTOswaldPlayfair DisplayPT SerifRakkasRobotoRubikSource Sans ProSpectralTimes New RomanTitillium WebUbuntuVarelaVerdanaVollkornWork SansYatra One