Quantcast Target Filesize is Always Greater than Predicted? - digitalFAQ.com Forums [Archives]
  #1  
02-14-2003, 08:37 PM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
If i calculate a cq with frames/minutes/10*filesize = target filesize e.g. the target Filesize is always greater then predicted. How does the calculation work with a tighter GOP?

Here is my AVS Script:
Code:
LoadPlugin("C:\AVSFilter\Plugins\MPEG2DEC.dll")
LoadPlugin("C:\AVSFilter\Plugins\legalclip.dll")
LoadPlugin("C:\AVSFilter\Plugins\MSharpen.dll")
LoadPlugin("C:\AVSFilter\Plugins\Convolution3D.dll")
LoadPlugin("C:\AVSFilter\Plugins\fluxsmooth.dll")
LoadPlugin("C:\AVSFilter\Plugins\sampler.dll")

AviSource("C:\Anime\GTO1.Avi")
LegalClip()
BilinearResize(336,272,3,0,506,384)
MSharpen()
FluxSmooth(15,10)
AddBorders(8,8,8,8)
LegalClip()
Sampler(length=10)
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
02-14-2003, 09:17 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not positive about this but I think you need to change the prediction formula to Predicted MPEG size = (( Total frames/MovieTimeInMinutes) / 10 ) * MPEG sample file size Someone please correct me if I'm wrong
Reply With Quote
  #3  
02-14-2003, 09:19 PM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rendalunit
I'm not positive about this but I think you need to change the prediction formula to Predicted MPEG size = (( Total frames/MovieTimeInMinutes) / 10 ) * MPEG sample file size Someone please correct me if I'm wrong
This is what i am doing without getting usable results
Plz suggest anything! and i will try it
Reply With Quote
  #4  
02-14-2003, 09:29 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
is Detect scene change unchecked in Tmpg?
Reply With Quote
  #5  
02-14-2003, 09:34 PM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
yes... unchecked.
Reply With Quote
  #6  
02-14-2003, 09:47 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
that's really weird Have you tried sampler(length=24)?
Reply With Quote
  #7  
02-14-2003, 09:51 PM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rendalunit
that's really weird Have you tried sampler(length=24)?
yes... with length=24 and GOP(max)=24 i get the predicted filesize but not with gop=10 (or 12 or 15)
What.... can... i.... do.........????? hm....
Reply With Quote
  #8  
02-14-2003, 10:04 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by alfredini
If i calculate a cq with frames/minutes/10*filesize = target filesize e.g. the target Filesize is always greater then predicted. How does the calculation work with a tighter GOP?
The tighter the GOP, the less the compression, and the more samples must be taken. 10 is just not enough frames for an accurate calculation unless you take many more samples. Try taking 250 samples of 10 frames.

-kwag
Reply With Quote
  #9  
02-14-2003, 10:29 PM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
The tighter the GOP, the less the compression, and the more samples must be taken. 10 is just not enough frames for an accurate calculation unless you take many more samples. Try taking 250 samples of 10 frames.

-kwag
You mean something like:
Code:
IL = Framecount / 250
SL = 10 
SelectRangeEvery(IL,SL)
??????
How would be the prediction formula then?
Reply With Quote
  #10  
02-15-2003, 01:01 AM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
i think you could do that like this: sampler(samples=250, length=10)

then the formula would be (FrameCount*SampleSize) / (NumberOfSamples*SampleLength) = PredictedFileSize
Reply With Quote
  #11  
02-15-2003, 01:34 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rendalunit
i think you could do that like this: sampler(samples=250, length=10)

then the formula would be (FrameCount*SampleSize) / (NumberOfSamples*SampleLength) = PredictedFileSize
really good rendalunit,i will try it !
Reply With Quote
  #12  
02-15-2003, 08:58 AM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks rendalunit i'm going to try it
Reply With Quote
  #13  
02-15-2003, 10:06 AM
alfredini alfredini is offline
Free Member
 
Join Date: Dec 2002
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
it works it works yoohoo... thanks again kwag and rendalunit
Reply With Quote
  #14  
