Skip to main content

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 bold
  • italic (0 or -1). Set to -1 to be italic
  • underline (0 or -1). Set to -1 to underline
  • strikeOut (0 or -1). Set to -1 to strike out text
  • scaleX (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 spacing
  • angle (number). Rotation of subtitles in degrees (0 is no rotation)
  • borderStyle (number or “\r”). 1 - Outline with shadow, 3 - Opaque box, “\r” - reset
  • outline (number). Width of text outline in pixels
  • shadow (number). Depth of the text shadow in pixels
  • alignment (number). (see below)
  • marginL (number). Left margin
  • marginR (number). Right margin
  • marginV (number). Vertical margin
  • encoding (0)
  • hasBackground (boolean). If subtitles have background
  • showWatermark (boolean). Set to show “Made by Subly” watermark
  • backgroundStyles (string). None, Outline, Background
  • customLogo (object - optional). Details of optional logo to display
    • id (string). Unique ID of logo asset
    • url (string): public URL for logo asset
    • dimensions (object)
      • width (number)
      • height (number)
    • visible (boolean)
    • position (string): Top Left, Top Right, Bottom Left, Bottom Right, Bottom Centre
    • opacity (number): 0 - 100
    • size (string): Small, Medium, Large
    • padding (object)
      • x (number)
      • y (number)
  • aspectRatio (object - optional). Details of the aspect ratio to display video
    • originalRatio (string): 16:9, 9:16, 1:1, 4:5, Original
    • ratio (string): 16:9, 9:16, 1:1, 4:5, Original
    • fit (string): crop, border
    • color (string): hex value for border color
  • headline (object - optional)
    • visible (boolean)
    • text (string): The headline text
    • duration (number): Time in milliseconds to display the headline
    • style (object)

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