How to integrate closed captions into video

I’m trying integrate subtitle (closed captions) with cccompiler from a file to a video but I have many troubles to do this.
I’m reading many documentations, examples (very few on intermet / github) but not understand how to manage elements with gst-launch-1.0
Someone has yet do this? can help me?

Thanks

Do you have some more details about what exactly you’re trying to do, and what you tried already with cccombiner that doesn’t work?

I have do something like this :

Blockquote gst-launch-1.0 filesrc name=filesrc5 location=captions.txt ! ccconverter name=ccconverter6 ! cc708overlay name=cc708overlay2 ! autovideoconvert name=autovideoconvert3 ! x264enc bitrate=2000 ! flvmux name=mux ! rtmpsink location=rtmp://live-fra.twitch.tv/app/MYKEY filesrc location=…/Downloads/sample-30s.mp4 name=videotestsrc1 ! decodebin ! videoconvert ! cc708overlay2.

I read a video file, read file with captions (simple text file) and mix them and send to twitch, the closed captions seems not integrated

What’s the format of this captions.txt? Closed captions are a binary format and ccconverter assumes that they’re correctly parsed already, so a plaintext file is most likely wrong in that place and if it actually contains raw closed captions then some kind of parser would be needed between the filesrc and ccconverter.

Lmk if this works for you. I’m not too familiar with gstreamer and I’ve been using a lot of help from gpt models : )

GST_DEBUG=3 gst-launch-1.0 \
  filesrc location=video.mp4 ! parsebin name=p \
  p.src_0 ! queue ! h264parse ! \
  queue ! cccombiner name=c max-scheduled=60 ! \
  h264ccinserter remove-caption-meta=true caption-meta-order=display ! \
  h264parse ! queue ! mpegtsmux name=mux ! filesink location=output.ts \
  p.src_1 ! queue ! aacparse ! queue ! mux. \
  filesrc location=caption.mcc ! mccparse ! ccconverter ! \
  "closedcaption/x-cea-708,format=cc_data" ! queue max-size-buffers=50 ! c.caption