Skip to content
  • Fiona Glaser's avatar
    Add ability to adjust ratecontrol parameters on the fly · 34c42187
    Fiona Glaser authored
    encoder_reconfig and x264_picture_t->param can now be used to change ratecontrol parameters.
    This is extraordinarily useful in certain streaming situations where the encoder needs to adapt the bitrate to network circumstances.
    
    What can be changed:
    1) CRF can be adjusted if in CRF mode.
    2) VBV maxrate and bufsize can be adjusted if in VBV mode.
    3) Bitrate can be adjusted if in CBR mode.
    However, x264 cannot switch between modes and cannot change bitrate in ABR mode.
    
    Also fix a bug where x264_picture_t->param reconfig method would not always be frame-exact.
    
    Commit sponsored by SayMama video calling.
    34c42187