The importance of bitrate
-
- Joined: Tue Apr 12, 2005 4:20 pm
The importance of bitrate
I'm pretty new to making videos, and have no real education in video, so I've got a question.
This morning I was playing around with saving a video in Windows Movie Maker, where the saving options are arranged by bitrate and labelled by internet connection.
I saved my vid at 150Kbps and 1Mbps for comparison, but I couldn't really see much difference when I played the two versions. So my question is this: Why is bitrate important? Can someone direct me toward an explanation?
Thanks,
Doc
This morning I was playing around with saving a video in Windows Movie Maker, where the saving options are arranged by bitrate and labelled by internet connection.
I saved my vid at 150Kbps and 1Mbps for comparison, but I couldn't really see much difference when I played the two versions. So my question is this: Why is bitrate important? Can someone direct me toward an explanation?
Thanks,
Doc
- Kalium
- Sir Bugsalot
- Joined: Fri Oct 03, 2003 11:17 pm
- Location: Plymouth, Michigan
Here's the short version:
Bitrate is how many bits per segment of time that the video compression routine has to play with. A low bitrate means lowe quality. A high bitrate may mean higher quality, although you can't improve past the quality of the original through compression*.
*There are ways of cleaning footage to improve it, but that's outside the scope of this discussion. Read.
Bitrate is how many bits per segment of time that the video compression routine has to play with. A low bitrate means lowe quality. A high bitrate may mean higher quality, although you can't improve past the quality of the original through compression*.
*There are ways of cleaning footage to improve it, but that's outside the scope of this discussion. Read.
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact:
Re: The importance of bitrate
There is also an upper limit on the size that the file can become, that depends on a lot of things, from the advanced settings that the encoder lets you configure, to the resolution and complexity of the input file.jamon428 wrote: I saved my vid at 150Kbps and 1Mbps for comparison, but I couldn't really see much difference when I played the two versions. So my question is this: Why is bitrate important? Can someone direct me toward an explanation?
Thanks,
Doc
If you take a video clip that is just PURE black video, with absolutely nothing going on for like 3 minutes... It will probably compress to something like 100kb. No matter how high you set the bitrate, the filesize wont increase, because its already at the maximum level of quality that the encoder can produce.
When a file is at the maximum filesize (given the current encoding options and such) such that increasing the bitrate will not have any effect, this video is said to be saturated. Even a file that is saturated like this will be LOWER quality than the input video. This is the nature of lossy compression. However, the differences are usually minor enough that you want notice.
To really see this in effect, compress a video at the maximum bitrate, then RECOMPRESS the output about 20 more times. I guarantee you will see a difference from the original.
- Zero1
- Joined: Fri Jan 02, 2004 12:51 pm
- Location: Sheffield, United Kingdom
- Contact:
As Kalium correctly stated, "bitrate" is the amount of bits over a certain duration. The most common measurement is "kbps" which is short for kilobits per second. This is what modern codecs like XviD and x264 use. Another measurement "bps" which is bits per second. It's rarely used since you might regard it too small for a general unit of measure. The last measurement which is less common (in video encoding) than "kbps" but more common than "bps" is "kBps". kBps is short for Kilobytes per second (remember the other one is Kilobits). 8 bits make 1 byte, so if a bitrate is given in kbps, just divide by 8 to get the kBps. Kilobytes are most commonly used in the Windows/Linux and Mac operating systems, for instance the filesize of small JPG images, Kilobits are almost never used. The capitalisation of the letter is very important, in chatrooms and stuff though if people say they have a 128kbps MP3, it's assumed they mean kilobits anyway since that's the common unit of measure, and it's a feasible bitrate. 128kBps would be too large to create with MP3, even LAME's freeformat (allows a max of ~600kbps IIRC). On the other hand, someone might tell you that they have a 240kbps download speed. This is confusing. Internet connection speeds are usually measured the same way as video bitrates, in kilobits per second. Windows etc. reports your download speed in kilobytes per second, so in this instance it's hard to know if the person has 240kbps or 240kBps (since people don't always capitalise in chatrooms). If he means 240 kBps, then he has something like 1920kbps line speed, which is usually referred to as 2mbit.
It is very important not to confuse Kilobits (kb or kbps) with Kilobytes (kB or kBps). Kilobits only tend to be used in video and audio encoding (there are more examples I'm sure, but these are relevant). Kilobytes are used everywhere else when describing filesizes. I suppose you could say that bits are too small for practical usage, but in video the rate is low enough to still be practical. The extra accuracy is important when encoding to a filesize also.
Now lets take a common example. I know, a 128 kbps MP3.
128kbps = 16 kBps = 128,000bps*
*Note: this is decimal conversion where 1kb = 1000bits, as binary there is 1024bits in 1kb.
Now here's the spanner in the works.
As Kalium explained, higher bitrate allows for higher quality, but using bitrate as a measure of quality is extremely misleading. The first reason why is because videos can vary incredibly in complexity. Think of an action scene from an 80s/90s anime with plenty of film grain, some explosions and such, and now think of a recent low motion anime produced on computers where the frames are almost perfectly clean (save for MPEG-2 compression artifacts maybe). Noise, explosions and shaky frames do not encode well, it's to do with motion estimation you see. What modern codecs try to do is reuse parts of a previous frame for the next frame, if there is lots of changes this can't happen, so it has to code a new part of the image, which uses a lot more data than just telling the codec to move a texture somewhere via co-ordinates.
So explosions, flashes or stuff with a lot of changes doesn't compress well, perfectly still frames where only the characters mouth is moving compress very well since the codec only needs to code the changes to the mouth, the rest of the frame gets used from previous frames.
Now if you give both videos 1000kbps, the CG anime will look great since there aren't many changes to code, but the old action anime may look a lot worse since it has a lot of changes to code and only a limited amount of data it can use.
Let me give you a real example from some encodes I did at a constant quality setting. This ignores bitrate and just encodes them at the same quality, as a result the final bitrate is almost impossible to predict.
Gundam 0083 - Men of Destiny.mp4 (1m40s) 17.4 MB (18,275,016 bytes)
Dirty Pair Flash - Limitless Answer.mp4 (1m35s) 9.75 MB (10,225,917 bytes)
There is only 5 seconds difference in the running times (which in no way possible would explain the filesize difference, so ignore the running time difference), yet the difference in filesize is huge. Now remember that these are both encoded at the same quality setting. If I wanted to encode these at 1000kbps total, that would make them:
Gundam 0083 - Men of Destiny.mp4 (1m40s) 12.2 MB (12,800,000 bytes)
Dirty Pair Flash - Limitless Answer.mp4 (1m35s) 11.59 MB (12,160,000 bytes)
(The slight difference is caused due to it giving it the same datarate per second, so naturally a longer video will be larger. It is proportional)
Now compare those with the previous filesizes, the Dirty Pair Flash opening would actually be higher quality than I chose to encode it at, but the Gundam opening would have to throw out a lot of quality to get it down to the same filesize.
So what is a good measure of quality? Quantisation. In XviD you can set it to do a 1 pass set quantizer. This is a kind of "quality mode" (it's actually more complex than that, but for the purpose of this post, we will think of it as a quality setting). Try it yourself, encode two different videos at a set Quantizer of 2 and check out the difference in filesizes.
How about images? Do you use photoshop at all? Hey, you don't even need to use photoshop to know what I'm going to talk about next, just saving images is enough.
Think wallpapers now, usually they come in certain resolutions, lets say you go and find two 1024x768 wallpapers, as long as they are in JPG or PNG, they will most likely have different filesizes even though they could have been saved at the same quality (PNG is lossless, so there isn't a quality mode, but it still demonstrates how images vary in compressability). I use the same quality setting in photoshop for all my wallpapers (usually 1024x768 or 1600x1200) and the ones that are the same resolution can be anything from 150KB - 500KB. Now I could make them all the same filesize, but it means that I would have to lower the quality of the large images and increase the quality of the small images. It's silly really just to make them the same size.
Music is the same! Some music compresses better than others. You might have two 128kbps MP3, if they are different types of music but encoded the same one might sound worse than the other. Give encoding to a quality level a try if you can (I don't know if it's possible with WMV in WMM, possibly in Virtualdub via the VCM driver).
Now in response to your original post, without being unkind, if you can't see the difference between 150kbps and 1000kbps this means:
a) You have very bad eyes, or a blurry monitor
b) The video isn't very complex and it can obtain it's quality at a low bitrate
It's unlikely that the video looks good at 150kbps, most audio doesn't even sound good at that bitrate (I use 224kbps MP3).
Now lets talk about something else. Saturation!
So what is saturation? Hmm, well saturation is where the video codec has encoded something at it's highest quality and you are telling it to use a bitrate higher than it's highest quality used. It cannot go any higher quality wise, and therefore cannot use the bitrate you tell it to use. At such a very low bitrate though, this is almost impossible.
Let's say XviD's highest quality level is Q1 and that an encode you make turns out at 4000kbps at Q1. Now if you switch to bitrate mode and tell it to use 6000kbps it will come out undersized and not use 6000kbps, this is because it's using the highest quality it can and cannot go any higher to fill up the rest of the bitrate (Q1 is insane quality and insane filesize by the way, use Q2).
Now if you are using downloaded webclips that are low quality, low framerate and low resolution, you will reach saturation or near saturation very quickly, but as I said, it's unlikely to be the case at such a low bitrate.
WMV also has some tricks up it's sleeve. If you feed it a low bitrate, it will automatically drop the framerate so that the quality doesn't suffer as much, so while you may not be able to see the difference, it's likely that the framerate has been dropped.
I'd suggest spending some time reading the guides and try out encoding with Virtualdub and XviD. It might be a bit complicated at first if you've never done it, but getting great quality is worth it. Also look into some other editing software, I used WMM when I was starting out for my very first AMV's and it doesn't give you half the freedom that other software does. Some learning to do if you decide to switch, but if you have good ideas, surely it's worth the time learning so you can edit with frame accuracy and encode great looking audio and video?
It is very important not to confuse Kilobits (kb or kbps) with Kilobytes (kB or kBps). Kilobits only tend to be used in video and audio encoding (there are more examples I'm sure, but these are relevant). Kilobytes are used everywhere else when describing filesizes. I suppose you could say that bits are too small for practical usage, but in video the rate is low enough to still be practical. The extra accuracy is important when encoding to a filesize also.
Now lets take a common example. I know, a 128 kbps MP3.
128kbps = 16 kBps = 128,000bps*
*Note: this is decimal conversion where 1kb = 1000bits, as binary there is 1024bits in 1kb.
Now here's the spanner in the works.
As Kalium explained, higher bitrate allows for higher quality, but using bitrate as a measure of quality is extremely misleading. The first reason why is because videos can vary incredibly in complexity. Think of an action scene from an 80s/90s anime with plenty of film grain, some explosions and such, and now think of a recent low motion anime produced on computers where the frames are almost perfectly clean (save for MPEG-2 compression artifacts maybe). Noise, explosions and shaky frames do not encode well, it's to do with motion estimation you see. What modern codecs try to do is reuse parts of a previous frame for the next frame, if there is lots of changes this can't happen, so it has to code a new part of the image, which uses a lot more data than just telling the codec to move a texture somewhere via co-ordinates.
So explosions, flashes or stuff with a lot of changes doesn't compress well, perfectly still frames where only the characters mouth is moving compress very well since the codec only needs to code the changes to the mouth, the rest of the frame gets used from previous frames.
Now if you give both videos 1000kbps, the CG anime will look great since there aren't many changes to code, but the old action anime may look a lot worse since it has a lot of changes to code and only a limited amount of data it can use.
Let me give you a real example from some encodes I did at a constant quality setting. This ignores bitrate and just encodes them at the same quality, as a result the final bitrate is almost impossible to predict.
Gundam 0083 - Men of Destiny.mp4 (1m40s) 17.4 MB (18,275,016 bytes)
Dirty Pair Flash - Limitless Answer.mp4 (1m35s) 9.75 MB (10,225,917 bytes)
There is only 5 seconds difference in the running times (which in no way possible would explain the filesize difference, so ignore the running time difference), yet the difference in filesize is huge. Now remember that these are both encoded at the same quality setting. If I wanted to encode these at 1000kbps total, that would make them:
Gundam 0083 - Men of Destiny.mp4 (1m40s) 12.2 MB (12,800,000 bytes)
Dirty Pair Flash - Limitless Answer.mp4 (1m35s) 11.59 MB (12,160,000 bytes)
(The slight difference is caused due to it giving it the same datarate per second, so naturally a longer video will be larger. It is proportional)
Now compare those with the previous filesizes, the Dirty Pair Flash opening would actually be higher quality than I chose to encode it at, but the Gundam opening would have to throw out a lot of quality to get it down to the same filesize.
So what is a good measure of quality? Quantisation. In XviD you can set it to do a 1 pass set quantizer. This is a kind of "quality mode" (it's actually more complex than that, but for the purpose of this post, we will think of it as a quality setting). Try it yourself, encode two different videos at a set Quantizer of 2 and check out the difference in filesizes.
How about images? Do you use photoshop at all? Hey, you don't even need to use photoshop to know what I'm going to talk about next, just saving images is enough.
Think wallpapers now, usually they come in certain resolutions, lets say you go and find two 1024x768 wallpapers, as long as they are in JPG or PNG, they will most likely have different filesizes even though they could have been saved at the same quality (PNG is lossless, so there isn't a quality mode, but it still demonstrates how images vary in compressability). I use the same quality setting in photoshop for all my wallpapers (usually 1024x768 or 1600x1200) and the ones that are the same resolution can be anything from 150KB - 500KB. Now I could make them all the same filesize, but it means that I would have to lower the quality of the large images and increase the quality of the small images. It's silly really just to make them the same size.
Music is the same! Some music compresses better than others. You might have two 128kbps MP3, if they are different types of music but encoded the same one might sound worse than the other. Give encoding to a quality level a try if you can (I don't know if it's possible with WMV in WMM, possibly in Virtualdub via the VCM driver).
Now in response to your original post, without being unkind, if you can't see the difference between 150kbps and 1000kbps this means:
a) You have very bad eyes, or a blurry monitor
b) The video isn't very complex and it can obtain it's quality at a low bitrate
It's unlikely that the video looks good at 150kbps, most audio doesn't even sound good at that bitrate (I use 224kbps MP3).
Now lets talk about something else. Saturation!
So what is saturation? Hmm, well saturation is where the video codec has encoded something at it's highest quality and you are telling it to use a bitrate higher than it's highest quality used. It cannot go any higher quality wise, and therefore cannot use the bitrate you tell it to use. At such a very low bitrate though, this is almost impossible.
Let's say XviD's highest quality level is Q1 and that an encode you make turns out at 4000kbps at Q1. Now if you switch to bitrate mode and tell it to use 6000kbps it will come out undersized and not use 6000kbps, this is because it's using the highest quality it can and cannot go any higher to fill up the rest of the bitrate (Q1 is insane quality and insane filesize by the way, use Q2).
Now if you are using downloaded webclips that are low quality, low framerate and low resolution, you will reach saturation or near saturation very quickly, but as I said, it's unlikely to be the case at such a low bitrate.
WMV also has some tricks up it's sleeve. If you feed it a low bitrate, it will automatically drop the framerate so that the quality doesn't suffer as much, so while you may not be able to see the difference, it's likely that the framerate has been dropped.
I'd suggest spending some time reading the guides and try out encoding with Virtualdub and XviD. It might be a bit complicated at first if you've never done it, but getting great quality is worth it. Also look into some other editing software, I used WMM when I was starting out for my very first AMV's and it doesn't give you half the freedom that other software does. Some learning to do if you decide to switch, but if you have good ideas, surely it's worth the time learning so you can edit with frame accuracy and encode great looking audio and video?
7-zip // x264 (Sharktooth's builds) // XviD (Koepi's builds) // MP4box (celtic_druid's builds) // Firefox // CCCP
-
- Joined: Tue Apr 12, 2005 4:20 pm
My eyes are really bad, actually. ^_^ But now that I know what to look for (and made my viewer window a lot bigger), I do see the difference. Yikes.Z3r01 wrote:Now in response to your original post, without being unkind, if you can't see the difference between 150kbps and 1000kbps this means:
a) You have very bad eyes, or a blurry monitor
b) The video isn't very complex and it can obtain it's quality at a low bitrate
Trust me, I do plan on getting better software at some point. I just need money first... But in the meantime, I'm finding that WMM isn't too bad as long as you don't try to do anything fancy (like use video effects...)Z3r01 wrote:I'd suggest spending some time reading the guides and try out encoding with Virtualdub and XviD. It might be a bit complicated at first if you've never done it, but getting great quality is worth it. Also look into some other editing software, I used WMM when I was starting out for my very first AMV's and it doesn't give you half the freedom that other software does. Some learning to do if you decide to switch, but if you have good ideas, surely it's worth the time learning so you can edit with frame accuracy and encode great looking audio and video?
I use VirtualDub when I'm pulling clips out of the raw footage (as per VicBond007's DVD How-To Guide), but I don't see anything about using it for assembling clips on the How-To page... *READFAGs again* oh. nevermind...
wow, complicated. Guess I can start practicing when I get footage for my next vid.
Thanks, everyone. You've been very helpful.
Doc[/quote]
-
- Joined: Tue Apr 12, 2005 4:20 pm
Follow up
*working on wrapping my head around all this* So what happens when I use a variable bitrate setting? Would that imply that the video is being encoded to saturation throughout its length, in the most space-efficient manner possible? If this is the case, does a fixed bitrate encoding pad saturated frames with junk to fill out the set bitrate? (I ask this because a variable bitrate save came to 16.5MB, where my original 1.0Mbps save was 24.0MB. I can't even FIND a discussion of compression or saturation in the WMM help files...)
- Kalium
- Sir Bugsalot
- Joined: Fri Oct 03, 2003 11:17 pm
- Location: Plymouth, Michigan
Re: Follow up
Basically, variable bitrate uses as many bits as it needs (up to the set maximum). It generally offers better compression than constant bitrate, although you may pay a small price in quality.
- Scintilla
- (for EXTREME)
- Joined: Mon Mar 31, 2003 8:47 pm
- Status: Quo
- Location: New Jersey
- Contact:
Basically, variable bitrate encoding schemes try to assign different parts of the video different amounts of bits based on what the different parts need. Complex and higher-motion scenes will get more bits, while simple and static scenes will get fewer. There's usually some average bitrate that can be set in VBR encoding modes; generally speaking, a VBR encode will look/sound somewhat better than a CBR encode done at the VBR encode's average bitrate.
- Zarxrax
- Joined: Sun Apr 01, 2001 6:37 pm
- Contact: