PDA

View Full Version : 2pass filesize accuracy


toxicbyte
8th December 2007, 11:46
Currently i encode a favorite tv series of mine. Because i wanted a certain filesize for each episode i decide to go for a 2pass encode.
I try to hit 320mb (335544320 byte).. before i calculate the bitrate for the movie i always substract the audio size.. which is 56156627 byte and the playtime in seconds is 1754.638 .
Here is my formula i used for the final bitrate calculation:

bitrate = (((target_size - audio_size) / 1024) * 8) / playtime_in_sec

So in the above stated case its ~1244 but after the encoding the filesize was something about 313mb. At first i thought its an rounding issue.. i just calculate what bitrate would fix that 7mb gap and encoded it again with the new bitrate 1277 (1244 + 33 7mb gap) The result was fairly close to 320mb.. i know that 100% accuracy is impossible but 7mb at 320mb target is a bit too off target.

Now u could think this was a one-time issue but this magic 7mb gap occurs on all episodes. To proof that magic 7mb thing i encoded a movie and tried to locate the result at 320mb again.. so i did the calculations and added that 7mb thing and the result was the same.. fairly close to 320mb.

So here comes the question.. what the heck is that 7mb thing? Is this some sort of a magic constant.. or is it related to the target filesize?


I hope someone can clear up this behavior or fix my formula.



Thanks in advance.. oh.. and sorry for this english.. its not my native tongue :D

akupenguin
8th December 2007, 12:00
1000, not 1024.

toxicbyte
8th December 2007, 14:12
Oh my gosh.. what a bloomer :o
It's no longer an issue.

Thanks for the fast reply!