I am trying to configure the H264 encoder to generate picture timing SEI messages.
All i managed to get is a "half" of the SEI timing message (where clock_timestamp_flag = false and the rest of information does not exist. see screenshot #1).
I am trying to get a full SEI timing message (see screenshot #2) and hoped for the encoder to generate it for me as it's mentioned in the reference manual pg. 104.
I added to the mfxVideoParam::ExtParam member of the encoder configuration 2 extBuffers.
The first one is a mfxExtCodingOption and I set : mfxCodingOption.PicTimingSEI = MFX_CODINGOPTION_ON;
The second one is a mfxExtPictureTimingSEI.
I set : m_PictureTimingSEI.TimeStamp.ClockTimestampFlag and m_PictureTimingSEI.TimeStamp.CtType to 0xFFFF;
the structure's header type and header size were set too.
Still, I got only "half" of the SEI message.
It would be nice if someone can upload a piece of code showing how to make the encoder to generate the full message.
I am aware of that example but it doesn't help me.
I would like the encoder to generate pic_timing SEI message (in order to write the time stamp in the elementary stream)
Yes, I managed to reproduce it with sample_encode.
Attached are the modified pipeline_encode.cpp and pipeline_encode.h
I also attached the sysanlyzer output
The command line i'm using is : sample_encode.exe h264 -i c:\tmp\20.yuv -w 320 -h 240 -sw -o c:\tmp\k.264
BTW, I noticed that
sts = m_pmfxENC->Init(&m_mfxEncParams);
returns MFX_WRN_INCOMPATIBLE_VIDEO_PARAM, which (I guess) probably means that SEI timing message is not going to work
After read the document, We can found following in "Known Limitations" in mediasdk_release_notes.pdf
H.264 encoder doesn’t support processing of mfxExtPictureTimingSEI
template. During initialization 0xFFFF values will be reset to default values. In
runtime 0xFFFF values will be put to bitstream as is.