Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Oh_i_
Beginner
60 Views

Some rate controll issues

Hi, 

I'm tring to strictly control the encoder output bit rate and I cant find any option to do the following:

1. re-encode frame (p-frame) for better shorter/larger bitstream. if i just call the encoder the second time than he thinks it is the next frame and the diffs are wrong, stream-wise.... any idea?

2. I found a way to force I-frame in the stream, but I couldnt find any way to force p-frame, any idea?

Thanks

 

0 Kudos
3 Replies
Petter_L_Intel
Employee
60 Views

Hi Oh,

" 1. re-encode frame (p-frame) for better shorter/larger bitstream. if i just call the encoder the second time than he thinks it is the next frame and the diffs are wrong, stream-wise.... any idea?"

     Media SDK does not support re-encoding of frames.

" 2. I found a way to force I-frame in the stream, but I couldnt find any way to force p-frame, any idea?"

     In the default "display order" mode, only I-frames are enforceable.  If you need the ability to set P frames on demand you must use "encoded order" mode, in which you must specific the type for each frame.

Regards,
Petter 

Oh_i_
Beginner
60 Views

Hi,

Thanks for the quick replay.

I implement that "encoder order", but after the 3rd p-frame I got an error while syncing (SyncOperation) "devision by zero"....

Settings for I-Frame:

encCtrl.FrameType = MFX_FRAMETYPE_I|MFX_FRAMETYPE_REF;

Settings for P-Frame:

pData.FrameOrder = MFX_FRAME_ORDER_UNKNOWN;

encCtrl.FrameType = MFX_FRAMETYPE_P;

Thanks

Petter_L_Intel
Employee
60 Views

Hi Oh,

I quickly tested similar scenario setting first frame to I frame and the rest to P frames as you describe but I see no issues.

Can you please share more details about your encoder and system configuration(eg. gfx driver version Media SDK version, HW platform)?

Regards,
Petter

Reply