Quantcast HCEnc: Q Prediction with HC? - digitalFAQ.com Forums [Archives]
  #1  
04-27-2005, 07:13 AM
SILK SILK is offline
Free Member
 
Join Date: May 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
how can i make a q prediction with this encoder?

thanks
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  
04-27-2005, 10:17 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Just like we used to when there were no automatic tools. See the prediction forum.
Reply With Quote
  #3  
04-27-2005, 10:56 AM
SILK SILK is offline
Free Member
 
Join Date: May 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
are you talking about this topic?

http://www.kvcd.net/forum/viewtopic.php?t=2102
Reply With Quote
  #4  
04-27-2005, 11:01 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
That one for example. It'll give you the basics.
Reply With Quote
  #5  
05-13-2005, 07:52 AM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
For CQ prediction you can take a sample of your movie. Perhaps 10 minutes. Then encode it with your settings in HCE with 2pass. After encoding look at the produced log file and see the quantisation level. You take this value and encode this sample with CQ and this value of 2pass and you can see you got the average Bitrate like 2pass encoding. I've tested this method and the encoder gives me only 10kbps to big or to small movies. On my first test I got with 2pass a value of 2500Kbps and with this method and CQ 2499Kbps. I think this is very good.
Hope this can help you.
Reply With Quote
  #6  
05-13-2005, 10:19 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
Quote:
Originally Posted by Encoder Master
For CQ prediction you can take a sample of your movie. Perhaps 10 minutes. Then encode it with your settings in HCE with 2pass. After encoding look at the produced log file and see the quantisation level.
Thats a nice trick!, except that these 10 Minutes should be a mix out of the whole movie frame range (yep you know, but maybe not him). Also you should use pieces (within the 10mins) each in a lenght of your later encoding Gop Length interval (!). Also do trim()-Out the Intro & Ending credits (at least in a safe prediction turn).


I ever wondered why TmpgEnc or Quenc/Nuenc don't use float Quantizer Values for Q/CQ encoding settings like HCEnc does instead of these Integer Values from 0-100 for instance.
Reply With Quote
  #7  
05-13-2005, 11:17 AM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Thats a nice trick!, except that these 10 Minutes should be a mix out of the whole movie frame range (yep you know, but maybe not him). Also you should use pieces (within the 10mins) each in a lenght of your later encoding Gop Length interval (!). Also do trim()-Out the Intro & Ending credits (at least in a safe prediction turn).
Yes, that's correct although O think the end credits are important because they "eat" a lot of bitrate.
But if you do this thinks then is this method very good and exact.
Reply With Quote
  #8  
05-13-2005, 12:38 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
It could not be better a sampler() avs sample?
Reply With Quote
  #9  
05-13-2005, 01:51 PM
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
I do not understand?
Which kind of sample? A sample script using sampler() ?
Reply With Quote
  #10  
05-13-2005, 01:58 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 incredible
I do not understand?
Which kind of sample? A sample script using sampler() ?
Yes.
In this way it takes pieces of the whole film, and not a single lineal 10 minutes sample.
If Im not wrong, Sampler(300,50) takes 300 x 2'' samples, 10' for PAL and a little bit more for NTSC.
Reply With Quote
  #11  
05-13-2005, 02:16 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
The purpose of Sampler() IS to provide a more or less representative reflect of what composes the movie. So yes, if you need to use a part of the source as sample, it's better to use a "Samplered" one.
Reply With Quote
  #12  
05-18-2005, 01:34 PM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
For my encodes I used the integrate sampler function of AviSynth with a lengh of 15 for example like the GOP lengh of my video. And this seems to be very good.
Reply With Quote
  #13  
05-18-2005, 01:59 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
First 3 tries, same movie:

1 - With sampler(150,50), it is to say 5 minutes total time (2 seconds each cut).
2 - With sampler(300,50), it is to say 10 minutes total time (2 seconds each cut).
3 - With trim(7501,22500), it is to say 10 minutes (only one 10 minutes sample).

Three encodes oversized.
Reply With Quote
  #14  
05-18-2005, 02:01 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Try SelectRangeEvery(300,15) or (500,15) instead of Sampler.
Reply With Quote
  #15  
05-18-2005, 02:15 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 Boulder
Try SelectRangeEvery(300,15) or (500,15) instead of Sampler.
Could you explain me the difference, please?
Reply With Quote
  #16  
05-18-2005, 03:17 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
(300,15) creates a 5% sample, 15 frames per slice and (500,15) creates a 3% one. In fact, Tylo has said that even a 1% sample should be enough (that's SelectRangeEvery(1500,15)).

I've mostly undersized so I adjust the prediction by adding 3% to the desired sample size. This is with CCEFront which uses the SelectRangeEvery method.
Reply With Quote
  #17  
05-18-2005, 05:12 PM
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
Or try my latest update of 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))
}
Usage:
slicer(2,15,1,"ping")

2= 2% to be predictioned of the whole movie
15 = Length of the GOP in frames of the later Encoding
1 = GOP Lenght multiplier (for longer slices)
"Ping" = A Ping will be done

"Pong" would mean a Pong would be done WHERE the offset is done automatically by the function internally. The offset is calculated so the pong prediction samples exactly between the ping slices.

Advantage of the update:
a) Much shorter function
b) Pong Offset is set automatically
c) No more Sampler.dll needed ... this will be done by avs's internal Selectrangeevery() routine

Reply With Quote
  #18  
05-23-2005, 01:56 AM
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
Why it don't worked with sampler()?

@Inc: I like this new slicer function much more that your original one.
Reply With Quote
  #19  
05-23-2005, 04:19 AM
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 incredible
Or try my latest update of slicer() :
...
c) No more Sampler.dll needed ... this will be done by avs's internal Selectrangeevery() routine

Hi Andrej ,
Again you amaze us with your nice and usefull functions.
Slicer has always been one of my favorites.
IMHO it is a must if you want filesize prediction.
So Andrej, I haven't checked yet, but please don't forget to update Slicer's original thread with this new code
Anyway will this work with any AviSynth version 2.5.x or just the latest 2.5.5?
Cheers buddy
__________________
Rui
Reply With Quote
  #20  
05-23-2005, 05:12 AM
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
This filter is available starting from v2.5.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
HCenc: HC Encoder 0.25 tengo6dedos Video Encoding and Conversion 0 10-18-2010 08:59 AM
HCEnc 0.22.1 released? Dialhot Video Encoding and Conversion 2 03-28-2008 07:28 PM
Ping-pong prediction vs Long-short prediction Abond Avisynth Scripting 136 07-05-2005 02:13 PM
HCenc: Hc.ini for DVD-RB? audioslave Video Encoding and Conversion 2 04-25-2005 12:40 PM
HCenc: HC 0.12 fabrice Video Encoding and Conversion 0 03-29-2005 02:09 PM

Thread Tools



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