File size prediction formula
Can I check a couple of things please?
1) The latest file prediction fomula, for use with the Sampler plugin and default parameters, is: PredictedSize = ((Framecount/TimeInMinutes)/24) * SampleSize * Factor 2) The previous file prediction fomula, for use with SelectRangeEvery 100 x 1-second samples, was: PredictedSize = ((Framecount/FrameRate)/100) * SampleSize * Factor Is that right? /girv |
Hi girv,
This is the current formula: MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size -kwag |
Hold on to your hats.
I think the "old" and "new" formula are just different forms of the same fundamental (and more intutive IMHO) formula. Dust of the algebra books, take a deep breath and follow me... DEFINITIONS: Sm: movie size Ss: sample size Tm: move time in seconds (= 60*MovieTimeInMinutes) Ts: sample time in seconds (100 for old method, Tm/60 for new) Ts: sample time in seconds FC: frame count FR: frame rate (frames per second) F: fudge factor (0.96-ish) OLD: Sm = ((FC/FR)/100) * Ss * F rewriting: Sm = (FC/(FR * 100)) * Ss * F now FC = Tm * FR and Ts = 100 so: Sm = ((Tm * FR)/(FR * Ts)) * Ss * F cancelling FR: Sm = (Tm/Ts) * Ss * F Lets call this equation (1) NEW: Sm = ((FC/(Tm/60))/24) * Ss * F rewriting: Sm = ((FC * (60/Tm)) / 24) * Ss * F and again: Sm = ((60*FC)/(24*Tm)) * Ss * F now FC = Tm * FR and lets say FR = 24, so: Sm = ((60 * Tm * FR) / (FR * Tm)) * Ss * F cancelling Tm and FR: Sm = 60 * Ss * F but Tm / Ts = 60 in this case so: Sm = (Tm / Ts) * Ss * F ...which is equation (1) again. Notes: 1. I know the "new" formula doesnt include the fudge factor, but in all my tests (using the new GOP of course ;) I still found I needed it just the same as with the "old" formula. Why was it dropped anyway? 2. I know its a bit of a leap of faith to say "FR=24" in step 4 of the "new" proof, but IMHO its more reasonable to say 24 is the framerate rather than the GOP length. Besides, it makes the proof work ;) 3. Could the fudge factor be due to extra I frames being inserted into the sample clip as the "scene" changes very rapidly (> once per second) compared to the movie, thereby artificially inflating the sample file size? Might be useful to switch off "detect scene change" when encoding the sample. Need to test that. What equation (1) says is: to get the predicted movie size you just scale up the sample file size by the ratio of the sample time to the movie time. So if you sample 1/60 of the movie (one second for every minute, just like Sampler does by default) you just multiply the sample file size by 60 to get the movie size. Seems a lot more intuitive to me. I've tested this formula on a variety of clips and the results are identical to the "old" and "new" ones, which would lead me to believe I'm right :) I'd appreciate it if the good folk of kvcd.net could do some independent testing :) Different framerates and GOP lengths would be important to test (see note 2 above) as would low and high action clips. Also cast your eye over the math above and check I've got it right in the first place! So what do you think? |
girv,
I think that the old and new formulas have to be different. The old formula was for 100 samples per movie and the new formula is for one sample per minute. As a side note, I think that if your movie is 24 frames per second then the formula is simply: Predicted MPEG size = 60 * MPEG sample file size -ten |
Girv,
If you are interested... I've created a small Microsoft Excell file that you can use for your file prediction. It is based on Kwags formula plus a little tweak here and there. You just typed in the variables and the formula are already built-in so you will have answers too on that page at the same time. But its kind of low tech but I think it is good. the last movie I did has a 0.02 percent efficiency... |
Quote:
yes,i am .....say more ! :) or post it! :wink: thanks. |
I dont know how... it wont accept attachments....
email will do... any suggestions? |
Quote:
please send it! :D |
On Kwags formula, you are looking for SM which is movie size.
What if you already know the movie size. So we are going to jumble the formula and instead look for SS which is sample size. I also need to add that I just used Kwags formula to know the SS... PredictedSize = ((Framecount/FrameRate)/100) * SampleSize * Factor I must admit KWAG that the 0.95 factor is accurate enough to make a 0.02 percent difference on two movies I've made... Spiderman and Jimmy Neutron... Ex: Spiderman Predicted Size = 651,801 Actual Size =651,699 pretty close huh... But, of course this might not work on other movies... |
Quote:
That's with the old formula. It's not used anymore since we changed the GOP to 1-12-2-1-24. The new formula is Predicted MPEG size = (( Total frames/MovieTimeInMinutes) / 24 ) * MPEG sample file size You don't need offset factor with the new formula, because it's much more accurate. Specially with CQ. I recall problems with the old formula and CQ mode. -kwag |
Ok, I am using this...
KVCD-CQ-352x240-_NTSCFilm_-PLUS__120MIN.mcf GOP = 1-5-2-1-24 am i going to change the GOP as per your instruction? I will give it a try... So I just need to make my factor = 1 so I dont have to rewrite my small excel file formula :lol: :lol: :lol: Thanks |
Jorel,
did you received the file? |
Quote:
read this: don't thank me yet... It might not work for you... but I am crossing my fingers... :D thank you!! :yippie: |
@ARnet_tenRA:
Quote:
Quote:
@katchupoy: Quote:
|
Quote:
|
Quote:
If frames/second: 23.976 Then formula: Predicted Size = 59.94 * sample size If frames/second: 25 Then formula: Predicted Size = 62.5 * sample size If frames/second: 29.97 Then formula: Predicted Size = 74.925 * sample size These calculations are true as long as you sample 24 frames for every minute of your video (this matches the current GOP length). If you sample 1 second for every minute of your video (ie. 25 samples for 25fps or 30 samples for 29.97fps) then the formula for all framerates would be: Predicted Size = 60 * sample size -ARnet_tenRA |
Quote:
And as we are always sampling 24 frames per minute, the simplified formula would be Predicted Size = 60 * sample size as you just wrote it above. That means that all the bull of frames / minutes / 24 is over :mrgreen: Just 800 - audio size / 60 will give you predicted sample size :mrgreen: THANKS :!: :D -kwag |
Quote:
|
SansGrip is right. The simplest formula is only correct when the number of frames samples per minute equals the frame rate.
What I do is always sample one second per minute of video. This makes the formula so much easier. Also, Predicted = (800 - audio size) / 60 You have to remember the parenthesis when subtracting. :D -tenra |
Quote:
-kwag |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.