Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Usage of mfxExtPictureTimingSEI

koby_s_
Beginner
2,105 Views

Hi
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[0].ClockTimestampFlag and m_PictureTimingSEI.TimeStamp[0].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.

Thank you

koby

0 Kudos
9 Replies
Jiandong_Z_Intel
Employee
2,104 Views

Hi There,

There are some code in "4.14  Inserting SEI message into encoded AVC stream" in Page 53 in Intel® Media SDK Dev Guide,

maybe you have a refer.

 

Thanks,

Zachary

 

0 Kudos
koby_s_
Beginner
2,105 Views

Hi Zachary

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)

Thank you

Koby

0 Kudos
Jiandong_Z_Intel
Employee
2,105 Views

Hi Koby,

Can you help to reproduce this issue with MSDK samples: sample_encode, or simple_3_encode in MSDK tutorials and send to me ?

Thanks,

Zachary

 

0 Kudos
koby_s_
Beginner
2,105 Views

Hi Zachary

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

Thank you

Koby

0 Kudos
Jiandong_Z_Intel
Employee
2,105 Views

Hi Koby,

Thanks for your reproducer,  I am looking into this issue, will get back soon.

Thanks,

Zachary

0 Kudos
Jiandong_Z_Intel
Employee
2,105 Views

Hi Koby,

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.

"

 

Thanks,

Zachary

0 Kudos
koby_s_
Beginner
2,105 Views

Thank you for the response !

Is that mean that HW implementation should work?

I will test and report soon.

Thank you for great support !

Koby

0 Kudos
koby_s_
Beginner
2,105 Views

it is not working with hw as well.
I am still getting MFX_WRN_INCOMPATIBLE_VIDEO_PARAM when calling m_pmfxENC->Init(&m_mfxEncParams);

Thank you
Koby

0 Kudos
Jiandong_Z_Intel
Employee
2,105 Views

I think you are right.

"H.264 encoder doesn’t support processing of mfxExtPictureTimingSEI template."

BTW, from your sysanalyzer.log, you are using i7-3632QM, and It looks like you should use Intel® Media SDK.

 

Thanks,

Zachary

 

 

0 Kudos
Reply