Skip to content


TTML decoder

Register name used to load filter: ttmldec
This filter may be automatically loaded during graph resolution.

This filter decodes TTML streams into a SVG scene graph of the compositor filter.
The scene graph creation is done through JavaScript.
The filter options are used to override the JS global variables of the TTML renderer.

In stand-alone rendering (no associated video), the filter will use:

  • Width and Height properties of input pid if any
  • otherwise, osize option of compositor if set
  • otherwise, txtw and txth


script (str, default: $GSHARE/scripts/ttml-renderer.js): location of TTML SVG JS renderer
font (str, default: SANS, updatable): font
fontSize (flt, default: 20, updatable): font size
color (str, default: white, updatable): text color
valign (enum, default: bottom, updatable): vertical alignment

  • bottom: align text at bottom of text area
  • center: align text at center of text area
  • top: align text at top of text area

lineSpacing (flt, default: 1.0, updatable): line spacing as scaling factor to font size
txtw (uint, default: 400): default width in standalone rendering
txth (uint, default: 200): default height in standalone rendering