[x264-devel] Degrading video quality over time

Jason Garrett-Glaser darkshikari at gmail.com
Mon May 31 19:09:21 CEST 2010


>   context.b_sliced_threads    = 1;

This makes no sense; you're not using threads.

>  // TSTO
>  context.rc.i_qp_min = H264_MIN_QUANT;
>  context.rc.i_qp_max =  (int)((51 - H264_MIN_QUANT) / 31 * tsto + H264_MIN_QUANT);
>  context.rc.i_qp_step = 4;

Don't touch these options.

>  context.i_keyint_max = 30 * 120;
>  context.i_keyint_min = 2;

Keyframes are inherently incompatible with low latency video.  If you
can, use intra refresh instead.

>  // Rate control set to CBR mode
>  context.rc.i_rc_method        = X264_RC_ABR;
>  context.rc.i_qp_min              = 25;
>  context.rc.i_qp_max              = 51;

Don't mess with qpmin/qpmax.

>  context.rc.f_rate_tolerance   = 1;
>  context.rc.i_vbv_max_bitrate  = 0;
>  context.rc.i_vbv_buffer_size  = 0;
>  context.rc.i_lookahead        = 0;
>  context.rc.i_bitrate = 768;

That's not CBR mode, that's ABR mode!  To set CBR, you need to set
bufsize and maxrate.  *THAT* is why you're not getting the results you
expect.

>  // Analysis support
>  _context.analyse.intra                = 3;
>  _context.analyse.inter                = 0;
>  _context.analyse.b_transform_8x8      = 0;
>  _context.analyse.i_weighted_pred  = 0;
>  _context.analyse.i_direct_mv_pred = 1;
>  _context.analyse.i_me_method      = 0;
>  _context.analyse.i_me_range       = 16;
>  _context.analyse.i_subpel_refine  = 1;
>  _context.analyse.i_trellis        = 0;
>  _context.analyse.b_psnr           = 0;
>  _context.analyse.b_fast_pskip     = 1;
>  _context.analyse.b_dct_decimate   = 1;
>  _context.analyse.i_noise_reduction= 0;
>  _context.analyse.b_ssim           = 0;

You may find it much easier to use x264_param_default_preset() to get
the speed-related settings you want.  This makes it much easier to
tweak to improve quality or speed.

Dark Shikari


More information about the x264-devel mailing list