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

Getting MFX_ERR_INVALID_VIDEO_PARAM from MFXVideoDECODE_Init

zedus
Beginner
800 Views
Using guidlines and information from this forum, i'm attempting to minimize latency in the Intel Media SDK decoder.

When i add the following code:
MSDK_ZERO_MEMORY(m_extCO);
m_extCO.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
m_extCO.Header.BufferSz = sizeof(mfxExtCodingOption);
m_extCO.MaxDecFrameBuffering = 1;
m_extBuffersInit[0] = reinterpret_cast(&m_extCO);
m_mfxVideoParams.NumExtParam = 1;
m_mfxVideoParams.ExtParam = m_extBuffersInit;

MFXVideoDECODE_Init returns -15 (MFX_ERR_INVALID_VIDEO_PARAM)

I'm running on SW mode,
And my machine is core i7 Intel.

(If i do not add that code everything works perfectly, apart from the lag...)

Any help is appreciated - i do not understand why this returns as "unsupported".

EDIT:
After all of the recommended changes to reduce latency (apart from extra params i'm having trouble to use) the frame latency got from 12 to 3. What i need is latency of 1. (And i encode H264 that way using a different lib, which i know for sure that it was not encoded with any latency requirement)
0 Kudos
3 Replies
Nina_K_Intel
Employee
800 Views
Hello,

mfxExtCodingOption external buffer is aimed to supply additional settings for the encoder. Decoder doesn't support it so it returns an error when you attach this type of buffer to mfxVideoParam.

Configuring decoder for low latency doesn't require any external buffers to be attached. Are you using AsyncDepth=1 and NumThread=1 already?

Regards,
Nina
0 Kudos
zedus
Beginner
800 Views
Thanks for your quick reply.

Yes, i am using NumThread=1 and AsyncDepth=1

How much latency is expected in the decoder? as i said in the edit, what i currently have is 3 frames latency.

0 Kudos
Nina_K_Intel
Employee
800 Views
With mentioned settings there should be no latency in frames, i.e. decoder outputs the frame right after it is decoded. I suspect that your input stream doesn't really have zero latency as you expect. You may check with some stream analyzing tool if there are B frames in the stream and what is the value of max_dec_frame_buffering. Another suggestion - you can generate a low-latency stream using Media SDK encoder via sample_videoconf (you can find it under samples folder of MSDK 3.0 Beta) and then decode this stream to check latency.

Regards,
Nina
0 Kudos
Reply