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.

bit rate parameters not affect the communication performance

Oh_i_
Beginner
623 Views

Hi,

I'm tring to control the bit rate and I tried to configure the following parameters:

while using ABVR: accuracy and convergence

and while using VBR: maxbitrate and initialdelayinkb

both doesnt affect the outcome... no matter what parameters I entered the only parameter that does it is the TargetBitKbps.

Thanks

0 Kudos
7 Replies
Petter_L_Intel
Employee
623 Views

Hi,

Please share all the encoder parameters you used. You can capture these by starting Media SDK tracer tool, starting logging the run your workload.

Regards,
Petter 

0 Kudos
Oh_i_
Beginner
623 Views

Hi,

Here are the parametrs I'm using:

CodecId = MFX_CODEC_AVC

TargetUsage = MFX_TARGETUSAGE_BALANCED

TargetKbps = 10000

RateControlMethod = MFX_RATECONTROL_VBR

if(RateControlMethod == MFX_RATECONTROL_VBR)

{

MAXKbps = 11000 // 10% deviation?

InitialDelayInKB = 10000 // Why is needed?

}

if(RateControlMethod == MFX_RATECONTROL_AVBR)

{

Accuracy = 10 // 10%?

Convergence = 10 // 1000 Frames?

}

FramRateExtN = 25

FramRateExtD = 1

FourCC = MFX_FOURCC_NV12

ChromaFromat = MFX_CHROMAFORMAT_YUV420

PicStruct = MFX_PICSTRUCT_PROGRESSIVE

Width = 192

Height = 1080

GopPicSize = 25

GopRefDist = 1

IdrInterval = 0

CodecProfile = MFX_PROFILE_AVC_MAIN

CodecLevel = 50

IOPattern = MFX_IOPATTERN_INSYSTEM_MEMORY

GopOptFlag = MFX_GOP_STRICT|MFX_GOP_CLOSED

Thanks,

0 Kudos
Petter_L_Intel
Employee
623 Views

Hi,

I see nothing wrong with this configuration except for a few small things:

- InitialDelayInKB : You do not have to set this value. Media sDK will select suitable value for you based on the otehr selected parameters. You can leave this parameter set to 0.

- Width = 192   .   I suspect you intended to set it to 1920?

I tested your encoder configuration on my side and I see resulting average bit rate very close to the selected value.

It could be that your input content is static or have close to no movement at all. In those case the encoder will attempt to reduce the amount of encoded bits significantly, thus not meeting the specific bit rate targets.

Regards,
Petter 

0 Kudos
Oh_i_
Beginner
623 Views

Hi,

First, thanks for your replays.

I think I didnt make myself clear. the problem wasn't the average bit rate but the bit rate picks and deviation, I want to strict them to a certain limit by using MaxKbps or Accuracy, if i just wanted to set bit rate I would use CBR as my rate control method...

Example:

ABVR:

While setting accuracy to 10 (is it 10%, because on manual it says somthing about tenth percent?) and convergence to 10, I expect to see max bit rate value of 11000Kbps after 1000 frames - and I don't.

Same for the other option (VBR):

While setting the MaxKbps to 11000, I expect to see no pick above that after a while, and no.

The scene is a regular scene, not too static and not too jumpy, HD camera...

By the way (I), what's more important, communication wise, the maximal bit rate values or the average (median?)?

By the way (II), I noticed that if I freeze the scene, meaning, repeat the same frame for a while, the encoder goes crazy after a while, and it takes few GOPs to recover and put back a good image, do you know any thing about it? (maybe I should open a new thread for that issue?)

Thanks

0 Kudos
Petter_L_Intel
Employee
623 Views

Hi,

The bitrate control parameters does not impose as strict control on per frame bit rate as may desired.

AVBR Accuracy parameter is specified in units or 1/10% so if you want 10% deviation the you should set the value to 100.  Convergent is specific in units of 100 so to set 1000 convergence window please set the value to 10.

Note that even if the range is specified (should be thought of as an average over the specified convergence window) there is no guarantee that individual frames size has to stay within the window. I frame or large motion may result in spikes and thus also requiring following frames to reduce it's average size to stay within the budgeted # of bits.

There are some features of the SDK to help reduce the frame size variance, such as mfxExtCodingOption2::MaxFrameSize and IntRefType (Intra-refresh aka. rolling I-frame).

We are not aware of any static scene issues. Please make sure you use a recent graphics driver.

Thanks,
Petter 

0 Kudos
Oh_i_
Beginner
623 Views

Hi,

Thanks for your replay, as I thought... 

can you please give some more details about maxFrameSize option?

Thanks

0 Kudos
Petter_L_Intel
Employee
623 Views

Hi Oh,

MaxFrameSize is described in the Media SDK reference manual.

Regards,
Petter 

0 Kudos
Reply