Closed Caption handling nvv4l2h264enc Jetson Nano

Hi all,
We are working on a project and we need to transcode video using the hardware encoders in the Jetson Nano, but we saw that the nvv4l2h264 & omxh264enc encoders are not keeping the embedded closed caption.

We tested using a software encoder like x264enc and it seems to handle the CC well but the hardware encoder.

We are wondering if there is a way to handle CC using hardware encoders?

This is the pipeline that I am using with software elements: (keep closed caption in the output file)
gst-launch-1.0 filesrc location=example1.ts ! tsdemux ! avdec_mpeg2video ! x264enc ! mpegtsmux ! filesink location=test-1.ts

And this is the one that I am using on the Jetson Nano and hardware elements: (No closed caption on the output file)
gst-launch-1.0 filesrc location=example1.ts ! tsdemux ! mpegvideoparse ! omxmpeg2videodec ! nvv4l2h264enc ! mpegtsmux ! filesink location=/tmp/test.ts

I appreciate any help on this.

Please share how we can check absence of closed caption. Not sure what it is and need more information. Thanks.

thanks for your reply, At the end we created a GStreamer element to insert the closed caption content in the SEI NALU on the byte-stream after H264 encoding.

We can close this ticked now.

Thank you.