# Off-Topic Discussion > The Lounge > Tech Talk >  >  Bit rate formula

## ninja9578

Quicktime Pro doesn't have a way to specify a file size, just the bit rate.  I want my movies to come out to 700MB so that they will fit onto a CD.  In h.264 encoding, how do I calculate the bit rate to do that?

----------


## Ynot

Filesize in Mb = (((Video bitrate in kbps + Audio bitrate in kbps) X (Runtime in secs)) X 1000) / 8 / 1024 /1024

and add about 5&#37; overhead

but chances are you're using variable bitrates on both the audio & video
so this isn't going to be very accurate

to be accurate, you'll need to do what's called a "2-pass encode"
Is this an option in quicktime pro?


*edit*
tutorial straight from apple
step 6h seems to suggest 2 pass encoding is possible
http://www.apple.com/quicktime/tutorials/h264.html

----------


## ninja9578

Thank you very much.

I always use two pass encoding, it's much higher quality.  So slow though, I wish I had a H.264 hardware encoder :-(  Oh well.

----------


## Ynot

> I always use two pass encoding, it's much higher quality.



ysou should be able to encode video to a predetermined size, in that case (that's one of the advantages of 2 passes)

----------


## ninja9578

I can't figure out how to do that, I don't think it's a feature of Quicktime.  

I got another question:  When Quicktime does the Export, is the .mov the same as a .mp4?  Apple TV won't play a .mov, even if it's H.264 encoding.  Can I just change the extension?

----------


## Ynot

bear in mind that I'm not an Apple guy (haven't used a Mac since System 7)
but .mov (MooV) is Apple's own proprietary container format for mpeg 2 & 4, and is quite old
AFAIK, mov doesn't support mpeg4 part 10 (ie. mov does not support the newer AVC video codecs including H.264)

.mp4 is an international standard container for all mpeg4 formats,  (including part 10) and is heavily based off of apple's mov file format

where you can, use mp4, as it's newer, is an ISO standard, and is properly supported cross-platform

you may be able to just change the extension, try it
but chances are there's an option somewhere in QT to make mp4 the default container

----------


## ninja9578

Okay, I've done some research on the current quicktime encoding.  It's still just a package of random types of media strung together, which is why Apple TV won't play them.  One .mov file can have lots of different types of encodings in it and even different dimensioned files.

MOV is old, but it's constantly evolving.  Apple is the one always pushing new and better technology and H.264 is the default encoding for MOV files in QT Pro.  H.264 is actually newer than MP4 (not sure where your info came from) and is a better compression scheme.  MP4 is an export option, but not the default.  Most H.264 encoded movies (from DVD rips) have a MP4 extension and when I saw the H.264 encoding in quicktime I thought that it would do the same, it's not.  It's an mp4 inside of a mov package.

----------


## Stalker

Comparing H.264 with MP4 is like comparing AVI with XviD: It doesn't make any sense. H.264 is a video coding scheme, MP4 is what MPEG-4 Part 14 container format is called. Anyways, just make a two-pass encode with the average bitrate set according to the previous formulae, and you'll get files in the size you want.

----------

