Questions on h264_enc_filter

Questions on h264_enc_filter

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!

publicaciones de 3 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Best Reply


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).


Thank you,Petter.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya