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)

audioslave 06-25-2003 11:11 AM

Okay, I'll try it out. Thanks for you help, Boulder. BTW, should I use 24 for sample lenght also - on all source material (NTSCFilm, PAL & NTSC)?

Boulder 06-25-2003 11:19 AM

Yes, it would make sense..until someone comes up with a sample length that gives a better prediction.

audioslave 06-25-2003 11:22 AM

Thank you again, Boulder! You've been a great helper indeed...
:wink:

J-Wo 06-25-2003 01:21 PM

okay, with all the latest talk on motion adaptive scripts and detecting scene changes, blah blah blah... got me thinking, should we be making any more changes to our tmpgenc settings than those in the old kvcdx3 template? I've read to change the motion search precision to fast (motion estimate search). But what about Detect Scene change (in the GOP tab) and the Special Settings (Quantize Matrix tab)? I just noticd there is an unchecked box for "No motion search for still picture part by half pixel"... Thanks guys!

kwag 06-25-2003 01:35 PM

Quote:

Originally Posted by J-Wo
But what about Detect Scene change (in the GOP tab) and the Special Settings (Quantize Matrix tab)?

That was already changed and SET in the http://www.kvcd.net/video.en1 file, ready for ToK.
Quote:

I just noticd there is an unchecked box for "No motion search for still picture part by half pixel"
That actually makes the picture worse :wink:

-kwag

jorel 06-25-2003 04:02 PM

Quote:

Originally Posted by Boulder
Yep, that's what I'd recommend.

right Boulder :!:

for the first time from days this is the first time
that i got high CQ using the Boulder recomendations :!:
maybe somebody remember a weeks ago when i post about low CQ.

i did the test twice and ToK give me
CQFinal CQ: 70,349 :D :D :D
and before was CQ: 56,467 :arrow: huge difference,don't?

i only uncheck the "Auto GOP" and wrote:
1,24,2,1,24!
uncheck the "new faster prediction" and 2nd group of passes
than i wrote this values:
precision% 1,00 and speed up by 10 !

new video.en1 (thanks Kwag) only changing this line to:
Job.MPEG.Video.VideoEncodeMode=MPEGVideoEncoder_Vi deoEncodeMode_interlace
cos my source is 29,970,ntsc.

the CQ: 70,349 is perfect for my desired size now!
:D
i'm happy and encoding now!

thank you all friends, in special Kwag and Boulder for this result!
:D :D :D

audi2honda 06-25-2003 04:21 PM

should NTSC film users be unchecking auto GOP too? and manually entering a value?

Boulder 06-25-2003 04:28 PM

Quote:

Originally Posted by audi2honda
should NTSC film users be unchecking auto GOP too? and manually entering a value?

For film material the auto GOP length should be 24 already as its 23.976fps.

vico1 06-26-2003 02:31 AM

Quote:

Originally Posted by audioslave
@Boulder
Okay. So do you recommend using a GOP of 24 regardless of the source - even for PAL? I'm confused here...

Quote:

Originally Posted by boulder
Yep, that's what I'd recommend.

@Boulder,
You wouldn`t use that GOP (24) with Anime/Cartoon...would you???


*******************************
The Devil`s always.....in the Details!

Krassi 06-26-2003 03:10 AM

Quote:

Originally Posted by Krassi
The Prediction with Sampler length=15 was good :!:
Can any PAL user try this:
Code:

1. Use ToK 0.0.5.2
2. Overwrite file video.en1 in ToK's opt folder with Kwags newest one
3. Set a factor of 1.0 in ToK and Length of Sample to 15. Samples/Minute to 4 or above.
4. Precision to 0.5 or 1%

My results:
Code:

Required Video Size: 330.369.920
Final Encoded Size: 324.024.428

I'll test some other lengths of Samplers tomorrow...
Good night,

Krassi

After some more tests a sampler length of 15 isn't accurate for me :evil: .
I had to reinstall my Windows (even manual repair failed) so i've only done 2 more tests, but i had an idea:
Why not taking a longer sample size to make a better prediction with the adaptive script :?: I had good results with a Sampler length of 50, maybe 48 would be better. I thought that a bigger sample size than GOP would screw up Prediction or Sampler() but it didn't.

Kwag, do you know why TMPGEnc encodes with a GOP of 24 instead of 25 with PAL-Sources :?:

EDIT: Here is a comparison on a short movie (PAL):
Code:

Sampler Length=48:
Required Video Size: 330,369,920
Final Encoded Size: 324,282,527
______________________________
Sampler Length=50:
Required Video Size: 330,369,920
Final Encoded Size: 327,576,154


audioslave 06-26-2003 03:18 AM

I just finished encoding "Enough" (PAL) with GOP and sample size set to 24. And this is what I got:

Wanted size: 726 XXX XXX
Encoded size: 721 XXX XXX
(Don't have the exact numbers. I'm at work now)

AMAZING! A difference less than ~0.7% :D !!! Final muxed movie was 795MB. I changed ToK's setting to what kwag recommended in an earlier post and used kwag's modified video.en1 file. Try it out all you PAL encoders out there. Thank you very much guys! Maybe I'll be able to sleep at night again now :wink: !

Abond 06-26-2003 04:57 AM

