FORUMS: list search recent posts

# Calculating bit rate for encoding HD video for web

FAQ   •   VIEW ALL
 Calculating bit rate for encoding HD video for web on Jul 23, 2010 at 5:29:25 pm

If I have a 720p HD video, is there some formula I can use to get that file under 200 megs? I need to create a H.264 file but need to calculate the bit rate for encoding. How do I do so?

For instance, my first try in Compressor was H.264 at 1280x720 using Restrict to 7000 kbits/sec and optimized for Streaming with AAC audio. I got a file that was around 500 megs. I need to be under 200.

Isn't there something like kbits/sec divided by minutes and/or length of video, something like that to get the bit rate at which to encode.

Any encoding guru's out there?

OS 10.6.3, Mac Pro 2 x 2.66 ghz quad-core intel xenon, 16 gb ram, with BM Intensity Pro card

 Re: Calculating bit rate for encoding HD video for webon Jul 23, 2010 at 5:59:20 pm

I was just doing this very thing.

OK, it's kind of long but here goes. Basically, you have time and file size. In Compressor, file size is listed at kb/sec, so you will have to convert to that.

So you take the time in minutes and seconds, then make it pure seconds. So, if your timeline is 7 minutes and 32 seconds it would be (7*60)+32 = 452 seconds.

So then you take the final file size which is 200MB.

200MB/452seconds = .442 MB/sec

Then you have to convert MB/sec to kbits/sec. For this I use a handy iPhone app called iConvert (free). If you don't have an iDevice, use this:

http://www.matisse.net/bitcalc/

So using the app I find that .442 = 3621 Kb, therefore .442 MB/sec = 3621 kb/sec

No subtract your audio rate, so let's say you are suing 192/kbps audio

3621-192= 3429 kb/sec

Make sense?

Jeremy

 Re: Calculating bit rate for encoding HD video for webon Jul 23, 2010 at 6:12:09 pm

Ok, let me see if I got this. I'm at 17 min. 49 sec.

(17*60)+49=1069 sec.

200 MB/1069 sec.=.1871 Mb/s

.1871 Mb/s = 1533 Kb/s

1533-128 (audio) = 1405

So 1405 is my bit rate to limit too. Right? Thanks for the help. That calculater link was a bit confusing. I wasn't sure if I should use bits or bytes so I plugged in your ex. to check. Its Megabytes and kilobits. I think.

OS 10.6.3, Mac Pro 2 x 2.66 ghz quad-core intel xenon, 16 gb ram, with BM Intensity Pro card

 Re: Calculating bit rate for encoding HD video for webon Jul 23, 2010 at 6:16:30 pm

You get a gold star on your math test. Come get a cookie.

Yes, Megabytes, then use the kilobits result.

 Re: Calculating bit rate for encoding HD video for webon Jul 24, 2010 at 4:53:18 am

200 MB/1069 sec = 0.1871 MB/s

0.1871 MB/s = 1569 kb/s

1569 kb/s - 128 kb/s = 1441 kb/s

You used an incorrect MB/s to kb/s conversion which multiplied by 8192. One MB is 1024^2 Bytes. One kb is not 1024 bits, but exactly 1000 bits. (Conventions switch as you switch from the computer context to the data transmission context.) Therefore you must multiply MB/s by 8388.6 to find kb/s.

 Re: Calculating bit rate for encoding HD video for webon Jul 24, 2010 at 7:59:00 am

You can change the notation in the bit calc where 'kilo' = 1000.

Nice catch and sorry about that little omission.

Jeremy