Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jackhong
Beginner
175 Views

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

Jump to solution

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
175 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

7 Replies
jackhong
Beginner
175 Views

supplement:

                  i am using H264 encoder with INDE 2015;

                  which I need API just like x264_encoder_headers function in x264.

175 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,

jackhong
Beginner
175 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.

176 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

jackhong
Beginner
175 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?

175 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,

jackhong
Beginner
175 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!

Reply