Embedded CEA-608/708 caption streaming to YouTube

I’m working on implementing scheduled VOD streaming with embedded captions, sourced from SRT files located alongside the videos. Based on the existing stream scheduler example, I have a working proof-of-concept that reliably shows captions when I view the stream directly with VLC. However, no captions appear when I’m using a stream target to publish to Youtube, even as VLC is showing captions off of RTMP without issues.

Is there any configuration that’s needed for a stream target to pass captions, injected by a onVideoH264Packet handler inside of a IMediaStreamH264SEINotify implementation, through to the distribution service? I haven’t had the opportunity to test it with other distribution services, so would also appreciate information on how to determine if the caption information is actually leaving my server.

Inspecting the over-the-wire packets being sent by Wowza, it appears that the issue is that no CEA608/708 packets are being sent in the RTMP onCaptionInfo/AMF0 field (based on Twitch documentation) that the service is looking for. Other posts (e.g. Embedded CEA-608 captions in live streams) have mentioned a ModuleOnTextDataToCEA608 converter that ingests the onTextData events and produces (presumably) onCaptionInfo events, but this doesn’t seem to be available from anywhere? Moreover, there doesn’t seem to be a documented way to generate the CEA-608 bodies sent in the onCaptionInfo fields if I were to inject the AMF manually.

Is there somewhere that I can find/add the ModuleOnTextDataToCEA608 module, or is there a way for me to generate the CEA-608 payload myself?

Hi @Ben_Chung let me look into this and get back to you soon with some info.

The engineers are not entirely sure what you’re asking. ModuleOnTexctDataToCEA608 should be enabled when you choose onTextData as your caption source. It will then wait for onTextData data packets in the source stream. If there are no data packets then nothing will get injected into the outgoing stream.
You can manually add the module if you want to do so.

We will need a support ticket on this to have a closer look at your configuration and assist you.

Ah! I see, so the onTextData to onCaptionInfo conversion only happens for onTextData events that are received from an input stream, and not for onTextData events that are inserted from within Wowza (in this case, into the MediaStream backing the scheduled Stream)? The solution, then, would be to ingest the stream again so that it is seen as an external source, at which point ModuleOnTextDataToCEA608 will convert those to CEA608 captions?

Yep, that worked beautifully. Thanks for the help, and sorry for the misapprehension! I set up a stream target to localhost, configured the caption source to be onTextData, and then changed the final RTMP push target to use that restreamed source, which caused the captions to show up perfectly.

Glad to hear that it’s working now!