Quantcast Manual File Prediction: Mini How-to Guide - digitalFAQ.com Forums [Archives]
  #1  
12-26-2002, 10:52 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
Here's the manual way to do file size prediction. I assume you have your material already prepared and you have created your basic .avs script using FitCD. I also assume you have extracted your audio in AC3 or WAV format.

Step 1: Determine the Audio file size.
Say you want to put your movie on one CD. First thing you do is find out the size of your audio file. That's very easy with the help of HeadAC3he. Just run HeadAC3he and select your demuxed AC3 or WAV audio file. Select .mp2 as output and the audio bit rate you want to use. I usually select either 112Kbps for 120+ minute movies or 128Kbps for movies shorter than that. You'll see the audio size is automatically displayed in HeadAC3he. Make a note of the size.

Step 2: Determine the Video file size.
Suppose the audio in step 1 is 87MB, and our CD-R is 700MB 80 minutes. Remember that VCDs are written in what's called "Mode-2", so a 700MB data CD-R will actually fit ~800MB in VCD format. So we'll use an 80 minute CD-R for this example.
Now do this: 800 - 87 = 713. The ~800 is your VCD capacity. So you have ~713MB left for your video stream, and this will be the predicted file size for the video. Now apply the formula like this:

Predicted MPEG size = (( Total frames/MovieTimeInMinutes) / 24 ) * MPEG sample file size

Say your movie has 198,673 frames and is 138 minutes long. You would do this: 198673 / 138 / 24 = 59.98 and store the value 59.98 in your calculator's memory for a moment. Now do this: 713 / MemoryRecall(which is 59.98 ) = 11.88MB and that's what your sample size has to be. Now you encode with SansGrip "Sampler()" line at the end of your .avs. Here's what a basic .avs script looks like, with the file prediction line added at the end:

Code:
LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\sampler.dll")
LoadPlugin("C:\encoding\legalclip.dll")
mpeg2source("K:\K19\VIDEO_TS\k19.d2v")
LegalClip()
BilinearResize(672,336,0,0,720,480)
FluxSmooth()
AddBorders(16,72,16,72)
LegalClip()
Sampler()
When the encoder finishes, which should take between 3 to 6 minutes depending on how fast your machine runs, take a look at the sample file size. This is what I do to zero in faster on the correct CQ value:

New_CQ_Value = WantedSize(11.88 in this case) / Encoded_Sample_Size * Current_CQ_Value

Say your sample comes out to 10.0MB, and you are encoding with a CQ value of 25. The new CQ value for the next run is: 11.88 / 10 * 25 = 29.7 So you change the CQ value in TMPEG to 29.7 and encode another sample. It usually takes 3 to 4 samples to hit your target this way.
When you get close to the wanted file size, say < 1%, just remove the line "Sampler()" from your .avs script and when you hit encode again, your complete movie will start to encode.

Hope this helps

-kwag
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  
12-27-2002, 09:30 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!
Reply With Quote
  #3  
01-27-2003, 07:05 PM
Graal_CPM Graal_CPM is offline
Free Member
 
Join Date: Jun 2002
Location: Paris, France
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
If you past the following at the end of your movie avs script and open it in virtualdub or your favorite media player, this will show you movie total frames, movie lenght, sample total frames, and will calculate various sound file size (same accuracy as Headac3he).

Then you can write down these numbers, comment out "Prediction()" line putting a # in front of it, and go on with the prediction process described in black prince's or kwag's guides.

Code:
Prediction()

function Prediction (clip c) {
Movielenght=framecount(c)/framerate(c)
d=c.
\Subtitle("Movie framecount : " + String(framecount(c)),20,20).
\Subtitle("Movie lenght (sec) : " + String(round(Movielenght)),20,40).
\Subtitle("Test framecount : " + String(framecount(Sampler(c,length=24))),20,60).
\Subtitle("Audio@112bps (Mb) : " + String( (((112*1024)/8)*Movielenght)/1048576),20,80).
\Subtitle("Audio@128bps (Mb) : " + String( (((128*1024)/8)*Movielenght)/1048576),20,100).
\Subtitle("Audio@160bps (Mb) : " + String( (((160*1024)/8)*Movielenght)/1048576),20,120).
\Subtitle("Audio@192bps (Mb) : " + String( (((192*1024)/8)*Movielenght)/1048576),20,140).
\Subtitle("Audio@224bps (Mb) : " + String( (((224*1024)/8)*Movielenght)/1048576),20,160)
return d
}
Reply With Quote
  #4  
