It really depends on your upload speed.
bufsize
will determine how religious ffmpeg is about keeping your bitrate constant. If you set a bufsize
of 64k, as per FFmpeg Wiki: Limiting the output bitrate, it will calculate its current bitrate every 64 kilobytes and adjust accordingly. Smaller sizes for bufsize
can be harmful to quality in that they don't allow enough space between checks for x264 to do sudden changes - you will get blockiness.
If your maxrate
is 640kbps, and your bufsize
is 64k, then every tenth of a second x264 would check. This is sub-optimal - FFmpeg Wiki: Encoding for streaming sites recommends to run it every 1 to 2 seconds. If this didn't make sense, think of it as maxrate
/bufsize
= frequency of checks. Keep this frequency between 1 and 2 seconds as a rule of thumb.
If you set both maxrate
and bufsize
, you should:
- set
maxrate
to whatever your lowest upload speed will likely be (in the ffmpeg wiki example, this is 80% of total upload speed, but your mileage may vary).
- set
bufsize
to somewhere between the same as your maxrate
(one second) and twice of your maxrate
(2 seconds). If this is still not low enough, lower your maxrate
and then re-set bufsize
accordingly.
Then, you'll have to play around a bit, but since you have to start somewhere I'd just start at a maxrate
around 600k, which was usually satisfying enough for me back before I used crf
for everything.
If you'd like, you can try lower values for bufsize
, like for every three or four seconds, just to see how the value changes how your output looks. Then you can determine how much you should worry about it for your video.
There is no normal value, really - what crf
does is to optimize output based on what it thinks is the best buffer size for maintaining whatever it's rate is set at. It tries to keep as low a file size while maintaining some quality, at the cost of occasional spikes.
Video encoding is an art, and there are hundreds of parameters to master. Notice that two-pass encoding will offer (much) better quality and compression in most scenarios than playing with bitrates. Ussually the final size and video bitrate depends mainly on the video output size. ffmpeg is ussually smart enough to choose maxrate and bitrate if you tell it to keep the same video quality. Notice also that creating a 480px width video is good enough in most scenarios, and that will save much more bandwidth that playing with bitrates. – earizon – 2015-07-28T15:14:44.817
1@earizon I agree, video encoding is an art and 480 is usually good enough. However, I also like having higher resolutions available because I don't use a CRT at 640x480 anymore. It is definitely a better way to reduce sizes than fiddling with bitrates, but again, I like options. – Wyatt8740 – 2015-08-09T03:45:05.303