02-15-2003, 10:43 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by alfredini
it works it works yoohoo... thanks again kwag and rendalunit
yes,yes.......(i'm without words)...it's really

thank you !!!!!!!
Reply With Quote
  #15  
02-15-2003, 01:58 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rendalunit
i think you could do that like this: sampler(samples=250, length=10)

then the formula would be (FrameCount*SampleSize) / (NumberOfSamples*SampleLength) = PredictedFileSize
hey rendalunit,
i lost something...

can you post a "sample script" with "numbers" please?
and deserve

thanks in advance friend!!!
Reply With Quote
  #16  
02-15-2003, 02:32 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
sure, jorel
I'm doing "signs" now with this script
Code:
LoadPlugin("D:\encoding\MPEG2DEC.dll")
LoadPlugin("D:\encoding\FluxSmooth.dll")
LoadPlugin("D:\encoding\blockbuster.dll")
LoadPlugin("D:\encoding\legalclip.dll")
LoadPlugin("D:\encoding\sampler.dll")
LoadPlugin("D:\encoding\Dustv5.dll")
LoadPlugin("D:\encoding\Convolution3D.dll")

SampleSize=11.966
CQ=73

MPEG2Source("C:\Signs\VIDEO_TS\signs.d2v")
LegalClip()
BicubicResize(512,344,0,0.6,3,0,714,480)
SpaceDust()
FluxSmooth()
#Blockbuster(method="noise", variance=0.5, seed=1)
AddBorders(8,68,8,68)
LegalClip()

trim(Round((Framecount/2)-((Framecount/10)/2)),Round((Framecount/2)+((Framecount/10)/2)))
Prediction("Signs", 1, 0.99, SampleSize, CQ, MinAudioBitrate=128).  Sampler(length=24) 


#------------------------------#
# Prediction Function          #
#------------------------------#

function Prediction (clip c, string "movie", int "cds", float "factor", float "SampleSize", float "CQ", int "MinAudioBitrate")

{
movie = default(movie,"No_Title_Defined")
factor = default(factor,0.98)
cds = default(cds,0)
SampleSize = default(SampleSize,0)
CQ = default(CQ,0)
MinAudioBitrate = default(MinAudioBitrate,128)      # lowest audio bitrate wanted

MovieLength  = framecount(c)/framerate(c)
FramesTotal  = framecount(c)
FramesSample = framecount(Sampler(c,length=24))
CD_Size = 814080*cds  #1CD=795MB -> (video+audio)


MinAudio = (((((CD_Size-((MinAudioBitrate/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000
EncodedSample = (SampleSize==0)? false: true     #--------------------------------------------------------------------
SampleSize = (SampleSize==0)? 1: SampleSize    # if sample size =0 mb then no previous sample.
CQ = (CQ<=0)? 1 :CQ                                          # set cq between 1-100                                                         
CQ = (CQ>100)?100 : CQ                                     #---------------------------------------------------------------------
SampleSizeMessage=(EncodedSample==false)?"no sample encoded yet **********": "Sample Size (mb) : "
SampleCQMessage=(EncodedSample==false)?"no sample encoded yet **********":"Sample CQ : "
TryCQValueMessage=(EncodedSample==false)?"no sample encoded yet ******":"Try CQ value of : "

d=BlankClip(c,1,544,480).

\Subtitle(movie, 272,40, halo_color=$00CCCC, text_color=$FFFFFF, font="Courier", size=27, align=5).

\Subtitle("Total Frames : " + String(FramesTotal), 80,60).
\Subtitle("Sample Frames : " + String(FramesSample), 80,80).
\Subtitle("Time (sec) : " + String(round(Movielength)), 80,100).
\Subtitle("Time (min) : " + String(round(Movielength/60)), 80,120).

\Subtitle(SampleSizeMessage+LeftStr(String(SampleSize),5), 270,60,text_color=$FF0000).
\Subtitle(SampleCQMessage + LeftStr(String(CQ),4),270,80,text_color=$FF0000).
\Subtitle("Min. Audio Bitrate : "+ String(MinAudioBitrate)+" kbps",270,100,text_color=$FF0000).
\Subtitle("Desired Sample Size (mb) : " + LeftStr(String(MinAudio),5),270,120,text_color=$FF0000).
\Subtitle(TryCQValueMessage + LeftStr(String((MinAudio*CQ)/SampleSize),4),270,140,text_color=$FF0000).

\Subtitle("Desired Sample Size (mb)  for  " + String(cds) + " CD(s):", 80,165, text_color=$FFFFFF).
\Subtitle("- audio at  96 kbps : " + LeftStr(String((((((CD_Size-((096/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000),5),80,185).
\Subtitle("- audio at 112 kbps : " + LeftStr(String((((((CD_Size-((112/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000),5),80,205).
\Subtitle("- audio at 128 kbps : " + LeftStr(String((((((CD_Size-((128/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000),5),80,225).
\Subtitle("- audio at 160 kbps : " + LeftStr(String((((((CD_Size-((160/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000),5),80,245).
\Subtitle("- audio at 192 kbps : " + LeftStr(String((((((CD_Size-((192/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000),5),80,265).
\Subtitle("- audio at 224 kbps : " + LeftStr(String((((((CD_Size-((224/8)*Movielength))*FramesSample)/FramesTotal)*factor))/1000),5),80,285).

\Subtitle("Average Bitrate (kbps) : "+ String(Round(((((CD_Size-((128/8)*Movielength)))/Movielength)*8)*1)), 80,328).

\Subtitle("Predicted Audio File Sizes (mb):", 80,373, text_color=$FFFFFF).
\Subtitle(" 96 kbps = " + String(Round(((( 96*1024)/8)*Movielength)/1048576)),80,395).
\Subtitle("112 kbps = " + String(Round((((112*1024)/8)*Movielength)/1048576)),80,416).
\Subtitle("128 kbps = " + String(Round((((128*1024)/8)*Movielength)/1048576)),80,437).
\Subtitle("160 kbps = " + String(Round((((160*1024)/8)*Movielength)/1048576)),270,395).
\Subtitle("192 kbps = " + String(Round((((192*1024)/8)*Movielength)/1048576)),270,416).
\Subtitle("224 kbps = " + String(Round((((224*1024)/8)*Movielength)/1048576)),270,437).

\BilinearResize(width(c), height(c))
return d+c+d
}
Reply With Quote
  #17  
02-15-2003, 02:37 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts


thanks friend "ren" (friendalunit)!
now i need time to read and understand it all!

it's..... for me.
Reply With Quote
  #18  
02-16-2003, 12:57 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts

rendalunit,please my friend:

how can i use this "formula":
(FrameCount*SampleSize) / (NumberOfSamples*SampleLength) = PredictedFileSize

i got this script using fitcd:
(i'm thankfull to Kwag and muaddib that helps me a lot to learn(all) fitcd):

LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\MPEG2DEC3.dll")
LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\legalclip.dll")
LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\decomblegacy.dll")
LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\dustv5.dll")
LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\temporalcleanerold.dll")
LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\blockbuster.dll")
LoadPlugin("D:\convert\FitCD_v1.0.5_Prediction&Fil ters_v0.2\sampler.dll")

Mpeg2Source("D:\convert\352x480\01.d2v")
LegalClip()
FieldDeinterlace()
LanczosResize(352,480,8,0,704,480)
SpaceDust()
TemporalCleaner()
Blockbuster(method="noise", variance=.3, seed=1)
#AddBorders(0,0,0,0)
LegalClip()

Sampler(length=24)
## MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size ##

with:
166274,
93 minutes
/24

got 8,61mb(m2v)
and with headAC3 = 105 mb(mp2)(it's musical and i encode in 160)

then how can i apply this "formula"?

i need a "pratic" to use this for all encodes.

oh yes,of course...


and and i deserve lots of....


please don't be with me friend.

thanks a lot in advance!
Reply With Quote
  #19  
02-16-2003, 02:15 AM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jorel
how can i use this "formula":
(FrameCount*SampleSize) / (NumberOfSamples*SampleLength) = PredictedFileSize

Sampler(length=24)
## MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size ##

with:
166274,
93 minutes
/24

got 8,61mb(m2v)
and with headAC3 = 105 mb(mp2)(it's musical and i encode in 160)
(FrameCount*SampleSize) / (NumberOfSamples*SampleLength) = PredictedFileSize

Framecount = 166274
Samplesize = 8.61 mb

NumberofSamples = 93
SampleLength = 24

(166274 * 8.61) / (93 * 24) =
1431619.14 mb / 2232 frames = 641.4mb + 105 mb(audio@160kbps) = 746mb

what musical is it? I love music from all the lands
-ren
Reply With Quote
  #20  
02-16-2003, 02:47 AM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
:yippie:

thanks my "friendalunit" you're fantastic!!!!!!

with your guide i will get what i need now!!

the musical is "night in eden"(Sarah Brigthman)(write "brightman"? )
and after this i will:
la luna (of Sarah too,really cool)
jimi hendrix(all that i got)
led zep(the song remains the same)
roy orbison(black&white night)
and i'm search for beatles(let it be)
rush.....santana
and tons more!

do you like this?
the reason i use 160mp2 and maybe turn to 192 is musicals.
i extract the ac3 to wave,go to sound forge and t-racks,
turbo and clean all that need and encode again in headAC3he to mp2
and normalize to 95%.the result is a clear sound.
i have special atention to quality not for volume,than i normalize to 95%.
sounds like a soft wind.

thanks again friend rendalunit!
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Target Frame Speed Too Slow ? Dreagon Video Encoding and Conversion 1 09-04-2006 03:00 AM
Mencoder: Predicted and bitrate maurus Video Encoding and Conversion 2 05-28-2004 03:00 AM
KDVD: Qcce v1.01 target size problem? The Untouchable Video Encoding and Conversion 10 01-26-2004 04:38 AM
Bitrates: Target CQ with success? jorel Video Encoding and Conversion 5 08-28-2003 08:41 PM
KVCD: How to do file prediction for 2-cd target? Adder Video Encoding and Conversion 5 02-11-2003 01:14 AM

Thread Tools



 
All times are GMT -5. The time now is 07:05 AM  —  vBulletin © Jelsoft Enterprises Ltd