How to add textstream elements using AMLST API

We were recently asked to add ttml files programatically to a SMIL file using the AMLST API found here

AMLST API Article

The article covers well how to add sources to generate a compatible SMIL output for clients however it was not that obvious how to add a ‘textstream’ rendition. After a little messing about we figured it out with the following

MediaListRendition rendition3 = new MediaListRendition();
rendition3.setType(18);
rendition3.setLanguage("eng");
rendition3.setName("sample.ttml");
WMSProperties props = rendition3.getProperties(true);
props.setProperty("iswowzacaptionstream", "true");
segment.addRendition(rendition3);

The elements here to note are as follows

- Set Type value 18 refers directly to textstream. We did try other numbers but nothing seemed to work except for audio/video outputs.
- The rendition3.getProperies(true) actually creates a properties stack in the rendition. If this is set to false it returns null.
- When you have a properties stack you can add any properties you want and it causes them to be added as param entries in the rendition.

The above code produces the following SMIL rendition addition

<textstream src="sample.ttml" system-language="eng">
<param name="isWowzaCaptionStream" value="true" />
</textstream>

Comments are closed.