Add closed captions CEA-708 to videostream

I am working on integration of closed captions to video stream over RTMP, there are same tecnics that allow integration of closed captions:

  1. Using CEA-608 (SEI user_data), most stable (unfortunately only English supported)
  2. Using CEA-708 (SEI user_data), supports most European languages, but less stable
  3. Using CEA-708/EIA-608 sent via RTMP onCaptionInfo script/AMF0 tag. When sending via RTMP, the payload must contain an ECMA array with two pairs of elements:
    • A string named “type” containing the characters “708”.
    • A string named “data” containing a base64 encoded CEA-708/EIA-608 payload.

I tested with the following pipelines

  1. filesrc location=file.srt ! subparse ! tttocea608 … cccombiner name=cc_inject ! vah264enc ! video/x-h264,profile=main ! …
    As a result we have streaming via rtmp2 plugin or video file with built-in closed captions in 608 format.
  2. filesrc location=file.srt ! subparse ! tttocea708 … cccombiner name=cc_inject ! vah264enc ! video/x-h264,profile=main ! …
    As a result, we have streaming over rtmp2 with closed captions that appear with a lot of delay, disappearing and reappearing. It seems that cccombiner has problems handling cea-708. I always try to convert cea-608 to cea-708 using ccconverter as well but seams that is no way to have embedded cea-708 closed captions.

For the 3 point I couldn’t find the way to insert RTMP onCaptionInfo script/AMF0 tag.
I have seen that a gorgeous project ‘rsclosedcaption’ continues to improve, in fact tttocea708 has recently been added. But I could not get closed captions via CEA-708 or onCaptionInfo script/AMF0 tags using those plugins.
I appreciate any suggestions on where to dig to make points 2 and 3 work.