digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Experimental Revised prediction! (http://www.digitalfaq.com/archives/avisynth/4139-experimental-revised-prediction.html)

audi2honda 06-23-2003 07:25 PM

Just as a test I just did a super file prediction. :!: I used the old longer style and used a prediction factor of 1.0. Length of sample 72 and 2 samples per minute. The prediction took 4.5 hours on my P4 1.8ghz machine :!: :!:

And after the encode I still came in 100MB under target for a 2CD encode of a 150minute movie. :cry: :(

I thought even if the MA script was throwing off perdiction this level of sampling could get an accurate prediction, but I guess now.

kwag 06-23-2003 08:20 PM

Hi audi2honda,

I know how you feel :!:
Don't worry, we will get this bastard called "prediction" eventually :lol:

And here's something I just found out problem :!:
I just ran prediction using SansGrip's "Sampler()", and the sample prediction file size of my "K-Pax" movie came out to 12,048KB
The same sample using the manual formula, which uses "SelectRangeEvery()", came out to: 11,652 AND THERE'S OUR DIFF :!:
So there is something going on with the way SelectRangeEvery() works, that doesn't affect Sampler the same way :!:
The value of 12,048, for me is too high, so I would need to drop CQ down to get to the ~11,652, and then my target should be more on the nose.
So I'm now finding the correct CQ with sampler() instead of the manual functions. Then I'll encode again :roll:

-kwag

kwag 06-23-2003 08:49 PM

Update :!:
The new CQ found by manual prediction and using SansGrip's "Sampler()" is now 65.32 :D
The old CQ found by ToK or manual prediction with the following lines was was 67.33 :!:
Code:

interval = round( (FrameCount/24) / 60 )
nFrames = (24)
SelectRangeEvery( (round(framecount/interval)),nFrames)

An THAT'S why the target was ~3% over.
Quite a difference 8)
Now encoding at 65.32 :!:

-kwag

audi2honda 06-23-2003 09:41 PM

i'll be waiting :D When I get in the office in the morning fire up a few more tests using the sampler method. I don't know exactly how to use SansGrips sampler(), but i'll do some reading.

ovg64 06-23-2003 10:11 PM

So r u saying the problem might be tok :?:
8O

kwag 06-23-2003 10:17 PM

Quote:

Originally Posted by ovg64
So r u saying the problem might be tok :?:
8O

Yes and no :!:
The previous version of ToK used "Sampler()", but if was dropped in favor of the "SelectRangeEvery()" because sampler was very inconsistent with PAL material. So now, when I tried the sampling functions to use "Sampler()" again, it seems that we're back on track :)
Right now, the most accurate prediction will be using SansGrip's "Sampler" dll :!:, and using the old and tried manual prediction method.

Edit: This is for NTSC material. I don't know what to do about PAL :?

-kwag

Racer99 06-23-2003 10:32 PM

Quote:

Originally Posted by kwag
Quote:

Originally Posted by ovg64
So r u saying the problem might be tok :?:
8O

So now, when I tried the sampling functions to use "Sampler()" again, it seems that we're back on track :)
Right now, the most accurate prediction will be using SansGrip's "Sampler" dll :!:, and using the old and tried manual prediction method.
-kwag

HEDIX where are you? Help!!!! :D

ovg64 06-23-2003 10:38 PM

So whats the deal use :?:

Sampler(samples=100, length=24) and find the CQ__ point. :?:

kwag 06-23-2003 10:43 PM

Quote:

Originally Posted by ovg64
So whats the deal use :?:

Sampler(samples=100, length=24) and find the CQ__ point. :?:

Yep :!:, but I simply call Sampler()
That will use the default frame rate, and take one sample for every minute of the movie. If I'm encoding a DVD, which usually is 23.976fps, it will take 24 frames per sample automatically.

-kwag

Racer99 06-23-2003 10:44 PM

Manual File prediction refresher
 
I don't know about you all, but I've been so dependent on ToK for calculations, If forgot how to determing CQ prediction. Could some point me to the right post so that I can refresh my memory. Thx!

Racer99

kwag 06-23-2003 10:51 PM

Use moviestacker to find out the sampler size you need. Simply open your .d2v, set the number of CDs you want, and set your audio bitrate. Now on the "Audio Stream & Authoring" read your video size in KB and divide that by 60. That's your wanted sampler size :!:
Then just add the line "Sampler()" at the end of your script, and start TMPEG with a CQ of say ~60.
Change CQ accordingly until the size is ~1% close to the sampler size.
Remove your "Sampler()" line and encode your movie :)

