View Full Version : Matrices
COREiP
9th April 2005, 03:05
I Haven't played much around with matrices. One thing I noticed is that different matrices give different results at different bitrates in general. My question is which matrices performs best for the following scenarios:
Movies:
@ very low bitrates: 200kbps and lower
@ low bitrates: 400-200kbps
@ low-med bitrates: 400-600kbps
@ med bitrates: 600-800kbpskbps
@ med-high bitrates: 800-1000kbps
@ high bitrates: 1000-1200kbps
@ HD High bitrates: 2000-4000kbps
Anime:
@ low-med bitrates: 400-600kbps
@ med bitrates: 600-800kbps
@ high bitrates: 1000-1200kbps
Kagura
9th April 2005, 04:18
Movie matrices have developed so quickly that it's been hard for me to keep track of them all.
A few good ones I've been hearing about are:
EQM (or whatever is on sharktooth's profile)
HVS series
Jawor (and derivatives)
Didée's 6of9 (HVS extension or not)
Even MPEG got a vote from Koepi IIRC
*shrug* Other people undoubtedly have more knowledge about when to use those than I.
For anime, h.263 is the only one to use. All the time.
Poutnik
9th April 2005, 07:58
high/low bitrate case depends on target resolution too.
Imagine yourself 800 kb/s at 352*288 and 2000 kb/s at 720*576.
Note that 800 is higher then 2000 in this case,
having greater bits per pixel ratio.(BPP)
And more complications - source compressibility:
Lets assume constant quantisizer ( I never know right spelling :) )
for right comparisons:
Low BPP values can be reached even with high bitrates matrices ( or matrixes?) for well compressible source (low motion/details scenes as comedies, soap operas, cartoons )
On the other hand:
High BPP values can be reached even with low bitrates matrices for bad compressible sources (high motion/details scenes - sport, nature)
So, I think ONE of approaches is
(( anybody feel free to correct me, but do not shut me, I am advanced beginner only :) ) :
1) you have give size, time and resolution, so calculate yourself
target avg bitrate ( XviD calc for 2nd pass)
2) you can optionally calculate BPP ratio too. e.g. 0.1 bits/pixel
is very low, 0,3 is very high
3) for test purpose choose one pass constant Q encoding
4) choose constant quantizer Q2
5) Set other XviD setting as for final encoding
6) do initial test, e.g. with standard MPEG. Have XviD status window
allowed.
7) if (avg bitrate) > (target bitrate) * 2 (1.5-2.5?) then it is time to try lower bitrate matrices
8) if (avg bitrate) <= (target bitrate) ( maybe <1.1) then it is time to try higher bitrate matrices
another approach could be to use Q3 for testing, especially with high bitrate ones. I could be good for Q3 1st pass encoding ( zone settings ) with 1st pass bitrate close to 2nd pass final bitrate.
4a) choose constant quantizer Q3
5a) Set other XviD setting as for final encoding
6a) do initial test, e.g. with standard MPEG. Have XviD status window
allowed.
7a) if (avg bitrate) > (target bitrate) then it is time to try lower bitrate matrices
8a) if (avg bitrate) < 0,5 *(target bitrate) then it is time to try higher bitrate matrices
I know there are some tools to help choose proper encoding,
but I did not use any yet to can advice.
Sharktooth
9th April 2005, 14:39
My matrices are in my signature.
However as Poutnik said there are a lot of factors that may influence the choice of a particular quant matrix.
It's obviously wrong to call them high-bitrate, low-bitrate etc... but most ppl is used with those "labels".
However there is no exact way to choose a matrix without doing a compressibility test (something like poutnik described in his post) at a constant quantizer and with fixed parameters (resolution, codec options, filters etc.).
For example you compress your movie (or part of it) at quantizer 2 (or 3) with the final parameters you are going to use for the final encode (including quant matrix).
Then look at the size of the compressed file (or clip) and if it is too big then a lower bitrate matrix is needed. If it's too small then choose a higher bitrate matrix.
In the case you get something like:
desired size = 700MB
Matrix xyz size = 900MB
Matrix abc size = 600MB
If you would like to keep the resolution you choosen, the xyz matrix is the right choice. The reason is abc matrix is saturated at 600MB and the resulting quality will be suboptimal.
The matrix xyz produces a file size near the desired size and the 2-passes ratecontrol will spare bits where needed without hitting too much the final quality.
Eventually you could add a sharpen filter and redo the compressibility test. if the abc matrix reaches 700+Mb then maybe it's worth trying it.
However when you're satisfied with the results you can procede with a 2-pass encoding to hit your desired filesize.
tedgo
9th April 2005, 15:54
Wow, a thread about matrices!
So i will add my question too :)
I encode my movies with single pass quant 2 and the following settings differing from the deafult:
Adaptive Quantization: On (on such bitrate there are no visible artifacts but lowers the bitrate up to 10%)
Max. consec. B-VOPs: 1
B-VOP quantizer ratio: 1.00
Packed Bitstream: Off
Chroma optimizer enabled: On
Use VHQ for bframes too: On
I love the soft, clear, nearly 3d-like image h263 produces but hate its annoying affectation to produce blocking artifacts still at that high bitrates resulted by quant 2.
Now my question:
Is there any matrix that gives me the same clear image like h263 but without blocking artifacts?
Btw. i used MPEG Matrix earlier but it often produced a slight "flickering" when used with b-vops and i prefer a softer image (the same reason i never use QPel). That for i prefer h263.
Sharktooth
9th April 2005, 20:01
1st, having bframes quant ratio at 1 is BAD. Disabling b-frames is better than setting the bframes quant ratio at 1.
Keeping the standard quantizer ratio at 1.5 is first step to do.
2nd, enable packet bitstream if you want to edit/cut or play the encoded file in a standalone player...
3rd, h263 is not a matrix. It's a quantization type (a way to quantize). There are no matrices that can reproduce what h.263 quant type does.
However you can try different soft matrices for different bitrate/resolution/compressibility and choose the one you like more.
tedgo
9th April 2005, 20:13
1.) No, sorry, i did some tests and setting the quantizer ratio to 1.00 has been the best choice for me. Disabling b-vops increases the bitrate for about 10-20% without any real visual improvement.
Stayed on the default ratio 1.50 causes too much blocking artifacts with h263 quantization on b-vops and flickering (caused by sharp p-vops and smooth b-vops) with the mpeg matrix or other sharp matrices.
2.) I don't want to play the files on standalones and mux my video in MKV. Edit/cut the video isn't desired so i don't have the need to use packed bitstream.
3.) I know that h263 is a quantization and not a matrix. But i'm searching for a matrix that is able to "look" like h263 without the blocking artifacts.
However you can try different soft matrices for different bitrate/resolution/compressibility and choose the one you like more.
Yes, but i don't know which matrices from the hundreds of them around the net are "soft styled" (from my experience with some matrices i know most of them are tuned to get a sharp and very detailed image).
Any recommendation?
Didée
9th April 2005, 20:35
@ Sharktooth:
tedgo told his settings different from default. Ratio=1, but still Offset=1 gives P=2/P=3. Not a bad choice for high quality q2 encoding ... I like to use B = P+1 myself too, at times. Just with a different matrix, guess which ;)
@ tedgo:
To get a picture that is similar soft as h263 is, I'd rather use some light filtering. E.g. MergeLuma(blur(1.58),0.15) is a very fast trick working not too bad.
Blue_MiSfit
9th April 2005, 20:41
I've gotten very nice results with Y.A.C.Q.M. for animated sources.
Here it is...
tedgo
9th April 2005, 20:53
@didée
I tried with "TemporalSoften(2,4,4,8,2)" until now and "Convolution3d("moviehq")" too but its not really what i liked...
I'll try your recommendation with "MergeLuma...".
But i don't want a "washed out" image, only a soft one :D
Will see... ;)
Thank you.
@Blue_MiSfit
I'll try this matrix, thanks.
EDIT: There is still no link in your post, but i still have the YACQM.cqm in a qmatrix-package.
But are there any other recommendations for a soft but not "washed" image to let me compare some of them?
Sharktooth
9th April 2005, 21:08
Originally posted by Didée
@ Sharktooth:
tedgo told his settings different from default. Ratio=1, but still Offset=1 gives P=2/P=3. Not a bad choice for high quality q2 encoding ... I like to use B = P+1 myself too, at times. Just with a different matrix, guess which ;)
I forgot the offset is set to 1 by default, then yes, it's good for Q2.
@tedgo: you can use filters (as didée already said) with any matrix to get a "smoothed" image. It's just a matter of using the right ones.
However there are several smooth matrices. They are usually the "so called" low bitrate ones. But there are also high bitrate matrices with particular coefficients distribuition that produce a "smooth" image.
But if you're looking for a matrix for animated content (IMHO) there's nothing better than h.263.
tedgo
9th April 2005, 21:23
Oh no, i'm looking for a matrix for normal film, not animated content.
I have downloaded a so-called "qmatrix"-package with 61 matrices (yours encluded), but i've no idea which of them will produce such a smooth image and i fear, i have not the time to test them all ;)
Therefore i asked for specified matrices.
But i'll try your low bitrate matrices too.
Btw. maybe a sharper image without the annoying affectation of flickering (like mpeg-matrix does) would be another good choice for me. I think i will spent more time on testing all 61 matrices (oh my god... :D )
Sharktooth
10th April 2005, 01:40
Uhm, maybe EQM V2 (or EQM AutoGK sharpmatrix - it's the same matrix) will please you.
BTW it produces bigger files than h.263 at constant quant.
COREiP
10th April 2005, 02:18
Can someone explain how does Quantesizer ratio and Quantesizer offset affect the quality and what are the best values for bitrates 800-1000kbps. I always used the default values.
*.mp4 guy
10th April 2005, 04:44
You could try my smooth matrix. Ive been quite pleased with it, note however that it is usually more compressible than h263 quantisization.
8,16,23,39,41,42,43,44
16,19,36,39,40,41,42,45
23,36,38,39,40,41,43,46
39,39,39,40,41,42,43,47
41,40,40,41,42,42,45,48
42,41,41,42,42,43,43,62
43,42,43,43,45,43,57,86
44,45,46,47,48,62,86,138
13,14,17,20,27,32,34,35
14,15,22,29,34,36,37,36
17,22,29,34,36,37,38,36
20,29,34,36,37,38,39,44
27,34,36,37,38,39,48,61
32,36,37,38,39,48,64,72
34,37,38,39,48,64,77,83
35,36,36,44,61,72,83,88
rename this to .xcm (http://x2.putfile.com/4/9822440387.png)
h263 quantisization~500kbps (http://x100.putfile.com/videos/9900124990.avi)
Sm V4~500kbps (http://x100.putfile.com/videos/9900175787.avi)
tedgo
10th April 2005, 10:51
Thanks you guys, i'll try your proposals today.
@COREiP
The quantizer ratio multiplies the average quantizer of the p-vop before and after the b-vop.
The quantizer offset will be added to the quantizer resulted by the quantizer ratio.
Example:
p-vop before b-vop: 3
p-vop after b-vop: 5
average p-vop: (3 + 5) / 2 = 4
You will get a b-vop quantizer of:
(average p-vop * quantizer ratio) + quantizer offset = b-vop quantizer
or in this example (with default b-vop settings):
(4 * 1.50) + 1.00 = 7
And for your desired bitrate i would stay on the default settings.
Perhaps you could try to set both, quantizer ratio and quantizer offset to 1.25 and set the "max. consecutive b-vops" to 3 (but normally it would even result in 2).
Better you try for yourself in according to the material you want to encode.
Sharktooth
10th April 2005, 19:42
Originally posted by *.mp4 guy
You could try my smooth matrix. Ive been quite pleased with it, note however that it is usually more compressible than h263 quantisization.
8,16,23,39,41,42,43,44
16,19,36,39,40,41,42,45
23,36,38,39,40,41,43,46
39,39,39,40,41,42,43,47
41,40,40,41,42,42,45,48
42,41,41,42,42,43,43,62
43,42,43,43,45,43,57,86
44,45,46,47,48,62,86,138
13,14,17,20,27,32,34,35
14,15,22,29,34,36,37,36
17,22,29,34,36,37,38,36
20,29,34,36,37,38,39,44
27,34,36,37,38,39,48,61
32,36,37,38,39,48,64,72
34,37,38,39,48,64,77,83
35,36,36,44,61,72,83,88
rename this to .xcm (http://x2.putfile.com/4/9822440387.png)
h263 quantisization~500kbps (http://x100.putfile.com/videos/9900124990.avi)
Sm V4~500kbps (http://x100.putfile.com/videos/9900175787.avi)
The Sm V4 encoded file is about 600kb bigger than h.263 encoded file.
Maybe something went wrong coz bitrates are different...
However can you please post the source file?
COREiP
10th April 2005, 23:32
@tedgo
30 second clips single pass at quantizer 6.
Profile:
Jawor_1CD matrix
Adaptive Quantization: no
Interlaced Encoding: no
Qpel: no
GMC: yes
Packed Bitstream: yes
Zone:
BVOP sensitivity: 5
Chroma Optimizer: Enabled
Motion:
Motion search precision: 6
VHQ: 4
VHQ Bframes: enabled
Chroma motion: enabled
Quantization:
I = 2-31
P = 1-31
B = 1-31
Trellis: Enabled
2,1.50,1.0 = 2.07mb
Click here to watch quant6-2,1.50,1.0 (http://www.putfile.com/media.php?n=quant6-2,1.50,1.0)
2,1.50,0.75 = 2.11mb
Click here to watch quant6-2,1.50,0.75 (http://www.putfile.com/media.php?n=quant6-2,1.50,0.75)
3,1.25,1.25 = 2.16mb
Click here to watch quant6-3,1.25,1.25 (http://www.putfile.com/media.php?n=quant6-3,1.25,1.25)
Sagittaire
11th April 2005, 00:32
IMO ... if you use high ratio/offset for bframe you make high variablity encoding (high variability for bitrate and quality). bframe are used for low motion and not high motion : for constant final size high ratio/offset done higher average quality for high motion and lower average quality for low motion. With high ratio/offset for bframe you don't must use constant quant (for I,P). 2 pass with lower bitrate variability (use HighBitrateReduce and LowBitrateBoost in this case) will be very better with high offset/ratio:
constant quant with I,P,B
I(q10)P(q10)B(q10)B(q10)P(q10) for low motion
I(q10)P(q10)P(q10)P(q10)P(q10) for high motion
constant quant with I,P and offset for B
I(q9)P(q9)B(q14)B(q14)P(q9) for low motion
I(q9)P(q9)P(q9)P(q9)P(q9) for high motion
2 pass with lower bitrate variability and offset for B
I(q8)P(q8)B(q12)B(q12)P(q8) for low motion
I(q10)P(q10)P(q10)P(q10)P(q10) for high motion
with high ratio/offset for bframe Rate Control strategy must be different ...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.