Wowza Community

Java API to inject CC

Hello,

We have a bunch of .mp4 files along with their associated .ttml open caption files. We need to be able to dynamically load and broadcast these files based on a dynamic schedule without interrupting the stream.

I was able to follow the tutorial here (https://www.wowza.com/docs/how-to-use-ipublishingprovider-api-to-publish-server-side-live-streams) to stream individual mp4 files at specified times. However, I could not find an API method to inject an associated caption files. I found this page (https://www.wowza.com/docs/how-to-configure-closed-captioning-for-live-streaming), which doesn’t talk about Java API but rather a config setting. At the end of the page was a sample package that shows some API calls, but that section was described as “legacy”. I could extend that, but since it’s “legacy”, I fear that whatever API the module depends on may be unavailable with later versions of WMS.

Is there a way (beside the “legacy” way) to tell the system to load a ttml file immediately following a PublishingProviderMediaReader call?

Any assistance is much appreciated. Thank you in advance.

P.S. - This is my first time posting to this forum; please forgive me if I’m not following any established etiquette.

Hi slacker,

You can use the injection code in our article site to add AMF data into your live stream. You can also look into the example code that takes static text and injects them as closed captions. This code is mainly used for testing.

Michelle