-kwag

audi2honda 06-23-2003 11:00 PM

kwag do you load the script directly into TMPGEnc when using the sampler dll or can you still use ToK? I assume if you use ToK the encode will just stop after the sample runs?

Racer99 06-23-2003 11:01 PM

Quote:

Originally Posted by kwag
Use moviestacker to find out the sampler size you need. Simply open your .d2v, set the number of CDs you want, and set your audio bitrate. Now on the "Audio Stream & Authoring" read your video size in KB and divide that by 60. That's your wanted sampler size :!:
Then just add the line "Sampler()" at the end of your script, and start TMPEG with a CQ of say ~60.
Change CQ accordingly until the size is ~1% close to the sampler size.
Remove your "Sampler()" line and encode your movie :)

-kwag

Ahhh. The real old method. Now I remember.

:)

Racer99

kwag 06-23-2003 11:07 PM

Quote:

Originally Posted by audi2honda
kwag do you load the script directly into TMPGEnc when using the sampler dll or can you still use ToK? I assume if you use ToK the encode will just stop after the sample runs?

You have to load it directly into TMPEG, because ToK will write it's own "video.avs" script which already has prediction with the "SelectRangeEvery()" function.

-kwag

kwag 06-24-2003 02:07 AM

Here's my result of "K-Pax" using "Sampler()".
Wanted final size: 714,303.19KB
Encoded final size: 732,612KB
For a difference of +2.5% ( 18MB difference ) :!:
I wish it was more on the ~2% mark, but 2.5 is fine for me (for the time being!).
Now back to encode "The Boondock Saints", which was the other extreme, which was way below the wanted size.

-kwag

audioslave 06-24-2003 02:48 AM

Is there a way of configuring ToK to use Sampler() instead of SelectRangeEvery()? So we don't have to do manual prediction...

J-Wo 06-24-2003 09:15 AM

Just to followup on what audioslave asked... I'm trying to encode some xvid movies which are split into two avi's, so in my avs script I have to load the files in with two avisource() lines (separated by +). But Moviestacker only lets me load one avi file in, not both, so this current method doesn't let me find out my wanted sample size. Can I just change my video.avs file to use sampler()? Will this solve anything for me?

kwag 06-24-2003 10:34 AM

Results for "The Boondock Saints"

Wanted file size: 722,228KB
Final Encoded size: 702,440KB

For a -2.7% difference.

So that's it :!:
That's the best I can do for now. High action films ~-2.5% average, and low action films ~+2.5% average.
Now that's far better that 100MB off :D But still, I'm not completely pleased :twisted:
But I consider this is good enough to get back to encoding 8)

-kwag

kwag 06-24-2003 10:36 AM

Quote:

Originally Posted by audioslave
Is there a way of configuring ToK to use Sampler() instead of SelectRangeEvery()? So we don't have to do manual prediction...

I believe ToK version 0.0.5.2 (the previous version) used Sampler() instead of SelectRangeEvery(). Check it out :!: I'm going to try it too.

Edit: Yes indeed, ToK 0.0.5.2 does use sampler. Just make sure you set the path to sampler-2.5.dll in it's settings :)


-kwag

audioslave 06-24-2003 10:46 AM

@kwag
Where can I download the older versions of ToK?


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

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