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.

Some rate controll issues

Oh_i_
Beginner
637 Views

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
637 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 

0 Kudos
Oh_i_
Beginner
637 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

0 Kudos
Petter_L_Intel
Employee
637 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

0 Kudos
Reply