digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   KVCD: AVS File Size predicting stuff? (http://www.digitalfaq.com/archives/encode/1440-kvcd-avs-file.html)

twobit326 10-27-2002 09:30 PM

KVCD: AVS File Size predicting stuff?
 
Hiyas, Um, when I load the file size thing into FitCD. I load TMPEG. And when I load John Q's FitCD file it says the following:

Script Error. THere is no function named "selectRangeEvery"
(C:\John Q\film.avs,line 14.

Here's my Fitcd script:

LoadPlugin("C:\Program Files\NimoCodec Pack\Mpeg2dec\MPEG2DEC.dll")
mpeg2source("C:\John Q\DVD2AVI Output.d2v")
#TemporalSmoother(2,2)
AddBorders(16,64,16,64)
#Trim(0,167009).FadeOut(150)
#ConvertToRGB24 # For TMPGEnc or VFAPI
#ResampleAudio(44100) # CCE 2.5 'crashfix' for Athlons
#== If you want this 'fix' permanently, edit the INI-file:
#== Under [AVSscript] set CCEcrashfix=1
###------------------- Start Of File Size Prediction -------------------###
#
IL = Framecount / 100 # interval length in frames.
SL = round(Framerate) # sample length in frames.
SelectRangeEvery(IL,SL)
### Final MPEG size = ( ( Total frames / Framerate) / 100 ) * (MPEG sample file size * .95) ###
#
###-----------------------End File Size Prediction----------------------###



****Note, I also tried the other 2 ways of writing the file size prediction thing. (The one linked to on VCDHelper and the updated one on the forums.)


Any help would be greatly appreciated.

Thanx,
Twobit326

kwag 10-27-2002 10:16 PM

Hi Twobit326,

Get a newer version of MPEG2DEC.dll. If you download DVD2SVCD, you'll get it in the package.

-kwag

twobit326 10-28-2002 06:59 AM

One more question. How much do I encode to get the file size prediction thing? It looked like 1 minuet but I might be wrong.

Thanx,
Twobit326

kwag 10-28-2002 08:35 AM

The script is set up to take 100 snapshots of 1 second each.

-kwag

reman 10-28-2002 03:54 PM

Quote:

Originally Posted by kwag
The script is set up to take 100 snapshots of 1 second each.-kwag

I have started to select a range so that the output is ~60 seconds and try to leave out the intro and credits. Works great! I have found it to be very close to actual file size.

twobit326 10-29-2002 06:26 AM

thanx for the help.

reman 10-29-2002 07:06 AM

Quote:

Originally Posted by kwag
The script is set up to take 100 snapshots of 1 second each.-kwag

Any way to make it take 60 snapshots of 1 second each and skip area at the beg. and end? :?: :?: 8O 8O

muaddib 10-29-2002 09:29 PM

Hi reman,

I think that this script will do what you want:

Trim(Framerate*120, Framecount-(Framerate*600))
IL = Framecount / 60
SL = round(Framerate)
SelectRangeEvery(IL,SL)

It will discard the first 2 min of the beg. and 5 min of the end.
I haven't tried it... but I think it will work.

kwag 10-30-2002 12:37 AM

muaddib,

Isn't "Framecount-(Framerate*600)) " trimming the last 10 minutes :?:
Shouldn't it be: Trim(Framerate*120, Framecount-(Framerate*300)) :?:


-kwag

muaddib 10-30-2002 02:26 PM

:oops: Yep... you're absolutely right! :oops:

5*60 = 300 ... not 600 :lol:
That should be the beer of last night... :wink:

kwag 10-30-2002 05:29 PM

Don't drink and post.
Only read if you drink :lol: :lol:
( That's why I don't post after 2:00 AM 8O )

Salud!
-kwag

muaddib 10-30-2002 11:58 PM

Good advice! I'll try to follow it. :lol:
Ops... It's 3:00AM!! 8O
Too late now... :wink:

reman 11-01-2002 05:18 PM

I really want to thank everyone! Great stuff! Might I suggest that you add a commented section that allows users to uncomment the 1 minute code with the trimming and then delete the original code? :wink:

8) 8) :lol: :lol:

reman 11-01-2002 07:52 PM

Hello!

This produces an error when loading into TMPGenc. My guess is that the
Quote:

Trim(Framerate*120, Framecount-(Framerate*300))
line is not right. Should it not be a result type of line? Framecount = Trim(Framerate... OR Framerate = Trim(Framerate...?

Quote:

LoadPlugin("C:\Program Files\VCDEasy\FitCD_v104\mpeg2dec_dll\MPEG2DEC.dll ")
mpeg2source("G:\Video Files\movie\movie.d2v")
BilinearResize(480,320,0,0,720,480)
#TemporalSmoother(2,2)
AddBorders(32,80,32,80)
#Trim(0,160504).FadeOut(150)
#ConvertToRGB24 # For TMPGEnc or VFAPI
#ResampleAudio(44100) # CCE 2.5 'crashfix' for Athlons
#== If you want this 'fix' permanently, edit the INI-file:
#== Under [AVSscript] set CCEcrashfix=1

###--------------------- Start Of File Size Prediction ----------------------###

Trim(Framerate*120, Framecount-(Framerate*300))
IL = Framecount / 60 # interval length in frames
SL = round(Framerate) # sample length in frames
SelectRangeEvery(IL,SL)
## MPEG size = ((Total frames/Framerate)/100) * (MPEG sample file size * .95) ##

###------------------------End File Size Prediction--------------------------###

kwag 11-01-2002 08:28 PM

Hi reman,

I think this is what you're looking for :wink:

SF = round(FrameRate * 120) # Find start Frame
EF = round(Framecount - ( Framerate * 300 )) # Find end frame
TotalFrames = EF - SF # This is the new total number of frames
Trim(SF,EF) # Now trim it

IL = TotalFrames / 60 # interval length in frames # And do our stuff ;)
SL = round(Framerate) # sample length in frames
SelectRangeEvery(IL,SL)

-kwag


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

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.