Titles / Text

OpenShot Cloud API can render high-quality vector titles and text on top of any video, and utilizes the populate SVG vector file format.

Create Dynamic Titles

There is a convenience api endpoint (/projects/<id>/title/) to create a dynamic SVG file object, and automatically add it to your project’s list of File objects. This is an easy way to generate SVG titles without custom programming on your backend.

Limitations with SVG Rendering

While most SVG properties are respected, some text effects and advanced properties are ignored. If you have an issue with rendering an SVG title, you might try simplifying it, or splitting your title up into multiple SVG files (and layering them using different File and Clip objects in OpenShot Cloud API).

SVG Files

We also recommend creating a template SVG file in a desktop vector program (such as Inkscape), with the font, text size, color, stroke, and fill already set. This is a simple text/XML file format, and can be modified easily by any programming language. Replace the text on your back-end for each title, and upload this as a new File in OpenShot Cloud API. Now you can add this file to your timeline as a Clip, and just make sure you place it on a track/layer above other clips, so it will appear on top.

Example SVG Contents

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" version="1.1" width="720" height="486" id="svg2985">
   <defs id="defs2987" />
   <g id="layer1">
      <text x="50.03632" y="273.45352" id="text2993" xml:space="preserve" style="font-size:155.10592651px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"><tspan x="50.03632" y="273.45352" id="tspan2995">My Title</tspan></text>
   </g>
</svg>
_images/title.png

Fonts

The installed fonts can be found at /usr/share/fonts, and OpenShot Cloud API includes many open-source fonts by default. You can retrieve all installed fonts with the /info/fonts/ endpoint.

To install a custom font, manually copy the file to /usr/share/fonts or POST font_file to /info/fonts/. Fonts are cached for performance reasons, so this might require a restart of your OpenShot Cloud API instance if you don’t see your new font listed, or any POST to /info/fonts/ endpoint will update the font cache.

You can also preview a JPEG thumbnail of all installed fonts with the /info/fonts/thumbnail/ endpoint.