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 subtitles.
The options to set are:
font
(string):fontSize
(number)colorPrimary
(string)colorSecondary
(string)colorOutline
(string)colorBack
(string)bold
(0 or -1). Set to-1
to be bolditalic
(0 or -1). Set to-1
to be italicunderline
(0 or -1). Set to-1
to underlinestrikeOut
(0 or -1). Set to-1
to strike out textscaleX
(number). Scale the subtitles on X axis (100 is no scaling)scaleY
(number). Scale the subtitles on Y axis (100 is no scaling)spacing
(number). Font spacingangle
(number). Rotation of subtitles 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 subtitles 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 subtitles in the transcription.
id
(string): Unique ID of the cuestart
(number): Start time in millisecondsend
(number): End time in millisecondschildren
(array ofCueWord
objects)
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 totrue
to italicize the wordbold
(boolean): Set totrue
to bold the wordunderline
(boolean): Set totrue
to 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 Fatface
Alegreya
Archivo
Arial
Arvo
B612
BioRhyme
Cairo
Cardo
Concert One
Cormorant
Courier New
Crimson Text
Fjalla One
Frank Ruhl Libre
Georgia
Helvetica Neue
IBM Plex Sans
Inter
Karla
Lato
Lora
Montserrat
Muli
Old Standard TT
Oswald
Playfair Display
PT Serif
Rakkas
Roboto
Rubik
Source Sans Pro
Spectral
Times New Roman
Titillium Web
Ubuntu
Varela
Verdana
Vollkorn
Work Sans
Yatra One