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)

Krassi 06-25-2003 01:05 AM

Quote:

Originally Posted by audi2honda
length of 15 with samples/minute of 4 or more is painfully slow even on fast prediction. The first pass on my 1.8ghz machine was over 20 minutes 8O

Yes i know :roll: . But its the only way to test prediction, otherwhise the samples are too short and CQ is not precise enough.

kwag 06-25-2003 01:10 AM

@Krassi,

Were you using "Full" prediction, or were you using the fast 100/10 prediction :?:
Because I got innacurate results using the "fast" prediction :!:

-kwag

Krassi 06-25-2003 01:56 AM

Quote:

Originally Posted by kwag
@Krassi,

Were you using "Full" prediction, or were you using the fast 100/10 prediction :?:
Because I got innacurate results using the "fast" prediction :!:

-kwag

I'm using the faster one at the moment. I'll change to the old one after some more tests with the faster one.

kwag 06-25-2003 02:19 AM

Here is my result on "K19" with CQ=62.783 using full prediction.
Wanted file size: 699,875.78
Encoded final size: 679,501 :)
Prediction accuracy of ~2.9%

-kwag

audioslave 06-25-2003 03:55 AM

@kwag
Shouldn't we be able to correct this percent difference by setting the prediction factor to "1,02" instead of "1,00", and by using your previous settings for ToK prediction for the other parameters?
From what I've read about your previous encodes it seems the final encoded file always become ~2.5-3% smaller than predicted. That's why I'm wondering about changing the prediction factor to "1,02". So if we change the factor to "1,02" we should still have a small safety margin.

audi2honda 06-25-2003 04:08 AM

Quote:

Originally Posted by kwag
Here is my result on "K19" with CQ=62.783 using full prediction.
Wanted file size: 699,875.78
Encoded final size: 679,501 :)
Prediction accuracy of ~2.9%

-kwag

eh. will we ever get this right? I assume the reason for the inaccuracy is that the MA script is gaining sometimes huge and sometimes not compression savings on certain scenes depending on how much blur is applied.

Well unless the sampler happens to sample all those scenes the prediction will allways be off won't it? Unless we sample every single frame which isn't possible,

Without the MA script and staic filters relatively the same compression is applied to each frame, but now it's impossible to tell.

sigh :?

Boulder 06-25-2003 04:18 AM

The prediction isn't accurate even with a non-motion adaptive script. I've had correction factors ranging from 0,9 to 1,12 in my many encodes. (PAL in question :wink: )

Boulder 06-25-2003 05:53 AM

PAL in question again:

I just did some experimenting and noticed that if you set the max number of frames in GOP to 25, TMPGEnc still puts max 24 frames in it. This is probably because the 25. frame would be a P frame. If you use the automatic sample size in ToK, it will take 25-frame samples but you'll encode 24 frames in GOP at maximum when you do the final encode (and also in the sample encode).

Maybe this is the thing screwing the PAL prediction up?

audioslave 06-25-2003 06:09 AM

@Boulder
Does TMPGEnc encode PAL movies with 24 GOP even if you run it through ToK? That could be a reason why it's so hard to predict PAL mvies, as you said :wink: !
Maybe there's a way of configuring the video.en1 file so the GOP will be correct for PAL? I don't know...

Boulder 06-25-2003 08:01 AM

TMPGEnc encodes 24-frame GOPs even if you use it manually. You can see this yourself, set the max number of frames in GOP to 25 and encode a clip. Open the encoding log while encoding and you'll see that the last frame in a GOP is a B frame most of the time whereas it should be a P frame if the GOP was 25 frames long. Bitrate Viewer will also tell that the GOPs are 24 frames long. Scene changes are different, of course.

Krassi 06-25-2003 08:21 AM

Quote:

Originally Posted by Boulder
TMPGEnc encodes 24-frame GOPs even if you use it manually. You can see this yourself, set the max number of frames in GOP to 25 and encode a clip. Open the encoding log while encoding and you'll see that the last frame in a GOP is a B frame most of the time whereas it should be a P frame if the GOP was 25 frames long. Bitrate Viewer will also tell that the GOPs are 24 frames long. Scene changes are different, of course.

Yep, you're right 8O . TmpGEnc settings have GOP's of 25, Bitrate Viewer shows 24....
Thats really a strange thing :cry: .

Jellygoose 06-25-2003 09:19 AM

Prediction for PAL is very accurate for me using 24 samples instead of 25 in ToK with a factor of 1.01 and 0.5% precision. :D
I actually always predicted that way, and never had any problems with it...

J-Wo 06-25-2003 09:20 AM

Here are my results for encoding Superstar. The movie was only 1:21:46 long so I set ToK to run 2 samples per minute.