01-30-2003, 10:21 AM
Racer99 Racer99 is offline
Free Member
 
Join Date: Sep 2002
Location: Massachusetts
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Graal_CPM
:idea: If you past the following at the end of your movie avs script and open it in virtualdub or your favorite media player, this will show you movie total frames, movie lenght, sample total frames, and will calculate various sound file size (same accuracy as Headac3he).

Then you can write down these numbers, comment out "Prediction()" line putting a # in front of it, and go on with the prediction process described in black prince's or kwag's guides.

Code:
Prediction()

function Prediction (clip c) {
Movielenght=framecount(c)/framerate(c)
d=c
\Subtitle("Movie framecount : " + String(framecount(c)),20,20).
\Subtitle("Movie lenght (sec) : " + String(round(Movielenght)),20,40).
\Subtitle("Test framecount : " + String(framecount(Sampler(c,length=24))),20,60).
\Subtitle("Audio@112bps (Mb) : " + String( (((112*1024)/8)*Movielenght)/1048576),20,80).
\Subtitle("Audio@128bps (Mb) : " + String( (((128*1024)/8)*Movielenght)/1048576),20,100).
\Subtitle("Audio@160bps (Mb) : " + String( (((160*1024)/8)*Movielenght)/1048576),20,120).
\Subtitle("Audio@192bps (Mb) : " + String( (((192*1024)/8)*Movielenght)/1048576),20,140).
\Subtitle("Audio@224bps (Mb) : " + String( (((224*1024)/8)*Movielenght)/1048576),20,160)
return d
}
Quote:
I've taken your fine script and tweaked it a little bit further. I added the ability to get your predicted file size based on audio bitrate. This is based on 1 cd at 790mb (I allow 10mb for overhead and menus). If you want to figure for 2cds change the 808960 to 1617920).

Prediction()

