Decklink SDI ! ccextractor ! x264

John P Poet jppoet at
Wed Mar 27 15:10:50 UTC 2019

On Tue, Mar 26, 2019 at 5:55 PM Tim Müller <tim at> wrote:

> On Tue, 2019-03-26 at 16:55 -0600, John P Poet wrote:
> Hi,
> > Can someone give me an example pipeline for processing captions from
> > decklinkvideosrc into a h.264 or mpeg2 video?  Preferably, I would
> > like to end up with a transport stream.
> >
> > gst-launch-1.0 version 1.15.2
> > GStreamer 1.15.2 (GIT)
> > Unknown package origin
> >
> > I am starting with a pipeline like:
> >
> > gst-launch-1.0 decklinkvideosrc device-number=${DEVICE} mode=12 skip-
> > first-time=500 output-cc=true video-format=2 duplex-mode=0 !
> > ccextractor ! autovideoconvert ! queue ! x264enc interlaced=true !
> > 'video/x-h264, profile=(string)main' ! h264parse ! queue ! mpegtsmux
> > name=mux ! queue ! filesink location=video.ts
> >
> > Am I putting the ccextractor in the wrong place, or is there other
> > elements necessary to create the GstVideoCaptionMeta for x264enc?
> So (don't have a decklink at hand right now, so haven't tested)...
> decklinkvideosrc will put caption metas on buffers (either
> TYPE_CEA708_CDP or TYPE_CEA608_S334_1A).
> x264enc will pick up caption metas of TYPE_CEA708_RAW (only) from input
> buffers and inject them into the bitstream.
> So in an ideal world you'd have something that would convert those
> metas on the buffers, but I'm not sure that exists yet.

Thank you Tim.  That is helpful information.  What is the best way to debug
the state and type of captions attached to a buffer at any specific place
in the pipeline?

There is ccconverter, but it doesn't operate on metas but a packetised
> closed caption stream, so you'd have to use ccextractor to split the
> metas into a stand-alone stream, then convert the type to what x264enc
> needs, then put the result back on buffers as metas with cccombiner.

Can you provide me with a theoretical pipeline that would be used for
this?  That would help me get on the right path and figure out what the
current state actually is, and what would need to be done.

> So much for the theory. In practice some things may not be fully
> implemented yet. Your mileage may vary. Good luck :)

Can GStreamer output captions to a MCC or SRT file?  Begin able to take the
data from decklinkvideosrc and write the captions out to a file would be a
good first step in validating what is happening.

Thanks again,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list