Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
6 Views

Adding Closed-caption messages in MPEG-2 Streams

Hello All,

I am referring to https://software.intel.com/en-us/blogs/2014/08/18/how-to-add-closed-caption-messages-in-avc-and-mpeg... Submitted by Sravanthi K. (Intel) on Code example to add CC messages to AVC, in the main encoding loop:" but while doing for MPEG-2, I faced the error "Undefined behavior. src/simple_encode_vmem_lowlat.cpp 332" See below commands line argument and with all error messages:

./_build/simple_encode_vmem_lowlat -auto -g 1920x1080 -b 5000 -f 60/1 out.yuv out_1080.h264
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0

Undefined behavior. src/simple_encode_vmem_lowlat.cpp 332

Please advice on what I am missing here. Thanks in Advance.

--
Thanks,
HRV

0 Kudos
2 Replies
Highlighted
6 Views

I tried some tests with this article, and I could not reproduce this error message.  However, one thing you may want to consider is that surfaces and encodeCtrl structures travel through the Media SDK framework similarly.    You could use an array of encodeCtrls with the same indexing scheme as the surfaces.

0 Kudos
Highlighted
Beginner
6 Views

Hi Jefferey,

Thanks for the response. I have attached my code modification. Please track my changes under tag "HRV". Please note that if I pass "m_Payload.Type = USER_START_CODE" it throws this error I mentioned above but if I pass "m_Payload.Type = SEI_USER_DATA_REGISTERED_ITU_T_T35" it encodes and generates H.264 file.

Also note that, If I explicitly assign user start code to 0x000001B2 in m_seiData array it works and encodes H.264.

My ultimate goal is to insert CEA608 and/or CEA708 CC into MPEG-2 video. Please advise and suggest, Your quick and valuable input will move me in my further development.

--
Thanks,
Hitesh

0 Kudos