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.

Framerate and software acceleration

Vassili_Yakovlev
Beginner
887 Views
Dear,

As adding to one of my old posts about framerate parameter during initialization ofEncoder in general, that it has limit of 172 fps, experimenting with different cameras I found that software accelerated Encoder has unstable behavior when it runs at higher frameratethan 216.6fps.
MFXVideoENCODE_EncodeFrameAsync returns status as MFX_ERR_NONE, but MFXVideoCORE_SyncOperation returns MFX_ERR_UNKNOWNfor first 50-100 frames and than MFX_ERR_MEMORY_ALLOC. Sometimes also MFX_ERR_ABORTED, but it happens only once or twice.
It seems that the software accelerated encoder internally cannot handle it in most cases and as a consequence itruns out of memory. But sometimes it can.

Kind regards,
Vassili Yakovlev
0 Kudos
12 Replies
Anthony_P_Intel
Employee
887 Views

Hi Vassili,

This does sound like a memory issue, but if it is working when framerate is <216.6 fps it may indicate a limitation in our code.

Iam curious, do you see a problem when encoding with either CBR or VBR rate control methods (instead of CQP)?

Based on some variables I recall from your previous question (about 172fps limit), I can imagine one CQP algorithm 'might' have a limit, though I need to look at this further.

To help me correctly replicate this, can you verify the following?

- Is this seen wen using command-line sample application? or are you using a media framework (like DirectShow?)

- What OS (Win7 64-bit or 32-bit)?
- If 64-bit OS, is application 64-bit or 32-bit?
(We've seen more memory issues with 32-bit applications)

- Is the behavior different when HW Encode is used (if you have a platform that contains Intel Quick Sync Video capability)?

- Can you provide your init parameters ?

THANKS
- Tony

0 Kudos
Vassili_Yakovlev
Beginner
887 Views
Hi Tony,

I'm not using DirectShow, and not using sample applications, I'm just using standard API fromIntel Media SDKimplemented in my application.
Encoder works also not stable when CBR or VBR used.
- Windows 7 32 bit
- As I told: the behaviour of the encoder when HW Encoder used is stable.
The parameters are as follows:
mfx.CodecLevel = 0
mfx.CodecProfile = MFX_PROFILE_AVC_BASELINE or any other
mfx.CodecId = MFX_CODEC_AVC
mfx.GopPicSize = it depends onconfiguration
mfx.GopRefDist = 1
mfx.GopOptFlag = MFX_GOP_STRICT
mfx.IdrInterval = 0
mfx.TargetUsage = (fps>50.0)? MFX_TARGETUSAGE_BEST_SPEED : MFX_TARGETUSAGE_BALANCED
mfx.EncodedOrder = 1
mfx.RateControlMethod = MFX_RATECONTROL_CQP
mfx.QPI = 25
mfx.QPP = 26
mfx.QPB = 31
mfx.FrameInfo.FourCC = MFX_FOURCC_NV12
mfx.FrameInfo.Width = depends on camera
mfx.FrameInfo.Height = depends on camera
mfx.FrameInfo.FrameRateExtN = depends onconfiguration
mfx.FrameInfo.FrameRateExtD = 1
mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE
mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420

IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY

Kind regards,
Vassili Yakovlev
0 Kudos
Anthony_P_Intel
Employee
887 Views
Hi Vassili,

It appears that this simply limitation on fps of our algorithm. I've suggested adding support for higher frame rates, however this is not currently a committed feature.

If I happen to discover any easy workarounds to support this usage model, I will update this thread.

-Tony
0 Kudos
Vassili_Yakovlev
Beginner
887 Views
It seems that the limit of 216.6 fps for software accelerated encoding process is not an issue anymore. May be was it solved and released with recent driver/Media SDK?
0 Kudos
SergeyKostrov
Valued Contributor II
887 Views
...
As adding to one of my old posts about framerate parameter during initialization ofEncoder in general, that it has limit of 172 fps, experimenting with different cameras...
...

What cameras did you use? Do you mean webcams or point-and-shoot cameras?

Best regards,
Sergey
0 Kudos
Vassili_Yakovlev
Beginner
887 Views
I'm using GigE Vision camera connect directly to the PC by network cable, this is the usual industrial standard. Each GigE camera has dedicated 1Gbit bandwidth to deliver or/and high frame rate or/and high resolution by connecting to the Matrox board (network adapter)or Intel network port with supporting jumbo packets. In this test case I'm using Dalsa Genie HM640 camera with resolution 640x480 in Monochrome and frame rate 301 fps.
0 Kudos
Nina_K_Intel
Employee
887 Views
Hi Vassili,

Has the limitation gone after you have updated the library to MSDK 2012 Gold? I will check out if there were related fixes.

-Nina
0 Kudos
Vassili_Yakovlev
Beginner
887 Views
No, I'm still using MSDK 2.0
0 Kudos
Nina_K_Intel
Employee
887 Views
Did you mean the HARDWARE accelerated encoder then? What is the driver version you are using?
-Nina
0 Kudos
Vassili_Yakovlev
Beginner
887 Views
It's impossible to initialize encoder with framerate parameter higher than 172 fps, both software and hardware accelerated. But it's possible to feed encoder with the raw images to encode with higher speed (framerate) even if it was initialized at 172 fps. But software accelerated encoder had unstable behaviour when it was feeded with frames at framerate 216 fps and higher, until recently. It seems that the software accelerated encoder does not havethis behaviour anymore. The driver installed on my PC has version 8.15.10.2559.

Vassili.
0 Kudos
Nina_K_Intel
Employee
887 Views
Hi Vassili,
Actually, the rate at wich data is fed into encoder doesn't have to be limited by set framerate. Framerate is rather used by encoder for bitrate control. And encoder is always able to control input data rate by returning MFX_WRN_DEVICE_BUSY when it's not ready to accept the next data portion.

Since you haven't changed the Media SDK software dll in you product (and driver change has no relation with sw dll) I can guess that some changes in your software may have caused the change. Could it be that it was an application problem and fixes for other issues helped solve this one as well?

Regards,
Nina
0 Kudos
Vassili_Yakovlev
Beginner
887 Views
Hi Nina,

It could be. I also thought that the bug fix has eliminate this issue.
Concerning 172 fps limitation during initialization, as you said the framerate used by encoder for bitrate control, so actuallyI dont have to worry about this issueI suppose.
0 Kudos
Reply