function Prediction (clip c) {
Movielength=framecount(c)/framerate(c)
d=c.
\Subtitle("Total Frames : " + String(framecount(c)),20,20).
\Subtitle("Time(sec) : " + String(round(Movielength)),215,20).
\Subtitle("Sample FC : " + String(framecount(Sampler(c,length=24))),375,20).
\Subtitle("Desired Sampler Size (112 bps) : " + String(((808960-((112/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c) ))/0.98),90,80).
\Subtitle("Desired Sampler Size (128 bps) : " + String(((808960-((128/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c) ))/0.98),90,120).
\Subtitle("Desired Sampler Size (160 bps) : " + String(((808960-((160/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c) ))/0.98),90,160).
\Subtitle("Desired Sampler Size (192 bps) : " + String(((808960-((192/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c) ))/0.98),90,200).
\Subtitle("Desired Sampler Size (224 bps) : " + String(((808960-((224/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c) ))/0.98),90,240).
\Subtitle("Avg Bitrate " + " (kbps) : " + String( ((((808960-((128/8)*Movielength)))/Movielength)*8)*1),90,300).
\Subtitle("Predicted Audio File Sizes " + " (Mb)",140,410).
\Subtitle("112 bps = " + String( (((112*1024)/8)*Movielength)/1048576),80,430).
\Subtitle("128 bps = " + String( (((128*1024)/8)*Movielength)/1048576),80,450).
\Subtitle("160 bps = " + String( (((160*1024)/8)*Movielength)/1048576),80,470).
\Subtitle("192 bps = " + String( (((192*1024)/8)*Movielength)/1048576),270,430).
\Subtitle("224 bps = " + String( (((224*1024)/8)*Movielength)/1048576),270,450)
return d
}

Reply With Quote
  #5  
01-30-2003, 12:18 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
Excelent guys
Here's further refinement, because the way the script is set, at 352x240 everything gets cut off.

So put the Prediction() statement AFTER the line where you open the .d2v, and the actual function at the end of the script. Like this:

Code:
LoadPlugin("C:\encoding\mpeg2dec.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll") 
LoadPlugin("C:\encoding\GripFit_preview.dll") 
LoadPlugin("C:\encoding\blockbuster.dll") 
LoadPlugin("C:\encoding\legalclip.dll") 
LoadPlugin("C:\encoding\sampler.dll") 
LoadPlugin("C:\encoding\dustv5.dll") 
LoadPlugin("C:\encoding\temporalcleanerold.dll")

Mpeg2Source("K:\S1M0NE_WS\VIDEO_TS\simone.d2v")
Prediction() 

LegalClip() 
GripCrop( width=352, height=240, overscan=1 ) 
GripSize() 
SpaceDust()
TemporalCleaner()
Blockbuster(method="noise", variance=.7, seed=1)
GripBorders() 
LegalClip() 

function Prediction (clip c) { 
Movielength=framecount(c)/framerate(c) 
d=c. 
\Subtitle("Total Frames : " + String(framecount(c)),20,20). 
\Subtitle("Time(sec) : " + String(round(Movielength)),215,20). 
\Subtitle("Sample FC : " + String(framecount(Sampler(c,length=24))),375,20). 
\Subtitle("Desired Sampler Size (112 bps) : " + 

String(((808960-((112/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98

),90,80). 
\Subtitle("Desired Sampler Size (128 bps) : " + 

String(((808960-((128/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98

),90,120). 
\Subtitle("Desired Sampler Size (160 bps) : " + 

String(((808960-((160/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98

),90,160). 
\Subtitle("Desired Sampler Size (192 bps) : " + 

String(((808960-((192/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98

),90,200). 
\Subtitle("Desired Sampler Size (224 bps) : " + 

String(((808960-((224/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98

),90,240). 
\Subtitle("Avg Bitrate " + " (kbps) : " + String( ((((808960-((128/8)*Movielength)))/Movielength)*8)*1),90,300). 
\Subtitle("Predicted Audio File Sizes " + " (Mb)",140,410). 
\Subtitle("112 bps = " + String( (((112*1024)/8)*Movielength)/1048576),80,430). 
\Subtitle("128 bps = " + String( (((128*1024)/8)*Movielength)/1048576),80,450). 
\Subtitle("160 bps = " + String( (((160*1024)/8)*Movielength)/1048576),80,470). 
\Subtitle("192 bps = " + String( (((192*1024)/8)*Movielength)/1048576),270,430). 
\Subtitle("224 bps = " + String( (((224*1024)/8)*Movielength)/1048576),270,450) 
return d 
}
This way, the script gets resized, and fits correctly on the screen at any resolution

-kwag
Reply With Quote
  #6  
01-30-2003, 02:10 PM
Bud Bud is offline
Free Member
 
Join Date: Apr 2002
Location: Hawaii
Posts: 241
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Bud
Need a litle help here....exactly what is the going to do for me? I'm not sure I follow what this script is doing. Thanks in advance

Bud
Reply With Quote
  #7  
01-30-2003, 03:53 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
Hi Bud,

The script above will display the audio file sizes with different audio bit rates, and give the sample file size you need for each different audio bit rates. So you don't have to manually calculate the stuff . It's pretty cool

-kwag
Reply With Quote
  #8  
01-30-2003, 04:08 PM
Bud Bud is offline
Free Member
 
Join Date: Apr 2002
Location: Hawaii
Posts: 241
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Bud
Kwag

Thanks,,,i'll give it a try...been having great results by using the manual method on both the 352x240 and KVCDx3 templates for one CD.

Bud
Reply With Quote
  #9  
01-30-2003, 04:09 PM
Racer99 Racer99 is offline
Free Member
 
Join Date: Sep 2002
Location: Massachusetts
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Excelent guys
Here's further refinement, because the way the script is set, at 352x240 everything gets cut off.

So put the Prediction() statement AFTER the line where you open the .d2v, and the actual function at the end of the script. Like this:

Code:
LoadPlugin("C:\encoding\mpeg2dec.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll") 
LoadPlugin("C:\encoding\GripFit_preview.dll") 
LoadPlugin("C:\encoding\blockbuster.dll") 
LoadPlugin("C:\encoding\legalclip.dll") 
LoadPlugin("C:\encoding\sampler.dll") 
LoadPlugin("C:\encoding\dustv5.dll") 
LoadPlugin("C:\encoding\temporalcleanerold.dll")

Mpeg2Source("K:\S1M0NE_WS\VIDEO_TS\simone.d2v")
Prediction() 

LegalClip() 
GripCrop( width=352, height=240, overscan=1 ) 
GripSize() 
SpaceDust()
TemporalCleaner()
Blockbuster(method="noise", variance=.7, seed=1)
GripBorders() 
LegalClip() 

function Prediction (clip c) { 
Movielength=framecount(c)/framerate(c) 
d=c. 
\Subtitle("Movie Title : 'Simone'",220,20). 
\Subtitle("Total Frames : " + String(framecount(c)),40,50). 
\Subtitle("Time(sec) : " + String(round(Movielength)),235,50). 
\Subtitle("Sample FC : " + String(framecount(Sampler(c,length=24))),400,50). 
\Subtitle("Desired Sampler Size (112 bps) : " + String(((808960-((112/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98 ),90,80). 
\Subtitle("Desired Sampler Size (128 bps) : " + String(((808960-((128/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98 ),90,120). 
\Subtitle("Desired Sampler Size (160 bps) : " + String(((808960-((160/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98 ),90,160). 
\Subtitle("Desired Sampler Size (192 bps) : " + String(((808960-((192/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98 ),90,200). 
\Subtitle("Desired Sampler Size (224 bps) : " + String(((808960-((224/8)*Movielength))/(((Framecount(c)/framerate(c))/((framecount(Sampler(c,length=24)))))*framerate(c)))/0.98 ),90,240). 
\Subtitle("Avg Bitrate " + " (kbps) : " + String( ((((808960-((128/8)*Movielength)))/Movielength)*8)*1),90,300). 
\Subtitle("Predicted Audio File Sizes " + " (Mb)",140,410). 
\Subtitle("112 bps = " + String( (((112*1024)/8)*Movielength)/1048576),80,430). 
\Subtitle("128 bps = " + String( (((128*1024)/8)*Movielength)/1048576),80,450). 
\Subtitle("160 bps = " + String( (((160*1024)/8)*Movielength)/1048576),80,470). 
\Subtitle("192 bps = " + String( (((192*1024)/8)*Movielength)/1048576),270,430). 
\Subtitle("224 bps = " + String( (((224*1024)/8)*Movielength)/1048576),270,450) 
return d 
}
This way, the script gets resized, and fits correctly on the screen at any resolution

-kwag
Hey Kwag,

I added a line for movie title since I like to capture the image and keep it handy with the movie which I am encoding. I also cleaned up the code to avoid confusion for those cutting and pasting. Thanks for the code help about the resizaing ( I actually thought of that but forgot to implement. ), and thanks to Graal_CPM for coming up the initial idea. I was constantly opening Excel or calculator to calculate the sample sizes.

Racer99
Reply With Quote
  #10  
01-30-2003, 05:17 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
I can't wait for this to happen: http://www.avisynth.org/index.php?page=WhyPython
As Python is my favorite language of all times ( Been doing Python now for ~3 years ), the possibilities will be ENDLESS!
Imagine this: On one machine I can have a "Server" script running, and from remote machines, you can be encoding by serving via TCP/IP to a client where TMPEG is running
Frameserving through the internet
The future looks bright

-kwag
Reply With Quote
  #11  
01-31-2003, 01:45 AM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all!

Here is my 2 cents for this great script:

Well I think that if we leave all these subtitles in all sample’s frames, it can disturb the prediction accuracy, so I created two frames, one at the beginning and one at the end of the sample, and I show all the information only in this two frames.

Other change is that I added the title of the movie as a parameter of the function. I did this because I have a file with many functions, and I just call this file when I need some of the functions. Here is how I call it:
Code:
Import("D:\DVD Rip Tools\AviSynth2\filters\functions.avs")

Mpeg2Source("D:\Videos\shows\the_corrs_royal_albert_hall\the_corrs.d2v")
Prediction("The Corrs at Royal Albert Hall")
The formula used still the same. I just make some cleaning on it. You can "cancel" (I don't know if this is the correct term in English) the two framerate(c).
I just have one doubt... in the end of the old (and the new) formula, we are dividing by .98! If we want to give a little breath of 2% shouldn't we multiply by .98?

Oh, I also make some cosmetic changes like font formatting and positioning. I have to move the top and bottom subtitles because they got cut by the LetterBox filter.

Here is the function:
Code:
Function Prediction (clip c, string "movie") {
MovieLength  = framecount(c)/framerate(c)
FramesTotal  = framecount(c)
FramesSample = framecount(Sampler(c,length=24))

d=BlankClip(c,1).
\Subtitle("Movie Title : " + movie, width(c)/2,40, text_color=$FFFFFF, size=22, align=5).

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

\Subtitle("Desired Sampler Size (096 bps) : " + String((((808960-((096/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,145).
\Subtitle("Desired Sampler Size (112 bps) : " + String((((808960-((112/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,170).
\Subtitle("Desired Sampler Size (128 bps) : " + String((((808960-((128/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,195).
\Subtitle("Desired Sampler Size (160 bps) : " + String((((808960-((160/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,220).
\Subtitle("Desired Sampler Size (192 bps) : " + String((((808960-((192/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,245).
\Subtitle("Desired Sampler Size (224 bps) : " + String((((808960-((224/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,270).

\Subtitle("Avg Bitrate (kbps) : " + String( ((((808960-((128/8)*Movielength)))/Movielength)*8)*1),80,325).

\Subtitle("Predicted Audio File Sizes " + " (mb)", 140,380, text_color=$FFFFFF).
\Subtitle("096 bps = " + String( (((096*1024)/8)*Movielength)/1048576),80,400).
\Subtitle("112 bps = " + String( (((112*1024)/8)*Movielength)/1048576),80,420).
\Subtitle("128 bps = " + String( (((128*1024)/8)*Movielength)/1048576),80,440).
\Subtitle("160 bps = " + String( (((160*1024)/8)*Movielength)/1048576),270,400).
\Subtitle("192 bps = " + String( (((192*1024)/8)*Movielength)/1048576),270,420).
\Subtitle("224 bps = " + String( (((224*1024)/8)*Movielength)/1048576),270,440)

return d+c+d
}
Reply With Quote
  #12  
01-31-2003, 02:15 AM
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
What can I say muaddib
Kudos

-kwag
Reply With Quote
  #13  
01-31-2003, 02:47 AM
Smoochie3 Smoochie3 is offline
Free Member
 
Join Date: Jun 2002
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
I couldn't get this to work.

Here's my script:
Code:
LoadPlugin("D:\avfilters\legalclip.dll")
LoadPlugin("D:\avfilters\MPEG2DEC.dll")
LoadPlugin("D:\avfilters\fluxsmooth.dll")
LoadPlugin("D:\avfilters\blockbuster.dll")
LoadPlugin("D:\avfilters\legalclip.dll")
LoadPlugin("D:\avfilters\Convolution3D.dll")
LoadPlugin("D:\avfilters\DecombLegacy.dll")
LoadPlugin("D:\avfilters\DustV5.dll")
LoadPlugin("D:\avfilters\GripFit_preview.dll")
LoadPlugin("D:\avfilters\Sampler.dll")
LoadPlugin("D:\avfilters\NoMoSmooth.dll")
Import("F:\sample avisynth scripts\function.avs")

mpeg2source("h:\lotr2\lotr2.d2v")

Prediction()

Telecide()
Decimate()
LegalClip()
Gripcrop(528,480)
Gripsize(resizer="bicubicresize")
Spacedust()
Convolution3d(preset="movieLQ")
Gripborders()
Letterbox(0,0,8,8)
LegalClip()
and i have the
Code:
Import("F:\sample avisynth scripts\function.avs")
to call to this:
Code:
Function Prediction (clip c, string "movie") { 
MovieLength  = framecount(c)/framerate(c) 
FramesTotal  = framecount(c) 
FramesSample = framecount(Sampler(c,length=24)) 

d=BlankClip(c,1). 
\Subtitle("Movie Title : " + movie, width(c)/2,40, text_color=$FFFFFF, size=22, align=5). 

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

\Subtitle("Desired Sampler Size (096 bps) : " + String((((808960-((096/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,145). 
\Subtitle("Desired Sampler Size (112 bps) : " + String((((808960-((112/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,170). 
\Subtitle("Desired Sampler Size (128 bps) : " + String((((808960-((128/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,195). 
\Subtitle("Desired Sampler Size (160 bps) : " + String((((808960-((160/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,220). 
\Subtitle("Desired Sampler Size (192 bps) : " + String((((808960-((192/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,245). 
\Subtitle("Desired Sampler Size (224 bps) : " + String((((808960-((224/8)*Movielength))*FramesSample)/FramesTotal)/0.98),80,270). 

\Subtitle("Avg Bitrate (kbps) : " + String( ((((808960-((128/8)*Movielength)))/Movielength)*8)*1),80,325). 

\Subtitle("Predicted Audio File Sizes " + " (mb)", 140,380, text_color=$FFFFFF). 
\Subtitle("096 bps = " + String( (((096*1024)/8)*Movielength)/1048576),80,400). 
\Subtitle("112 bps = " + String( (((112*1024)/8)*Movielength)/1048576),80,420). 
\Subtitle("128 bps = " + String( (((128*1024)/8)*Movielength)/1048576),80,440). 
\Subtitle("160 bps = " + String( (((160*1024)/8)*Movielength)/1048576),270,400). 
\Subtitle("192 bps = " + String( (((192*1024)/8)*Movielength)/1048576),270,420). 
\Subtitle("224 bps = " + String( (((224*1024)/8)*Movielength)/1048576),270,440) 

return d+c+d 
}
I end up with:

Script error: Subtitle does not have a named argument "align"
(F:\sample avisynth scripts\function.avs, line 29)
(H:\lotr2\lotr2~1.avs, line 16)

Any ideas?
Reply With Quote
  #14  
01-31-2003, 06:50 AM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Smoochie3
I end up with:

Script error: Subtitle does not have a named argument "align"
(F:\sample avisynth scripts\function.avs, line 29)
(H:\lotr2\lotr2~1.avs, line 16)

Any ideas?
The "align" argument was created in the last avisynch.
Donload avisynch 2.07.

edit: BTW, you have to specify the video title or it will not work.
How can I set a default value for an argument in an avisynch function?
Reply With Quote
  #15  
01-31-2003, 07:14 AM
muaddib muaddib is offline
Free Member
 
Join Date: Jun 2002
Location: São Paulo - Brasil
Posts: 879
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
What can I say muaddib
Kudos


Quote:
Originally Posted by muaddib
...in the end of the old (and the new) formula, we are dividing by .98! If we want to give a little breath of 2% shouldn't we multiply by .98?
What about this
Reply With Quote
  #16  
01-31-2003, 10:55 AM
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 muaddib
Quote:
Originally Posted by muaddib
...in the end of the old (and the new) formula, we are dividing by .98! If we want to give a little breath of 2% shouldn't we multiply by .98?
What about this
We multiply the sample size result by .98. Not divide.

-kwag
Reply With Quote
  #17  
01-31-2003, 11:41 AM
Smoochie3 Smoochie3 is offline
Free Member
 
Join Date: Jun 2002
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
OOPS! I thought i had 2.07 this whole time!!! Thanks!
Reply With Quote
  #18  
01-31-2003, 12:19 PM
Smoochie3 Smoochie3 is offline
Free Member
 
Join Date: Jun 2002
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Why wouldn't the prediction() line be after the filters? When i put it right after the mpeg2source everything is still cut off.
Reply With Quote
  #19  
01-31-2003, 02:17 PM
tonyk tonyk is offline
Free Member
 
Join Date: Apr 2002
Location: California
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Smoochie3 -

I think you're correct - if the Prediction("movie") line is placed right before the Sampler(length=24) line (at the end of the script after all filters), everything displays correctly, otherwise it's cut off.

Excellent script!

Thanks, --TonyK.
Reply With Quote
  #20  
01-31-2003, 02:34 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 Smoochie3
Why wouldn't the prediction() line be after the filters? When i put it right after the mpeg2source everything is still cut off.
That's why I put the prediction() line after the resize, so that no matter what resolution you use in GripCrop, it will be properly resized and displayed

-kwag
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
KVCD Predictor or Manual Prediction vhelp Avisynth Scripting 12 08-08-2004 02:59 AM
Mencoder: New mini-guide for KSVCD maurus Video Encoding and Conversion 0 05-31-2004 04:28 AM
Where to get DVD to mini-kDVD guide ? Critter Video Encoding and Conversion 0 11-03-2003 01:50 AM
Mini guide to make GOOD mp3s! azel Audio Conversion 0 10-03-2003 03:54 PM
File prediction using TMPGEnc method from KVCD guide wretched Avisynth Scripting 8 05-25-2003 05:35 PM

Thread Tools



 
All times are GMT -5. The time now is 02:31 PM  —  vBulletin © Jelsoft Enterprises Ltd