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

Multi-channel video streaming with Intel Media SDK hardware decode.


Dear all, 

I have few questions about Multi-channel live-streaming with Intel Media SDK hardware decode. 


Following is my implementation pseudo code

memcpy_s(m_mfxBS.Data, m_mfxBS.MaxLength, streaming data, streaming data length); // timely frame by frame  

Get current free surface

Get current free output surface

call hardware decode function DecodeFrameAsync().

Unfortunately, sometimes this decode function  would return "MFX_ERR_MORE_SURFACE".

So that I get one more free surface and call decode function again and again. 

Somehow the decoder function still return "MFX_ERR_MORE_SURFACE" back till current free surface pool is run out. 

Could you explain more about why "MFX_ERR_MORE_SURFACE"  error code happens? and happens again and again? Thank  you. 



The Second question, I implement 16 channel Full-HD 30fps live view streaming by fork 16 threads to create its own hardware decoder and 

process its received samples. My platform is Intel Haswell GT2 and it can reach 16ch Full-HD 30fps playback smoothly in 1-2 hours. 

But, during over-night test, the each channel's frame rate will be cut down seriously. 

Have you ever meet this problem? and Intel Haswell GT2 should be powerful enough to process 16ch Full-HD 30fps video, right?  

Thank you. (My OS is Win8 64bit and build my application as 64bit process) 

0 Kudos
4 Replies

Hello James,

Thanks for your questions. For (1) - this is interesting to me. I don't remember seeing MFX_ERR_MORE_SURFACE for decode. We tried with the sample_decode and decode tutorials, and we do not see this issue (we tried modifying the buffersize available and the number of surfaces to operate on).

From your pseduo-code, you seem to be doing the right things. To get a better idea and for me to reproduce your issue, can you please send in your implementation - we recommend you use one of the samples and tutorials available to add in your modifications. If you can send your test input too, that would be great. BUT yes, please use one of the samples/tutorials to reproduce the issue and send in the code to us.

From your question (2), it appears you are able to get the decode working for multiple streams and the issue is in frame rate dropping over long time periods. Does this mean the MFX_ERR_MORE_SURFACE error in (1) did not impact your decoding? Sorry, but I am a little confused. In any case, I will look into your issue in (2) and get back to you.


Hello Sravanthi K., 

Very much thanks for your prompt reply.

May I ask one more question to check my understanding about Media SDK decoder logic?

According the documentation, it indicate that Intel driver will keep surface pointer rather than copy it to enlarge performance. 

Driver reports how many surface to be referred by QueryIOSurf() function call and return "NumFrameSuggested" back to ISV side during initializing device and buffer. 

At the beginning of run-time decoding, if hardware driver consider that reference surface isn't enough, decode function will return "MFX_ERR_MORE_SURFACE" code back to request more surface pointer to be assigned.   

If above my inference is correct, input the same bit-stream info to driver, the number of reference surface should be the same always? right? 

How does ISV know that reference sample that driver to keep? 

Many thanks!


Hello James,

I am looking into your question and talking to some experts here. I hope to get back to you with an answer very soon. I see you sent another forum post with the code that I requested - thank you. Just out of curiosity, are you using any "special" video stream for your experiment? For example, does this issue occur even when you use the commonly-used test streams such as foreman or bigbuckbunny?


Hello Sravanthi K., 

The video stream is from our private IP camera. 

I will try commercial title and give the test result to you soon. 


My platform VGA is Intel HSW GT2(HD 4600) + driver (Another VGA card(NV GT-750M is disabled)

OS is Win8 64-bit and system memory is 8G.