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.

Questions on h264_enc_filter

lonely_hearts_club
148 Views

I met some problems when I was trying to modify the h264_enc_filter sample code to costomize to my own need. And I have the following questions:

1.What is the idea of CBR? Does that mean the bitrate remains a constant value? But according to my knowledge, the bitrate of a h264 video stream is changing all the time. The bitrate tends to be smaller when the camera remains static and bigger when shaky.So how to understand CBR?




2.I have removed the "CodecPreset::VParamsFromPreset()" call located at the end of the function "CopyEncoderToMFXParams" in "mfx_video_enc_filter_utils.cpp". And set

m_EncoderParams.level_idc = Params::LL_1
m_EncoderParams.profile_idc = Params::PF_H264_BASELINE;
m_EncoderParams.pc_control = Params::PC_FRAME;
m_EncoderParams.ps_control.GopPicSize = 64;
m_EncoderParams.ps_control.GopRefDist = 1;
m_EncoderParams.ps_control.NumSlice = 0;
m_EncoderParams.rc_control.rc_method = IConfigureVideoEncoder::Params::RCControl::RC_CBR;
m_EncoderParams.rc_control.bitrate = 0;
m_EncoderParams.frame_control.width = 0;
m_EncoderParams.frame_control.height = 0;
m_EncoderParams.target_usage = MFX_TARGETUSAGE_UNKNOWN;

But every time as the directshow graph "webcam(720p)-->h264enc-->h264dec-->renderer" runs, the value of profile_idc turns back to LL_32. Why? Any limitation on the level_idc setting?


I'm grateful for your help!

0 Kudos
1 Solution
Petter_L_Intel
Employee
148 Views
Hi,

1. Yes, CBR means constant bit rate.

2. Media SDK modifies the codec level value to fit the specified encoder workload. For instance, if the vertical resolution is ~ 480 then the encoder will likely select level 3.x. Level 1 is usually for resolution =< 144 (vertical).

Regards,
Petter

View solution in original post

2 Replies
Petter_L_Intel
Employee
149 Views
Hi,

1. Yes, CBR means constant bit rate.

2. Media SDK modifies the codec level value to fit the specified encoder workload. For instance, if the vertical resolution is ~ 480 then the encoder will likely select level 3.x. Level 1 is usually for resolution =< 144 (vertical).

Regards,
Petter
lonely_hearts_club
148 Views
Thank you,Petter.
Reply