Revision 81d0618f

View differences:

doc/ffmpeg-doc.texi
275 275
@item -minrate bitrate
276 276
Set min video bitrate tolerance (in bit/s).
277 277
@item -bufsize size
278
Set rate control buffer size (in kbit).
278
Set rate control buffer size (in bits).
279 279
@item -vcodec codec
280 280
Force video codec to @var{codec}. Use the @code{copy} special value to
281 281
tell that the raw codec data must be copied as is.
ffmpeg.c
123 123
#endif
124 124
static char *video_rc_override_string=NULL;
125 125
static char *video_rc_eq="tex^qComp";
126
static int video_rc_buffer_size=0;
127 126
static float video_rc_buffer_aggressivity=1.0;
128 127
static int me_method = ME_EPZS;
129 128
static int video_disable = 0;
......
2100 2099
    }
2101 2100
}
2102 2101

  
2103
static void opt_video_buffer_size(const char *arg)
2104
{
2105
    video_rc_buffer_size = atoi(arg) * 8*1024;
2106
}
2107

  
2108 2102
static void opt_video_rc_eq(char *arg)
2109 2103
{
2110 2104
    video_rc_eq = arg;
......
3013 3007
            if(p) p++;
3014 3008
        }
3015 3009
        video_enc->rc_override_count=i;
3016

  
3017
        video_enc->rc_buffer_size = video_rc_buffer_size;
3018
        video_enc->rc_initial_buffer_occupancy = video_rc_buffer_size*3/4;
3010
        video_enc->rc_initial_buffer_occupancy = video_enc->rc_buffer_size*3/4;
3019 3011
        video_enc->rc_buffer_aggressivity= video_rc_buffer_aggressivity;
3020 3012
        video_enc->me_threshold= me_threshold;
3021 3013
        video_enc->mb_threshold= mb_threshold;
......
3711 3703
        opt_default("b", "1150000");
3712 3704
        opt_default("maxrate", "1150000");
3713 3705
        opt_default("minrate", "1150000");
3714
        video_rc_buffer_size = 40*1024*8;
3706
        opt_default("bufsize", "327680"); // 40*1024*8;
3715 3707

  
3716 3708
        audio_bit_rate = 224000;
3717 3709
        audio_sample_rate = 44100;
......
3738 3730
        opt_default("b", "2040000");
3739 3731
        opt_default("maxrate", "2516000");
3740 3732
        opt_default("minrate", "0"); //1145000;
3741
        video_rc_buffer_size = 224*1024*8;
3733
        opt_default("bufsize", "1835008"); //224*1024*8;
3742 3734
        opt_default("flags", "+SCAN_OFFSET");
3743 3735

  
3744 3736

  
......
3760 3752
        opt_default("b", "6000000");
3761 3753
        opt_default("maxrate", "9000000");
3762 3754
        opt_default("minrate", "0"); //1500000;
3763
        video_rc_buffer_size = 224*1024*8;
3755
        opt_default("bufsize", "1835008"); //224*1024*8;
3764 3756

  
3765 3757
        mux_packet_size= 2048;  // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack.
3766 3758
        mux_rate = 10080000;    // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8
......
3928 3920
    { "qsquish", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_qsquish}, "how to keep quantiser between qmin and qmax (0 = clip, 1 = use differentiable function)", "squish" },
3929 3921
    { "rc_eq", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_eq}, "set rate control equation", "equation" },
3930 3922
    { "rc_override", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_video_rc_override_string}, "rate control override for specific intervals", "override" },
3931
    { "bufsize", HAS_ARG | OPT_VIDEO, {(void*)opt_video_buffer_size}, "set ratecontrol buffer size (in kByte)", "size" },
3932 3923
    { "vcodec", HAS_ARG | OPT_VIDEO, {(void*)opt_video_codec}, "force video codec ('copy' to copy stream)", "codec" },
3933 3924
    { "me", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_motion_estimation}, "set motion estimation method",
3934 3925
      "method" },

Also available in: Unified diff