Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

My understanding is that the vorbis algorithm uses a variable rate of encoding.

So, when encoding videos with audio in vorbis format, why does Handbrake ask me for a bitrate? What does Handbrake do when I choose a bitrate of 160, say, in the audio section?

share|improve this question
    
I posted this question in the Super User SE, but no one answered me: [link] superuser.com/questions/729591/…. –  ltcomdata Apr 26 at 20:31
    
I can't speak about vorbis, but in general "variable" rate doesn't mean "unlimited". In all cases I'm aware of, VR encoding uses a target bit rate which is the rate which, if averaged over the total length, would be equivalent to a fixed bit rate over the same duration. –  Jim Mack Apr 26 at 20:51
add comment

2 Answers 2

up vote 1 down vote accepted

You can see the bitrate in this case as a quality target. It will not encode the audio strictly at that bit-rate but try to encode the audio in a way that it will always be "near" your specified bit-rate.

Usually you can translate certain bit-rates to a specific quality level which can be compared to lames "V0", "V2" etc. VBR settings, these presets don't define a specific bit-rate but files encoded with these settings will always end up at certain "bit-rate range". The encoder will encode the audio around a specific bit-rate but will go higher or lower within a certain threshold.

It doesn't make all that much sense to have bit-rats present instead of the Vorbis quality targets but I assume handbrake does this because all other codecs it offers use bit-rates. Most users are used to bit-rates and can associate it to a rough quality level. Unlike Vorbis own "q5" or "q9" which you can only translate to a relative quality difference between the different levels (if you are not used to using this codec) but you wont know what you actually end up with.

Wikipedia has a nice table for Vorbis quality levels/settings: http://en.wikipedia.org/wiki/Vorbis#Technical_details (on the right)

Quality Nominal Bitrate Official Xiph.Org Foundation Vorbis aoTuV
beta 3 and later

  • -q-2 not available 32 kbit/s
  • -q-1 45 kbit/s 48 kbit/s
  • -q0 64 kbit/s
  • -q1 80 kbit/s
  • -q2 96 kbit/s
  • -q3 112 kbit/s
  • -q4 128 kbit/s
  • -q5 160 kbit/s
  • -q6 192 kbit/s
  • -q7 224 kbit/s
  • -q8 256 kbit/s
  • -q9 320 kbit/s
  • -q10 500 kbit/s
share|improve this answer
add comment

For CBR encodings, the bitrate is always kept at the bitrate specified regardless of if it is needed. For VBR encoding, the bitrate is an average target, however the media stream will use more or less data rate when it needs to but will try to average to the target.

This is why you see 1 pass and 2 pass VBR. 2 pass VBR first makes a pass to estimate where more or less data will be needed and then makes a second pass to make best use of the available data rate. 1 pass does a lot more guessing.

For an example of how this works, lets say we had a video that had 10 seconds of rapid action followed by 10 seconds of a still image.

With CBR, the same data rate would be used the entire time, the 10 seconds of still image would be crazy high quality since nothing is changing, but the action would then fall apart because it is changing too much.

With 1 pass VBR, the algorithm would adjust to use more data for the high level of action, but it might limit itself since the entire video might be like that. Then, when it got to the still shot, it would use almost nothing, but wouldn't hit the average rate because it didn't need the storage space.

With 2 pass VBR, the first pass would discover that there is no movement at the end, so then during the second pass, a lot of data rate would be used to handle the motion really well and then very little would be used for the still image, the average data rate would be hit and the high movement portion of the video would have the highest quality of any of the encodings while the still portion wouldn't really suffer.

share|improve this answer
add comment

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.