[x264-devel] Right settings for CBR in voip encoding?

Alexander Sbitnev alexander.sbitnev at gmail.com
Fri Aug 19 12:50:54 CEST 2011


  Hi there! 
  I am looking for a way to achieve zero-latency CBR encoding with "max per
frame" cap inside opal lib. 
My current setup is:
  x264_param_default_preset(&m_context, "veryfast",
"fastdecode,zerolatency");
  m_context.b_annexb = false; 
  m_context.rc.i_rc_method = X264_RC_ABR;

  m_context.rc.f_rate_tolerance = 1;           
  m_context.vui.i_sar_width = 0;

  m_context.vui.i_sar_height = 0;

  m_context.i_fps_num = (int)(fps * 1000 + .5);

  m_context.i_fps_den = 1000;

  m_context.rc.i_vbv_max_bitrate = m_context.rc.i_bitrate = rate;

  m_context.rc.i_vbv_buffer_size = rate/fps;

  m_context.b_intra_refresh = 1;

  m_context.i_slice_max_size = 1400;  

  m_context.b_cabac = 0;

  m_context.i_bframe = 0;

  m_context.analyse.i_mv_range = 128; 

  x264_param_apply_profile(&m_context, "baseline");

Resulting bitrate is highly volatile and looks not related at all to bitrate
setting. 
Bitrate keeps fluctuating around some value, no reaction if I supply much
higher or much lower values for bitrate settings.

 




More information about the x264-devel mailing list