digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Prediction with divx files? (http://www.digitalfaq.com/archives/encode/5451-prediction-divx-files.html)

J-Wo 09-07-2003 10:48 PM

Prediction with divx files?
 
Okay topic pretty much states it all. I think we need to figure this one out! Even though Kwag says v1.2.00 of CQMatic works fine for AVIs, I have yet to get consistently accurate prediction using it. Let's share our experiences for the settings used between CQMatic and ToK and hopefully we can solve this once and for all!

So far I've been using ToK for all my divx encodes, no matter the resolution. I set min/max bitrate to 300/2500 and I'm using girv's optimal script. But I only seem to be getting accurate predictions maybe 30-40% of the time. Other times it's waaaaay off. Anyone else?

Please include as much detail as possible when posting your prediction methods please. Thanks!

kwag 09-07-2003 11:12 PM

Hi J-Wo,

It's impossible to achieve 100% CQ accuracy, even with a manual method, because the media is only sampled in small parts. To achieve close to 100% precision, and if CQ curve was linear, we would have to sample (encode) the complete movie once, which renders CQ prediction useless, because of the time to achieve the result :!:
There's just no way around it. Remember that we are just talking an average of the complete movie. If the movie sampled is well balanced, that is, the action is well distributed througout the movie, then CQMatic will do an excelent job ( and Tok too! )
But when you get a movie where the samples taken missed key action parts, etc., then that's when you see the failures. As I posted on another topic, what I do is that I predict with audio set to 128Kbps. Then if the movie is over target, I encode at 112Kpbs. If the movie is under target, I encode at 160Kbps.

-kwag

Reno 09-08-2003 02:52 AM

Kwag, is their a way to change the settings in sampler during manual prediction that has it sample, say, double the amount of material? This would really improve accuracy (not that I'm complaining - my prediction method's sloppiest encode so far muxed @ 795mb)...

Edlund 09-08-2003 04:22 AM

Reno, you can do this with ToK. Set in "Prediction"-section the "number of samoles per minute" to a higher number.

Reno 09-08-2003 06:01 AM

Yeah, but ToK does lousy predictions. I want to do it manually.

Dialhot 09-08-2003 06:42 AM

Yes you can modify the length of the sample with "sampler".
See the documentation on the site on sansgrip:

http://www.jungleweb.net/~sansgrip/avisynth/

(or in the original zipfile of sampler.dll).

Reno 09-08-2003 11:19 PM

So, just multiply the number of minutes in the source by two?

So, say my movie is one hour and 45 minutes long...

sampler(sample=210, length=24)

This will double the number of samples?

Dialhot 09-09-2003 04:36 AM

yes !

Reno 09-09-2003 11:58 PM

Thanks, DH!!

ChiefOBrei 09-10-2003 10:11 AM

Hi,

I did some testing regarding file prediction of CQ Magic. I have tested both versions of the optimal scripts.

Version 1:

Target file size: 368848 KB
Avg bitrate: 1159
Max bitrate: 2500
Min Bitrate: 300

File size of the encoded movie: 348880 KB :(

Then I changed the min bitrate to 0.57 avg bitrate (660)

File size of the encoded movie: 362723 KB :lol:

Version 2:

Target file size: 368848 KB
Avg bitrate: 1159
Max bitrate: 2500
Min Bitrate: 300

File size of the encoded movie: 354080 KB :(

Then I changed the min bitrate to 0.57 avg bitrate (660)

File size of the encoded movie: 365623 KB :lol:

I did this testing on one divx file only. But according to this testing it makes sense to increase the min bitrate to get better prediction results.

Which settings are you guys using?

ChiefOBrei 8)

Dialhot 09-10-2003 10:16 AM

Quote:

Originally Posted by ChiefOBrei
But according to this testing it makes sense to increase the min bitrate to get better prediction results.

Yes, that is the purpose of this wise recommandation done by Kwag :-D

Note: can you tell us what were the CQ used by both version ? That is a very important information.

ChiefOBrei 09-11-2003 12:38 AM

Hi,

the following CQ were predicted by CQ Magic:

Version 1: CQ 78,81 (encoded sample size 16,7 MB)
Version 2: CQ 77,84 (encoded sample size 16,9 MB)

ChiefOBrei 8)

J-Wo 09-11-2003 01:28 AM

Great report Chief! I'll see if I can reproduce similar results. Can you tell me if you noticed any visual diff between v1 and v2? How about time to encode? P.S. you got a duplicate post there, might want to delete one of them.

Dialhot 09-11-2003 04:43 AM

Quote:

Originally Posted by J-Wo
Can you tell me if you noticed any visual diff between v1 and v2? How about time to encode?

v1 is (for me) far better. And as I guessed the CQ is higher for lower sample file size. Yeah :ole:

Quote:

P.S. you got a duplicate post there, might want to delete one of them.
Removed ;-)

ChiefOBrei 09-11-2003 09:23 AM

Hi,

@ Dialhot. Thanks that you have removed my duplicated post. :lol:

Version 2 is a little bit faster (around 3.8 % faster). But I do not use Grip Resize in the version 2 because I had problems with Grip Resize and the MA script. Maybe this has also a influence. I will test this later.

The visual quality is almost the same. The qualtity of Version 1 is a little bit better.

What it also is interesting that the settings of the Divx decoder has a big influence of the CQ value.

This test was done with Version 2:

quality level: min
CQ: 76.10
time for one prediction phase: 5.65 min
prediction cycle: 3

quality level: 3
CQ: 77.85
time for one prediction phase: 5.80 min
prediction cycle: 5

quality level: max
CQ: 78.83
time for one prediction phase: 6.15 min
prediction cycle: 8

I do not know if this a good idea to filter twice.

ChiefOBrei 8)

Dialhot 09-11-2003 11:54 AM

Quote:

Originally Posted by ChiefOBrei
But I do not use Grip Resize in the version 2 because I had problems with Grip Resize and the MA script.

What are you talking about ? There is no MA optimal script for Divx. We are talking about scripts that are there :

http://www.kvcd.net/forum/viewtopic.php?t=6068

Quote:

What it also is interesting that the settings of the Divx decoder has a big influence of the CQ value.
For sure, but take a look to what I said there :

http://www.kvcd.net/forum/viewtopic.php?t=6173

Quote:

I do not know if this a good idea to filter twice.
And now you know that is not. :-)

ChiefOBrei 09-11-2003 01:09 PM

Hi,

@ Dialhot: I have used the Divx scripts. But I had problems with the MA script and gripsize. Therefore I have changed the script to use the internal avisynth resize functions to avoid the same problems. :)

Ok, now I am smarter und switch off the decoder build in filters :lightbulb:
I have updated to Divx 5.1 this morning. This decoder sets automatically the filter to a different default value and then i had different CQ values on the same file then yesterday.

Thanks!

ChiefOBrei 8)

Wolfi 09-11-2003 02:52 PM

Were can you do that update :?:

//Wolfi

ChiefOBrei 09-12-2003 02:17 AM

Hi Wolfi,

you can get this update @ http://www.divx.com/divx/

ChiefOBrei 8)

Dialhot 09-12-2003 03:36 AM

Quote:

Originally Posted by ChiefOBrei
@ Dialhot: I have used the Divx scripts. But I had problems with the MA script and gripsize.

There is NO MA script for Divx. That's the second time I read this and I really don't know what people are talking about.

Quote:

I have updated to Divx 5.1 this morning. This decoder sets automatically the filter to a different default value and then i had different CQ values on the same file then yesterday.
Turn every post process to "minimal". I don't try 5.1 yet but it was like this on all previous version.


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