Quantcast DVDREasy: OPV in CCE - digitalFAQ.com Forums [Archives]
  #1  
05-21-2005, 07:21 PM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
DVDREasy method to find the optimal Q value for CCE is:

1) put all the right settings as normal multipass VBR and only change VBR(x passes) to OPV
2) estimate the first Q value – formula based on movie time ( if Q is bigger than 45 then Q=45)
3)encode 1% of the movie with avisynth command “SelectRangeEvery(1200,12)” and using the first Q
4)Based on file size of the 1% sample estimate the full movie size
5)Calculate the difference between estimated full movie size and wanted movie size
6)Calculate the new Q value until :
----a. The next Q is equal to the last Q
----b. Or % difference is < 1%

Although this is acceptable, I'm having feedback of users that the final size (after authoring) is a little undersized. The worse case is 4.06GB for the final size.

Incredible post the code to slicer :

Code:
function slicer(clip input, int percent, int Goplenght, int Gopmulti, string "ping") 
{ 
PercCount = (Framecount(input)/100)*percent 
period    = int(Framecount(input)/PercCount)*(Goplenght*Gopmulti) 
input=(ping == "pong") ? input.trim((period/2),Framecount(input)):input 
selectrangeevery(input, period, (Goplenght*Gopmulti)) 
}
I was wondering if using this method instead of a simple "selectrangeevery" could do a more accurate value (although the Q value in CCE is a integer)

@incredible,
Could you tell me what you think of it and explain why ?

Thanks!

Cheers,

DVDREasy
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
05-23-2005, 06:09 PM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Maybe i'm missing the point here . . .

I did a test in CCE with SLICER VS SelectRangeEvery() alone.

slicer(1,12,1,"ping") - result file size = 21.684K
selectrangeevery(1200,12) - result file size = 21.684K


Reply With Quote
  #3  
05-23-2005, 06:24 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dvdreasy
Maybe i'm missing the point here . . .

I did a test in CCE with SLICER VS SelectRangeEvery() alone.

slicer(1,12,1,"ping") - result file size = 21.684K
selectrangeevery(1200,12) - result file size = 21.684K


Maybe, this is not a surprise, as you set slicer to do a 1% lenght prediction, same as when you use selectrangeevery(1200,12) alone.
Better test would be to do 2 encodes with slicer function, one ping, one pong sum both quantizer values and divide by 2.
CQ value obtained will be from two 1% completely differents (ping and pong). You need to compare it, again 2 full encodes of both methods and see what of them is more accurate.
But, for logic reasons, slicer function would must to be more accurate.
In any case if non of both gives us a correct final size, with need of use of a correction factor, it would be enough with only selectrangeevery(1200,12) method.
Reply With Quote
  #4  
05-23-2005, 06:37 PM
dvdreasy dvdreasy is offline
Free Member
 
Join Date: May 2004
Location: Portugal
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks Prodater64,

I did a pong : slicer(1,12,1,"pong") - result file size = 22.220K

So, 1% is (21.684k + 22.220k) / 2 = 21.952K

Right ?
Reply With Quote
  #5  
05-23-2005, 06:52 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dvdreasy
So, 1% is (21.684k + 22.220k) / 2 = 21.952K
Right ?
Exactly my friend
__________________
Rui
Reply With Quote
  #6  
05-24-2005, 04:41 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Slicer has been build in its latest state for the following purposes:

a) no caluclation for a % based selctrangevery() needed slicer() does it internally - So U can force how long a slice will be (like GOP 12/15/1 and how much GOPs will one slice take (the Gop multiplier integer of slicer()).

b) Like already well explained by Prodater64 ... the Ping Pong Method where practically more of the movie will be predictioned WITHOUT setting more % or longer GOP lengths.

In the slicer() Thread I explained the purpose and really sense of slicer():






For your appl. te best would be...

1. Doing a Ping on x% ... The Result is A kb
2. Doing a Pong on x% ... The Result is B kb
3. Keep the Difference of A and B in mind as Value C. As this shows HOW much Pongs do differ from Pings on THAT Movie.
4. Based on C do compare the result with the wanted endfilesize
5. Do as much ONLY ping routines till the (calculate C out of these new Pings) does match the final wanted size.
6. Do a "safe"-Pong and again calc the Difference to the latest Ping. This should match the last wanted value - cause its a test Pong .
7. Now you have your C/CQ vaule needed for encoding.


But you dont need the avs Slicer. You just can use the math and let your appl. internally generate the needed "selectrangeevery(period,range)" line which will be added to the input avs or generated avs by your appl.

Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
New Version of DVDREasy! dvdreasy Video Encoding and Conversion 40 10-06-2006 02:43 PM
DVDREasy: HC settings? Adder Video Encoding and Conversion 1 09-25-2006 03:58 PM
DVDREasy and bitrateviewer Prodater64 Video Encoding and Conversion 7 06-24-2005 09:57 PM
DVDREasy: OPV in HC dvdreasy Video Encoding and Conversion 29 06-04-2005 09:10 PM
DVDREasy 0.2.0 dvdreasy Conversão e Codificação de Vídeo (Português) 2 05-18-2004 11:55 AM

Thread Tools



 
All times are GMT -5. The time now is 07:39 AM  —  vBulletin © Jelsoft Enterprises Ltd