Hi, all
My way for PAL prediction is not fully tested (only two movies so far - an AVI and a DVD) but gave me for first time correct file sizes.
Sample=1% of movie with the line in the script SelectRangeEvery(2500,25)
run a sample at CQ100 without black borders. Mark the file size. Run the sample at CQ100 borders added. Mark the file size. Find the difference of the file sizes in %.
Calculation of desired sample size
samplesize=((fullvidoesize/totalframes)*sampleframes) + (% of the difference you found before). Hmm, sorry for the bad english.
An example:
A movie has 137145 frames. Final video size is 740912KB. Sample has 1375 frames. Sample size = (740912/137145)*1375 = 7428.
CQ100 without borders = 15275 KB
CQ100 with borders = 14569 KB
Difference = 4.6%
4.6% from 7428 = 341
7428+341=7769 -> this is your real size of the sample.
The results. AVI - required 730xxx KB, final encode 723xxxKB.
DVD (the example above) encoded with CQ57 with sample size 7785 (a bit higher than the desired 7769). Required size 740912, final encode 742xxx (a bit higher).
Well, it need to be more carefully tested.

Boulder 06-26-2003 05:41 AM

Quote:

Originally Posted by vico1
Quote:

Originally Posted by audioslave
@Boulder
Okay. So do you recommend using a GOP of 24 regardless of the source - even for PAL? I'm confused here...

Quote:

Originally Posted by boulder
Yep, that's what I'd recommend.

@Boulder,
You wouldn`t use that GOP (24) with Anime/Cartoon...would you???

I can't say because I don't encode any anime or cartoons. Surely Kwag knows this stuff better than me so you're better off with his recommendations.

kwag 06-26-2003 09:17 AM

Quote:

Originally Posted by Krassi

Kwag, do you know why TMPGEnc encodes with a GOP of 24 instead of 25 with PAL-Sources :?:

No, becauese I don't encode PAL :)
But I'll take a look :!: Maybe it's a bug in TMPEG :?:
BTW, have you tried encoding with ToK with the screenshot I posted earlier :?:
Here it is again:

http://www.digitalfaq.com/archives/i.../2003/06/7.jpg

-kwag

kwag 06-26-2003 08:20 PM

Well I just have to post this one :mrgreen:

Here's my encode of K19, which just finished 5 minutes ago. Look at the log, and see for yourself :D

Code:

=============================================================
ToK Log: F:\k19.avs
=============================================================
 
Resolution (fps):528x480 (23.976 fps)
Total Frames: 198673
Total Time  : 02:18:06
-------------------------------------------------------------

Audio Size: 116,004,000
Required Video Size: 703,196,000
 
Factor: 59.940
Desired Sample Size: 11,731,665
 
-------------------------------------------------------------
Prediction: 1st Group of Passes
-------------------------------------------------------------
 
Next CQ: 60.000. Sample Size: 11,224,219
Next CQ: 62.713. Sample Size: 11,510,670
Next CQ: 69.538. Sample Size: 12,969,194
Next CQ: 64.936. Sample Size: 12,690,139
Next CQ: 63.477. Sample Size: 12,087,731
Next CQ: 63.050. Sample Size: 11,783,381

Exit Condition: 0.500 % reached ! yahoo !
Tries  : 6
 

Final CQ: 63.050
Total Time For Predicition: 00:39:03

 
-------------------------------------------------------------
Encoding F:\k19.avs
-------------------------------------------------------------
 
Encoding... CQ : 63.050
Final Encoded Size: 700,419,197
Total Time (all operations): 05:44:29
 
Finished

A difference of 0.39% for a movie that is 138 minutes long :mrgreen: :mrgreen: :mrgreen:
Thanks again to Jellygoose for suggesting to change asharp to unfilter on the adaptive part of the script.
I'm updating the current script now. BTW, the settings I used for this movie are exactly as the screenshot above this post :!:

I'm uptating the

bigggt 06-26-2003 08:35 PM

Thats great Kwag :D ,just a quick question with the new change in the script do you think we will be able to go back to the faster prediction in tok or still use the longer one.

Thanx

ovg64 06-26-2003 09:16 PM

Hey Bigg, I just tried Kwags settings vs tenras Fast prediction

Quote:

kwags = 70.70% CQ
tenras = 70.61% CQ

pretty much close dont you think :idea:

kwag 06-26-2003 09:17 PM

Quote:

Originally Posted by bigggt
Thats great Kwag :D ,just a quick question with the new change in the script do you think we will be able to go back to the faster prediction in tok or still use the longer one.

Thanx

I'm doing a fast "Tenra's" CQ prediction right now to see what CQ it finds, and compare that to the CQ I got with the full prediction :)
I'll post the resulting CQ here in a while...

-kwag

bigggt 06-26-2003 09:23 PM

Yes ovg64,i think we all could live with that :lol:

Looks like it might be a good night :D

kwag 06-26-2003 09:44 PM

Quote:

Originally Posted by bigggt
Yes ovg64,i think we all could live with that :lol:

Looks like it might be a good night :D

YES IT IS :!: I'M GOING TO BUY SOME BEER :!: :mrgreen:

Code:

=============================================================
ToK Log: F:\k19.avs
=============================================================
 
Resolution (fps):528x480 (23.976 fps)
Total Frames: 198673
Total Time  : 02:18:06
-------------------------------------------------------------
 
Audio Size: 116,004,000
Required Video Size: 703,196,000
 
Factor: 59.940
Desired Sample Size: 11,731,665
 
-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------
 
Full Sample
Next CQ: 60.000. Sample Size: 11,224,219
Small Sample
Next CQ: 60.000. Sample Size: 1,038,416
Predicting...
Next CQ: 62.713. Sample Size: 11,465,075
Next CQ: 69.590. Sample Size: 12,583,578
Next CQ: 65.251. Sample Size: 12,401,976
Next CQ: 63.709. Sample Size: 12,001,579
Next CQ: 63.209. Sample Size: 11,747,168

Exit Condition: 0.500 % reached ! yahoo !
Tries  : 6
 

Final CQ: 63.209
Total Time For Predicition: 00:11:21

The script is now "FREEZED", and file prediction is again considered STABLE :!: :mrgreen:

-kwag


All times are GMT -5. The time now is 06:13 AM  —  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.