Rendering CEA-708 closed captions from MXF ANC stream

Hi All,
I’m trying to achieve showing closed captions which locates into the ANC essence of the MXF file.
I have selected gstreamer 1.28, platform is Windows.
The ANC track of mxf file exactly does carry valid cea-608 captions channel 1 and cea-708 service 1.
The pipeline is
gst-launch-1.0 filesrc location=1080i_black_QTCC708NEW_1.mxf ! mxfdemux name=d d.track_1 ! decodebin ! videoconvert ! st2038combiner name=cb ! cea708overlay cea608-channel=1 service=0 ! autovideosink d.track_4 ! cb.

It assembles correctly but no any captions on screen. I tried to play with cea608-channel and service params, no any changes. Maybe I’m doing something wrong?
The mxf file: Dropbox
Important note, there is really black screen encoded as the video track to reduce a file size.

cea708overlay operates on buffers containing GstVideoCaptionMeta. st2038combiner will only combines a st2038 stream onto a video stream using GstAncillaryMeta.

You need to convert the st2038 ANC data into a raw caption stream and combine that onto the video stream for cea708overlay to be able to display the captions.

Try this:

gst-launch-1.0 filesrc location=1080i_black_QTCC708NEW_1.mxf ! mxfdemux name=d \
    cccombiner name=c ! cea708overlay cea608-channel=1 service=0 ! autovideosink \
    d.track_1 ! queue ! decodebin ! videoconvert ! c.sink \
    d.track_4 ! queue ! st2038ancdemux name=demux \
    demux. ! st2038anctocc name=anc \
    anc.src_cea708 ! c.caption

With annotations:

demux:

filesrc location=1080i_black_QTCC708NEW_1.mxf ! mxfdemux name=d \

display result:

   cccombiner name=c ! cea708overlay cea608-channel=1 service=0 ! autovideosink \

decode the video stream and pipe it to the caption combiner:

   d.track_1 ! queue ! decodebin ! videoconvert ! c.sink \

receive the st2038 stream and pipe it to a st2038 demuxer to retrieve the caption specific ANC

   d.track_4 ! queue ! st2038ancdemux name=demux \

decode the caption ANC into a cea-708 caption stream:

   demux. ! st2038anctocc name=anc \

combine the cea-708 caption stream with the decoded raw video:

   anc.src_cea708 ! c.caption
1 Like

This is work! Thank you very much!