digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   HCenc: Q prediction with hc? (http://www.digitalfaq.com/archives/encode/13469-hcenc-prediction-hc.html)

SILK 04-27-2005 07:13 AM

q prediction with hc?
 
how can i make a q prediction with this encoder?

thanks

Boulder 04-27-2005 10:17 AM

Just like we used to when there were no automatic tools. See the prediction forum.

SILK 04-27-2005 10:56 AM

are you talking about this topic?

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

Boulder 04-27-2005 11:01 AM

That one for example. It'll give you the basics.

Encoder Master 05-13-2005 07:52 AM

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. :wink:

incredible 05-13-2005 10:19 AM

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. ;)

Encoder Master 05-13-2005 11:17 AM

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. :D

Prodater64 05-13-2005 12:38 PM

It could not be better a sampler() avs sample?

incredible 05-13-2005 01:51 PM

I do not understand?
Which kind of sample? A sample script using sampler() ?

Prodater64 05-13-2005 01:58 PM

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.

Dialhot 05-13-2005 02:16 PM

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.

Encoder Master 05-18-2005 01:34 PM

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.

Prodater64 05-18-2005 01:59 PM

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.

Boulder 05-18-2005 02:01 PM

Try SelectRangeEvery(300,15) or (500,15) instead of Sampler.

Prodater64 05-18-2005 02:15 PM

Quote:

Originally Posted by Boulder
Try SelectRangeEvery(300,15) or (500,15) instead of Sampler.

Could you explain me the difference, please?

Boulder 05-18-2005 03:17 PM

(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.

incredible 05-18-2005 05:12 PM

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

:wink:

Prodater64 05-23-2005 01:56 AM

Why it don't worked with sampler()?

@Inc: I like this new slicer function much more that your original one.

rds_correia 05-23-2005 04:19 AM

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

:wink:

Hi Andrej :D,
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

Prodater64 05-23-2005 05:12 AM

This filter is available starting from v2.5.


All times are GMT -5. The time now is 02:29 PM  —  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.