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.

H.264 NAL unit and SPS/PPS

Vincent_Autieri_Ii
857 Views

When EncodeFrameAsync is completed and has mfxBitstream filled, does each mfxBitstream contain a complete H.264 NAL unit? Im guessing its not hence bitstream. If it doesnt put out a complete, does a way to exist to configure this SDK to put out a complete H264 Nal unit? Also, how often does the SPS and PPS get placed into the stream?

Thank you,

Vince

0 Kudos
2 Replies
Vincent_Autieri_Ii
857 Views
Does my question make sense? The issue is trying to get the intel h264 encoded output into an RTP/RTSP SDK. Currently I manually pull out the SPS and PPS from this SDK and feed into the RTSP SDK, but their SDK will auto parse this out if this info is already in the stream. Also,if I can get this encoder to output a complete H264 Nal unit, it will save a ton of CPU work as the RTSP SDK would no longer need to parse the bytestream.
0 Kudos
Petter_L_Intel
Employee
857 Views
Hi Vincent,

Complete NAL units are written to bitstream at the moment encoded data is available (syncoperation).

Media SDK may write several NAL units at one time such as AUD, SPS, PPS, SEI, H264 slice.There is no need to configure the SDK or explicitly ask it to output complete NAL units.

You can control the frequency of SPS/PPS via the "IdrInterval" parameter. If you set this parameter to "0" an SPS/PSS will be inserted before every I frame. For more details please refer to the reference manual.

You do not have to manually extract SPS/PPS. The Media SDK API provides a mechanism for extracting SPS/PPS after encoder initialization. Please refer to chapter 4.14 in "Intel_Media_Developers_Guide.pdf" (part of the SDK package) for details on how to do this.

Regards,
Petter
0 Kudos
Reply