So if you’re like me and like to make your back-up’s via cli, wether it’s in windo$$ or linux, and want to hit a specific filesize for storage/quality issues, you do need to calculate the final bitrate for inputing on your *bat or *sh file.
Most peepz i know, use an external GUI app, mostly MeGUI. So in order to keep it real and use nothing else, i found out some handy tip on mplayer‘s documentation, back when i was wanting to know how to make backups on linux.
Calculating the bitrate
If you aim at a certain size, you will have to somehow calculate the bitrate. But before that, you need to know how much space you should reserve for the audio track(s), so you should rip those first. You can compute the bitrate with the following equation:
bitrate = (target_size_in_Mbytes – sound_size_in_Mbytes) * 1024 * 1024 / length_in_secs * 8 / 1000
For instance, to squeeze a two-hour movie onto a 702MB CD, with 60MB of audio track, the video bitrate will have to be: (702 – 60) * 1024 * 1024 / (120*60) * 8 / 1000 = 740kbps
If you have trouble to calculate with precision the time in seconds please follow this link: www.unitarium.com/time-calculator