Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For rendering, the time it takes is very different.

  • -b 3500K -minrate 0K -maxrate 8000K takes 1hr 17min
  • vb=3000k takes 2.5 hours

What is vb 3000k and how is it different from -b 3500K -minrate 0K -maxrate 8000K? Are these variable bit rate settings?

If I changed to -b 3500K -minrate 3500K -maxrate 3500K, is that constant bit rate?

share|improve this question

1 Answer 1

Please read the documentation for FFmpeg, and run ffmpeg -h full for the list of options.

Generally, here's what the options mean:

  • -b:v (or -vb, the same) specifies a constant bit rate for the encoder to use:

    -b <int> E..VA. set bitrate (in bits/s) (from 0 to INT_MAX)

  • -minrate specifies a minimum tolerance to be used:

    -minrate <int> E..VA. Set minimum bitrate tolerance (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise. (from INT_MIN to INT_MAX)

  • -maxrate specifies a maximum tolerance. However, as the documentation indicates, this is only used in conjunction with bufsize:

    -maxrate <int> E..VA. Set maximum bitrate tolerance (in bits/s). Requires bufsize to be set. (from INT_MIN to INT_MAX)

    -bufsize <int> E..VA. set ratecontrol buffer size (in bits) (from INT_MIN to INT_MAX)

    This only makes sense for variable bit rate encoding, e.g. VBV encoding in x264, where instead of using a constant bit rate or constant quality model, the encoder simulates a transmission with a virtual buffer at the decoder. You typically only use this for streaming, since the technique will constrain the bit rate in order to not exceed a certain value which would cause the decoder buffer to underflow.

To summarize:

  • To set up a CBR process, use -b:v 3500K -minrate 3500K, or leave out the minrate altogether—in practice I've never used it.

  • To set up a constrained bit rate process for streaming, use -maxrate 3500K -bufsize 1000K, for example. You'll have to adjust the rate and buffer sizes to the context obviously.

share|improve this answer
    
How would it encode using a variable bit rate? as in the syntax to use? –  Scott Downey Jan 14 '13 at 14:12
    
What encoder do you want to use? –  slhck Jan 14 '13 at 14:12
    
ffmpeg, I beleive that is used in kdenlive –  Scott Downey Jan 14 '13 at 14:14
    
No, I meant as in: x264 for H.264/MPEG-4 AVC video or XviD for MPEG-4, or Ogg Theora, etc. simply put, what file do you want? MP4? –  slhck Jan 14 '13 at 14:17
    
x264 mp4. The current string in kdenlive is this f=mp4 hq=1 acodec=aac ab=%audiobitrate+'k' ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 -b 3500K -minrate 0K -maxrate 12000K g=250 bf=3 b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=%dar pass=%passes movflags=faststart –  Scott Downey Jan 14 '13 at 14:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.