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.
3056 Discussions

find a API which can get sps and pps data before encode a frame

jackhong
Beginner
557 Views

hi I need obtain sps/pps data before calling MFXVideoENCODE_EncodeFrameAsync function, does the media sdk have this API? thank you!

0 Kudos
1 Solution
Harshdeep_B_Intel
557 Views

Hello again,

Yes, MSDK API allows to retrieve coded SPS/PPS headers by call of MFXVideoENCODE_GetVideoParam right after encoder initialization. Please refer to description of “MFXVideoENCODE_GetVideoParam” in MSDK specification manual.

Thanks,

View solution in original post

0 Kudos
7 Replies
jackhong
Beginner
557 Views

supplement:

                  i am using H264 encoder with INDE 2015;

                  which I need API just like x264_encoder_headers function in x264.

0 Kudos
Harshdeep_B_Intel
557 Views

Hi Jackhong, 

To extract raw SPS/PPS headers info from the encoded stream, you should call MFXVideoENCODE_GetVideoParam with mfxExtCodingOptionSPSPPS structure attached to the mfxVideoParam structure. Please refer to mediasdk-man.pdf  and look for mfxExtCodingOptionSPSPPS structure on page 97 for API details on sps/pps parameters . Also a note, make sure you are allocating sufficient space for SPS/PPS buffer. I hope this is what you are looking for.

Thanks,

0 Kudos
jackhong
Beginner
557 Views

thank you Harsh Jain!

but my requirement is get sps and pps data before encoding a frame! 

which I need API just like x264_encoder_headers function in x264.

0 Kudos
Harshdeep_B_Intel
558 Views

Hello again,

Yes, MSDK API allows to retrieve coded SPS/PPS headers by call of MFXVideoENCODE_GetVideoParam right after encoder initialization. Please refer to description of “MFXVideoENCODE_GetVideoParam” in MSDK specification manual.

Thanks,

0 Kudos
jackhong
Beginner
557 Views

 thank you for your help!

I have another problem:  the prefixes of SPS/PPS/SEI are 0x00 00 00 01, but the prefixes of IDR slice/P slice/B slice are 0x00 00 01; are there some paramters in SDK structures can convert 0x00 00 01 to 0x00 00 00 01 or must manual converting by myself?

0 Kudos
Harshdeep_B_Intel
557 Views

Hi Jackhong,

Apologies, I donot clearly understand your question. Do you want MSDK to pack 0x00000001 prefixes for slices instead of 0x000001? There is no such control in MSDK API. By AVC standard, SPS, PPS should have 0x00000001 start code. Here MSDK literally follows the standard.

Also, please create a new thread for new question, so it will easier for us to track on our end.

Thanks,

0 Kudos
jackhong
Beginner
557 Views

Harsh Jain (Intel) wrote:

Hi Jackhong,

Apologies, I donot clearly understand your question. Do you want MSDK to pack 0x00000001 prefixes for slices instead of 0x000001? There is no such control in MSDK API. By AVC standard, SPS, PPS should have 0x00000001 start code. Here MSDK literally follows the standard.

Also, please create a new thread for new question, so it will easier for us to track on our end.

Thanks,

 

OK,thank you for your advice! in addition, With your help, I had solve my problems In the process of using inde 2015, thank you very much!

0 Kudos
Reply