X-QuaSaT 1.6.11 (23.11.2012)

x264 Quality and Speed analyse Tool

coded by mogobime

--------------------------------------------------------------------------------

CONTACT:

send PM to "mogobime" @ www.selur.de



X-QuaSaT uses x264 which is under license of GPL:

http://www.gnu.org/licenses/gpl-2.0.html

Sourcecode:

http://www.videolan.org/developers/x264.html

--------------------------------------------------------------------------------



X-QuaSaT is a tool for automatic loop analysation of speed, quality and bitrate,

that different constellations of x264 settings result in. It shall help you to

find your optimal x264 settings.



The idea is to continuously let it raise the parameters of the x264-settings

-quantization

-reference-frames

-b-frames

-motion estimation

-Psychovisual rate distortion/trellis

in loop.



All of those settings can (if you want to, depends on your settings)

automatically be tested in all thinkable parameter-constellations with a

bunch of test-clips, you put in X-QuaSaT's "VIDEOFILES" folder.



It will create a statistic-file, that shows you the effects of the combinated

parameters to SSIM/PSNR, bitrate, encoding speed and effective usage of the

CPU.

It will build the average out of all used test clips and log every

parameter-constellation in one line.

You can also keep the temporary generated videos, to have a closer look on

some of them after having a look to the statistic file.



You can also keep the temporary generated videos, to have a closer look on

some of them after having a look to the statistic file.



Other configurable parameters are:

- Pixel motion

- Pixel search range

- Trellis quantization

- Encodingmode

- Adaptive quantization mode

- Adaptive quantization strength



Of course setting more parameters to "STEP" for looping, and using greater

ranges for stepping will let analysation time jump up!

(In theory thousands of constellations could be analysed...)

Use a few challenging test-clips of maybe 60-120 secs, anything else is

senseless!



X-QuaSaT tries to SAVE THE CURRENT STATE AFTER EVERY PROCESSED LOOP in

"system\recover.cfg" and if it crashes or you close, it starts in

"Recover Mode" next time, so you can continue where you stopped last time.

Use (Un)PauseMe.cmd to pause the script or save and continue later.



If the auto-tuning features are activated X-QuaSaT tries to boost ME and

MERANGE intelligent if cpuload is low because of ineffective REF/BFRAMES

constellations.

If so you don't loose encoding speed and get better quality at minimal filesize.

The same feature is available for trellis too, but trellis always raises

filesize a little in crf mode, so comparing is more difficult.



HOW IT WORKS:

All Test-Clips you put in "VIDEOFILES"-folder are analysed at once and from

that files the average of the following values is bulit:



AvgPSNR = Average PSNR

SSIM(db) = SSIM in db

FPS = Frames per second

BR = bitrate in kbit/s

BF_USED = How many B-frames were used in average

PF_USED = How many P-frames were used in average

IF_USED = How many I-frames were used in average

CPULOAD = the average CPU-load



Every parameter constellation is logged in one line in the

statistic output-file.





CONFIGURATION

_______________________________________________________________________________



--QUANTIZATION: [1-69]/[step]

Quantization factor of crf/qp ENCODINGMODE

[1-69] = used Quantizer / average Quantization strength.

Lower values results in better quality an greater filesize, higher

values results in smaller filesize but lower quality.

[step] = raise in steps as defined at QUANTLOOP parameters

--QUANTLOOP: [1-69 def=19] [1-68 def=1] [1-69 def=21]

QUANTIZATION loop-parameter

Type MIN_QUANT STEP_QUANT MAX_QUANT one behind the other, seperated by blanks

QUANTIZATION will be boosted in loop, starting with MIN_QUANT, raised by

STEP_QUANT until MAX_QUANT is reached. After that all starts over again until

all other ...LOOP-parameters you defined did the same and end.

_______________________________________________________________________________



--SUBME: [1-11]/[step]

Subpixel motion estimation and decision

[1-11] = set SUBME mode, higher is slower, but boosts quality

[step] = raise SUBME in steps as defined at SUBLOOP parameters

--SUBLOOP: [1-11 def=7] [1-10 def=1] [1-11 def=9]

SUBME loop-parameter

Type MIN_SUB STEP_SUB MAX_SUB one behind the other, seperated by blanks.

SUBME will be boosted in loop, starting with MIN_SUB, raised by

STEP_SUB until MAX_SUB is reached. After that all starts over again until

all other ...LOOP-parameters you defined did the same and end.

_______________________________________________________________________________



--PSY-RD: [0-10.00:0-10.00]/[step]

psychovisual rate distortion and decision / psychovisual trellis

[0-10.00:0-10.00] = First type parameter of psychovis. rate distortion and

decision, seperate by ":" and type parameter of

psychovisual trellis. Higher is better and slower.

[step] = raise in steps as defined at PSYRDLOOP/PSYTRLOOP paramaters

--PSYRDLOOP: [1-1000 default=0] [1-999 default=1] [1-1000 default=0]

PSY-RD LOOP-PARAMETER OF PSY RATE DIST. AND DECISION (NEEDS PSY-RD = step)

1 = 0.01 / 1000 = 10.00 here, don't type decimal points here!!!

Type MIN_PSYRD STEP_PSYRD MAX_PSYRD one behind the other, seperated by blanks

