Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.

DecodeHeader func work with H264 streaming video ?

zheng_s_
Beginner
75 Views

Hi  I have a streaming video service, basicly, someone pass the H264 video frame by frame to my Decoder element and I need decode and vpp each video frame.  I saw the example code it use DecodeHeader fucntion to get the mfxVideoParams and then use it  to initialize the mfxVideoDecoder. I try pass first H264 raw frame to DecodeHeader function but it return  MFX_ERR_UNDEFINED_BEHAVIOR.    Is  that single frame is good enought for DecodeHeader function to fill the mfxVideoParam or not ?  or DecodeHeader function dont work with streaming video.   I can get some configuration data from outside and fill into  mfxVideoParams  strucutre but that structure looks very complex and I dont what the necessary paramter it needed.  here is the struture .

typedef struct _mfxVideoParam {
mfxU32 reserved[3];
mfxU16 reserved3;
mfxU16 AsyncDepth;
union {
mfxInfoMFX mfx;
mfxInfoVPP vpp;
}
mfxU16 Protected;
mfxU16 IOPattern;
mfxExtBuffer **ExtParam;
mfxU16 NumExtParam;
mfxU16 reserved2;
} mfxVideoParam;

the mfxInfoMFX mfx; looks really complex and I dont know which one is necessary.

0 Kudos
1 Reply
Petter_L_Intel
Employee
75 Views

Hi Zheng,

I suspect the reason DecodeHeader is not able to determine the stream details is due to missing SPS/PPS header info in the bitstream data you provided to DecodeHeader. Please make sure that the data provided has the header info preceding first I frame or a reference frame.

If you are still having issue please extract and share the bitstream data and share it with us so that we can analyze the stream locally.

Regards,
Petter 

Reply