New Faster Prediction (factor 1.00)
Final CQ: 63.556
Required Video Size: 740,688,000
Encoded Video Size: 727,075,060 = 1.8% difference

Full Prediction (factor 1.00, 0.5% precision)
Final CQ: 63.509
Required Video Size: 740,688,000
Encoded Video Size: 724,292,701 = 2.2% difference

Full Prediction (factor 1.00, 1.0% precision)
Final CQ: 63.441
Required Video Size: 740,688,000
Encoded Video Size: 720,945,475 = 2.7% difference

New Faster Prediction (factor 1.03)
Final CQ: 63.813
Required Video Size: 762,909,111
Encoded Video Size: 738,346,386 = 3.2% difference

The reason I did another encode at factor 1.03 is that I like to overburn my discs to squeeze just a biiiiit higher CQ in my encodes. The mpgs at factor 1.00 would all fit perfectly on an 80 min cd, the one at 1.03 just barely requiring overburning. However knowing my CD burner well I know I could've squeezed another 14 megs or so onto my video size. But I guess that's a bit unimportant at this point... :)

So my conclusion? I'm having no problems with the faster prediction! I'm not sure where you're getting problems Kwag. And a factor between 1.0 and 1.03 seems to work for me. At least on this movie.

"....and so it begins."

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

oh, just an addendum to my previous post... I tried DVD2AVI v1.77.3 after reading one of Kwag's post saying to use that with the new avs 2.52 or something, but it didn't seem to work with GripCrop. I didn't bother to try excluding GripCrop because I wasn't quite sure where to put the AddBorders line (ever since the scripts got updated that line is gone!). so I went back to v1.76 and everything worked fine.

audi2honda 06-25-2003 09:34 AM

Quote:

Originally Posted by J-Wo
New Faster Prediction (factor 1.03)
Final CQ: 63.813
Required Video Size: 762,909,111
Encoded Video Size: 738,346,386 = 3.2% difference

So my conclusion? I'm having no problems with the faster prediction! I'm not sure where you're getting problems Kwag. And a factor between 1.0 and 1.03 seems to work for me. At least on this movie.

"....and so it begins."

I don't understand. You are happy with 3.2% short? that's a lot of wasted space. That also seems to be your worse result.

Here are my results.

factor 1.0 .5% precision (Movie is 2 hours and 32 minutes long on 2 CDs. 'The Firm')
Final CQ: 71.379
Required Video Size: 1,492,749,184
Final Encoded Size: 1,458,146,800 = 2.3% short of target.

I'm going to try a factor of 1.01 today, but the thing is if it works for this movie why would it work with any other?

For a movie of this length and a 2CD encode I guess I'm happy with 2.3%, but I'm gonna keep testing to help everyone figure this out.

J-Wo 06-25-2003 09:44 AM

Quote:

Originally Posted by audi2honda
I don't understand. You are happy with 3.2% short? that's a lot of wasted space. That also seems to be your worse result.

Well I don't care so much for how short I am but rather what my final video size is. The accuracy at factor 1.00 with the faster prediction was spot on, that is if I wanted it to fit perfectly on an 80min cd. But I like to overburn, so I generally have to raise my prediction factor a bit, and in this case 1.03 gave me my desired result.

audioslave 06-25-2003 09:49 AM

@Boulder
Would it help to use a shorter GOP for PAL movies to get correct prediction? I've read about the shorter values for the GOP's for the different types of movies (NTSCFilm, PAL, NTSC) but I can't remember where. Could someone please post them?

Boulder 06-25-2003 09:59 AM

Quote:

Originally Posted by audioslave
@Boulder
Would it help to use a shorter GOP for PAL movies to get correct prediction? I've read about the shorter values for the GOP's for the different types of movies (NTSCFilm, PAL, NTSC) but I can't remember where. Could someone please post them?

I'm not sure if that would be worth it. We did experiment with different GOP sizes when the last revolution was introduced (=the current GOP) and shorter GOP lengths often produced lower quality encodes. I think that the 24-frame GOP is the sweet spot, at least for the quantization matrix and filtering technique that's currently available. I think that this all was in the same more-than-40-page long thread but some of that stuff has been deleted - the thread would probably be a hundred pages long if it hadn't been compressed to contain only the essential facts.

I'd say that the main target is to get a steady prediction for the current templates. There is a formula for that, no one's just figured it out yet :wink: I think the time has come that we called the Canadian wizard back to the game..you all probably know who I'm talking about 8)

audioslave 06-25-2003 10:04 AM

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

Boulder 06-25-2003 10:59 AM

Yep, that's what I'd recommend.


All times are GMT -5. The time now is 11:30 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.