Log in

View Full Version : video bitrate calculation for a target filesize


microchip8
14th November 2008, 15:04
Hi,

It seems that the formula I use in my scripts for calculating the video bitrate for a target filesize is incorrect. Currently I use the two following formulas, the first without and the second with audio

Without audio

TARGET_SIZE_IN_MB * 8192 / VIDEO_LENGTH_IN_SEC

With audio

( TARGET_SIZE_IN_MB * 8192 / VIDEO_LENGTH_IN_SEC ) - AUDIO_BITRATE_KBPS

Does anyone knows a formula which properly calculates the video bitrate for a target filesize? The formula must also include the AVI overhead

Thanks in advance

Rasi
15th November 2008, 01:28
Just to make this a bit clearer:

For some reason h264enc hits its desired framerate, when it encodes the audio itself. If one encodes the audio manually and substracts the audio size from the desired filesize, h264enc will not reach the filesize, instead it will be 20-30MB less.

So, is there some rule that makes calculating no-sound videos different? whats the secret formula? :)