PSYRD (psychovis. rate dist. and dec.) will be boosted in loop, starting with

MIN_PSYRD, raised by STEP_PSYRD until MAX_PSYRD is reached. After that all

starts over again until all other ...LOOP-parameters you defined did the same

and end.

--PSYTRLOOP: [1-1000 def=0] [1-999 def=1] [1-1000 def=0]

PSY-RD LOOP-PARAMETER OF PSYCHOVISUAL TRELLIS (NEEDS PSY-RD = STEP)

1 = 0.01 / 1000 = 10.00 here, don't type decimal points here!!!

Type MIN_PSYTR STEP_PSYTR MAX_PSYTR one behind the other, seperated by blanks

PSYTR (psychovisual trellis) will be boosted in loop, starting with

MIN_PSYTR, raised by STEP_PSYTR until MAX_PSYTR is reached. After that all

starts over again until all other ...LOOP-parameters you defined did the same

and end.

_______________________________________________________________________________



--REFFRAMES: [1-16]/[step]

AMOUNT OF MAXIMUM USED REFERENCE FRAMES

[1-16] = The maximum amount of reference frames x264 can use per frame

[step] = Raise in steps as defined at REFLOOP parameters

--REFLOOP: [1-16 def=5] [1-15 def=1] [1-16 def=11]

REFFRAMES LOOP-PARAMETER (NEEDS REFFRAMES = STEP)

Type MIN_REF STEP_REF MAX_REF one behind the other, seperated by blanks.

REFFRAMES will be boosted in loop, starting with MIN_REF, raised by

STEP_REF until MAX_REF is reached. After that all starts over again until

all other ...LOOP-parameters you defined did the same and end.

_______________________________________________________________________________



--BFRAMES: [1-16]/[step]

AMOUNT OF CONSECUTIVE USED BFRAMES

[1-16] = The maximum amount of consecutive B-frames x264 can use

[step] = raise in steps as defined at BFLOOP parameters

--BFLOOP: [1-16 default=3] [1-15 default=1] [1-16 default=9]

REFFRAMES LOOP-PARAMETER (NEEDS REFFRAMES = STEP)

Type MIN_REF STEP_REF MAX_REF one behind the other, seperated by blanks.

REFFRAMES will be boosted in loop, starting with MIN_REF, raised by

STEP_REF until MAX_REF is reached. After that all starts over again until

all other ...LOOP-parameters you defined did the same and end.

_______________________________________________________________________________



--ENCODINGMODE: [qp/crf default=crf]

ENCODING MODE X264 WILL USE

[qp] = constant quantizer

[crf] = constant rate factor (recommended)

_______________________________________________________________________________



--ME: [auto/dia/hex/umh/esa/tesa default=auto]

PIXEL MOTION ESTIMATION METHOD

[auto] = switch from umh to esa at low cpu usage for optimal speed/quality

[dia] = diamond pixel motion estimation and desicion

[hex] = hexagonal pixel motion estimation and desicion

[umh] = uneven multi-hexagon pixel motion estimation and desicion

[esa] = exhaustive pixel motion estimation and desicion

[tesa] = hadamard pixel motion estimation and desicion

_______________________________________________________________________________



--MERANGE: [auto/8-512 default=auto]

MOTION VECTOR SEARCH RANGE

[auto] = boost from 24 to 32 at low cpu usage for optimal speed/quality

[8-512] = maximum motion vector search range x264 can use

_______________________________________________________________________________



--TRELLIS: [auto/0/1/2 default=0]

TRELLIS QUANTIZATION

[0] = deactivate trellis quantization

[1] = use trellis for I/P-frames only (not recommended)

[2] = use trellis always (not recommended for crf mode)

[auto] = boost trellis from 0 to 2 optimized for speed/quality

_______________________________________________________________________________



--AQ-MODE: [0/1/2 default=0]

ADAPTIVE QUANTIZATION MODE

[0] = deactivated adaptive quantization

[1] = manual adaptive quantization (SSIM Values may be unexactly)

(needs AQ-STRENGTH greater 0)

[2] = automatic adaptive quantization (SSIM Values may be unexactly)

(needs AQ-STRENGTH greater 0)

--AQ-STRENGTH: [0-2.0]

ADAPTIVE QUANTIZATION STRENGTH

[0-2.0] = higher strength = more usage of adaptive quantization

(greater 0 needs aq-mode greater 0)

_______________________________________________________________________________



--CPULOADTHRESHOLD: [0-10 default=5]

MAXIMUM CPULOAD TO START FILE ANALYSIS

[0-10] = Max. allowed CPU-load in percent before starting to analyse a file

to prevent wrong measurement of FPS/CPULOAD

_______________________________________________________________________________



--OUTPUTFORMAT: [tab/csv default=tab]

THE USED OUTPUT-FORMAT FOR STATISTIC-FILE

[tab] = statistic file as tabbed file

[csv] = statistic file as csv-table

_______________________________________________________________________________



--SAVETMPFILES: [on/off default=off]

SAVE TEMPORARY GENERATED VIDEO-FILES

[on] = save temporary generated videos for a closer look. They will get the

number of the job they were generated with, followed by filename.

(attention -> diskspace)

[off] = delete temporary video files