Friday, December 12, 2008

How the Heck Do I Find the Bitrate of My Video?

Note: this entry deals with double checking the bitrate after you're done with your video, not finding an optimal bitrate that works best for it.

If you're aiming for YouTube's "watch in high quality" or "watch in HD" option, you'll need to make sure the bitrate of your video is 1000kbps or higher. "What?" you say. "How the heck do I know that?"

Many video editors let you set the bitrate of your video. But beware - when you set the bitrate, you are setting the maximum bitrate - the actual bitrate could end up being lower! And what if you have an ultra-user-friendly program like Windows Movie Maker - which usually hides the bitrate from you? Fear not. I shall impart some of my nerdy wisdom to thee. And as a bonus: I'll show you how to get the screen size and framerate while you're at it.

The easy way is to use MediaInfo. Once it's installed, you can right click on a video file, then click MediaInfo - and voila! There are the specs for which you are looking. Configure it to text view for easily copy & pasteable gory technical details. If you're interested mainly in the video bitrate, be sure to read the line for "Bit rate" under the video section (not under the General section, which includes the audio bitrate!).

Also notice that the "Bit rate" reading often differs from "Nominal bit rate" - and it's usually lower. Believe the "Bit rate" line. Then you can avoid setting the bitrate at 1000kbps in your program, then foolishly walking away and assuming the bitrate of the actual file really ended up being 1000kbps. I mention this because in videos with not a lot of motion (like screen capture, 2D video games, or still image videos), compression is so easy the bitrate may end up being much lower than you set it - and you'll never know unless you check. Sorry to be so technical here, but I often get questions from people asking why their video didn't get the high quality, or HD link on YouTube because of this very issue. But while I'm being technical...

Get file size in bytesWhat if you can't get MediaInfo working (on a Mac, for example)? It's still possible to get the bitrate by math. You need to right click (or command click as the case may be) on the file and click on properties. Then you need the file size in bytes, and the length of the video in seconds. My Mac is outdated, so I just grabbed some images from my PC. Hopefully you should see something similar. There's a slight difference between size on disk and actual size. It's not really a big deal which one you use. Use the bigger one if you're paranoid though. Next, jot down the audio bitrate. You'll need to subtract it later.
Jot down the audio bitrate. In Windows, you can get it under the advanced view (or just remember what you set it at when you encoded). Incidentally, this is where you can also find the resolution and (approximate) framerate of the video. Also jot down the length of the video in seconds. Now you need to use my brilliant equation. Okay, someone else has surely devised the same thing, but let's humor me and call it Truesdale's equation:Truesdale's equation.
Notice the parenthesis at the bottom of the fraction. For those of you who aren't currently familiar with high school algebra (can't imagine why), I put the parenthesis there to remind you to perform that part first. Or else use this semantically sloppier but more understandable equation: [File size in bytes] / 128 / [Length in seconds] - [Audio bitrate] = [The video's bitrate].

And there you have it. Your bitrate in kbps. Wasn't that fun?


runbeast said...

Hey Derek its me from youtube ( I'm Cyber Beast Productions) I love your stuff

- you should put more ads on ur blog for teh moneyz!

Tyler said...
This comment has been removed by the author.
Captain Jack said...

On the mac can you just open the video in Quicktime to see the bit rate without doing the math?

Thanks for the info. I just forward you site to my friend that was having trouble. We both have macs for our video editing. Windows was just too confusing and kept crashing on us.

pasofinocam366 said...

I have been having trouble with the bitrate while using slingbox.It flucuates from 50 to 250,to 450,in a matter of 15 seconds.What controls this,and what causes it? the slingbox? the uploading of it? ,your computer > or the downloading ofit ? just trying to buy something to correct it,or solve the picture from freezing,skipping etc. thanks Dave

Anonymous said...

I need to check the bit rate in mobile device specifically iPhone or iPad. How can I check on those devices?

Anonymous said...

Very helpful, thanks!