<div dir="ltr"><div dir="ltr">On Tue, Mar 26, 2019 at 5:55 PM Tim Müller <<a href="mailto:tim@centricular.com">tim@centricular.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, 2019-03-26 at 16:55 -0600, John P Poet wrote:<br>
<br>
Hi,<br>
<br>
> Can someone give me an example pipeline for processing captions from<br>
> decklinkvideosrc into a h.264 or mpeg2 video?  Preferably, I would<br>
> like to end up with a transport stream.<br>
> <br>
> gst-launch-1.0 version 1.15.2<br>
> GStreamer 1.15.2 (GIT)<br>
> Unknown package origin<br>
> <br>
> I am starting with a pipeline like:<br>
> <br>
> gst-launch-1.0 decklinkvideosrc device-number=${DEVICE} mode=12 skip-<br>
> first-time=500 output-cc=true video-format=2 duplex-mode=0 !<br>
> ccextractor ! autovideoconvert ! queue ! x264enc interlaced=true !<br>
> 'video/x-h264, profile=(string)main' ! h264parse ! queue ! mpegtsmux<br>
> name=mux ! queue ! filesink location=video.ts    <br>
> <br>
> Am I putting the ccextractor in the wrong place, or is there other<br>
> elements necessary to create the GstVideoCaptionMeta for x264enc?<br>
<br>
So (don't have a decklink at hand right now, so haven't tested)...<br>
<br>
decklinkvideosrc will put caption metas on buffers (either<br>
TYPE_CEA708_CDP or TYPE_CEA608_S334_1A).<br>
<br>
x264enc will pick up caption metas of TYPE_CEA708_RAW (only) from input<br>
buffers and inject them into the bitstream.<br>
<br>
So in an ideal world you'd have something that would convert those<br>
metas on the buffers, but I'm not sure that exists yet.<br></blockquote><div><br></div><div><br></div><div>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?</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There is ccconverter, but it doesn't operate on metas but a packetised<br>
closed caption stream, so you'd have to use ccextractor to split the<br>
metas into a stand-alone stream, then convert the type to what x264enc<br>
needs, then put the result back on buffers as metas with cccombiner.<br></blockquote><div><br></div><div><br></div><div>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.<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
So much for the theory. In practice some things may not be fully<br>
implemented yet. Your mileage may vary. Good luck :)</blockquote><br><div><br></div><div>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.<br></div><div><br></div><div>Thanks again,</div><div><br></div><div>John<br></div></div></div>