Page 1 of 1

Set SEI unregistered user message using H264MetadataContext

Posted: Mon Dec 17, 2018 9:04 am
by maxhap
Hi all and thanks for reading!

I'm trying to set the SEI unregistered user message on a per video frame basis. I notice that libav has a H264MetadataContext structure which contains a const char *sei_user_data field. This seems to be exactly what I'm looking for. After poking around in the FFMpeg code I notice this structure is wrapped within the private data of the AVBSFContext. My knowledge is extremely limited so at this point I'm looking for an example or explanation on how to correctly access the H264MetadataContext structure. I presume I need a bit stream filter (based on the naming), but can't find any examples of setting the H264MetadataContext.

Can anyone help me with an explanation, code snippet or point me to an example I might have missed/overlooked?

Any general advice would also be appreciated. I have checked the few similar questions on stackoverflow, they don't seem to have any solid answers or explanations though (maybe due to my lack of understanding).

Thanks in advanced!