Hi jorel,
Here's the manual way to do it. Say you want to put your movie on one CD. First thing you do is find out the size of your audio. That's very easy with HeadAC3he. Just run HeadAC3he and select your demuxed AC3 or WAV file. Select .mp2 as output and the bit rate you want. I usually select either 112Kbps ot 128Kbps, depending on the movie. You'll see the audio size automatically in HeadAC3he. Suppose the audio is 100MB. Just subtract 800 - 100 = 700. The ~800MB is your VCD capacity. So you have 700MB for your video stream, and this is your predicted target file size. Now apply the formula like this:
Predicted MPEG size = (( Total frames/MovieTimeInMinutes)/24) * MPEG sample file size
So say your file has 198673 frames and is 138 minutes long. You would do 198673 / 138 / 24 = 59.98 and then 700MB ( which is your predicted video stream size ) / 59.98 = 11.67MB and that's what your sample size has to be
. 11.67MB. Now you encode with SansGrip "Sampler()" line at the end of your .avs, and when the encoder finishes, take a look at the sample size. This is what I do to zero in faster on the correct CQ value:
New_CQ_Value = WantedSize(11.67 in this case) / Encoded_Sample_Size * Current_CQ_Value
So say my sample came out to 10.0MB and I was encoding with a CQ value of 25. My new CQ value for the next run is: 11.67 / 10 * 25 =
29.175 So I change the CQ value in TMPEG to 29.175 and encode again. It usually takes 2 to 3 samples to hit your target this way.
Hope this helps
-kwag