Log in

View Full Version : Should I be more concerned with bitrate than which quantizer? 5 questions!


Skywalkerjen
4th October 2005, 01:35
Hey there

I'm after some clarification!

1. For any particular frame it is impossible to set a fixed bitrate. I can't say that I want this frame encoded at 5000kbps. I am limited to a set of discrete levels - quantizers - that I can choose from that are closest to that bitrate.

2. For example, in my frame, Q2 = 5300kbps, Q3 = 4900kbps, Q4 = 4600kbps. Q3 is therefore used.

3. The bitrate steps that each quantizer roughly produces are determined by the quantizer matrix. In my case I am doing a high bitrate XviD encode, so the quantizer matrix I need would have smaller steps between quantizers at high bitrates - e.g. (in an example frame) Q2 = 5300, Q3 = 5200, Q4 = 5100).

4. Because the steps between these quantizers are less at this high bitrate, I am able to maintain a more constant bitrate because the encoder has more options to reach the desired rate.

5. Due to the different quantizer matrices available, it makes no sense at all analysing a video by which quantizer was used most often. It is all about the bitrate and the quantizer is just a means to reach a desired bitrate.

6. The MPEG matrix is said to "sharpen" the image because it provides more "steps" for higher bitrates which allow the detail to be stored.

7. MPEG matrix at quant 2 is roughly the same as SixOfNine at quant 3 simply because they produce approximately the same bitrate.

8. For maximum "quality" (preservation of the source) I shouldn't be concerned about which quants are used but rather what is the bitrate and is it high enough.
______________________________________________________-
5 Questions (!)

A. Do quantizers do anything other than provide levels of compression to enable you to reach a desired bitrate?

B. Should I not be concerned with using the maximum (logical) constant quant 2 (i.e. to get the best quality I should use 2 in whatever matrix), but rather use a constant quant that reaches my desired bitrate, e.g. a 1000kbps lower than DVD (even if that is only a quant 5 on an ultra high bitrate matrix?

C. I want every frame to have the same amount of compression (the same amount of detail removed from) it so I'd do a constant quantizer one-pass encode (after choosing a matrix that has a quantizer that usually reaches my desired bitrate)?

D. It makes no difference which matrix I use if I'm doing one pass constant quant, as long as it has a quantizer that usually hits my target bitrate?

E. Are my seven statements correct or have I missed the point somewhere?

Thanks for your time! :thanks:

Skyjen

EDIT: The main question(!)

I encode a single frame with the MPEG matrix at Quant 2. The frame is 100kb.
I encode the same frame with Sharktooth's eqm_v3uhr matrix at Quant 4. The frame is 100kb too.
Are there any differences? Does Sharktooth's "version" contain a more accurate picture than MPEG matrix?
Do quantizer matrices do more than just provide different "steps" between quantizers?

*.mp4 guy
4th October 2005, 03:39
EDIT: The main question(!)

I encode a single frame with the MPEG matrix at Quant 2. The frame is 100kb.
I encode the same frame with Sharktooth's eqm_v3uhr matrix at Quant 4. The frame is 100kb too.
Are there any differences? Does Sharktooth's "version" contain a more accurate picture than MPEG matrix?
Do quantizer matrices do more than just provide different "steps" between quantizers?
Matrixes do a lot more then change the "Steps", that is mostly just a side effect of what they are supposed to do. Both matrixes are equally "accurate" In reality if they are the exact same bitrate on the exact same frame, the difference is where the accuracy is. As a hypothetical example lets say mpeg is less accurate on low frequencies (big differences) more accurate on mid frequencies (differences about a 4th the size of big differences) and equally accurate on high frequencies (about a 7th the size of big differences) as eqm v3uhr then mpeg would have bigger artifacts then v3ehr and might look worse.


5. Due to the different quantizer matrices available, it makes no sense at all analysing a video by which quantizer was used most often. It is all about the bitrate and the quantizer is just a means to reach a desired bitrate.

6. The MPEG matrix is said to "sharpen" the image because it provides more "steps" for higher bitrates which allow the detail to be stored.

7. MPEG matrix at quant 2 is roughly the same as SixOfNine at quant 3 simply because they produce approximately the same bitrate.

8. For maximum "quality" (preservation of the source) I shouldn't be concerned about which quants are used but rather what is the bitrate and is it high enough.
5. Not at all true quantisizers directly effect quality, bitrate indirectly affects quality by dictating what quantisizers the video is encoded using. different matrixes make things more confusing in this repect, but if you know how much more or less aggresive they are then a standard matrix you can still make an apples to apples comparison that is never possible with bitrate when comparing different sources.

6. The mpeg matrix is said to "sharpen" the image because of the way in which it compresses the image it has nothing to do with the "steps".

7. No, they are the same because they yeild about the same compression, they are different because they will achieve the compresion in slightly different ways and will not always have a bitrate correlation.

8. Thats completely backwards. If I have a "talking head" source it will look great at amazingly low bitrates becuase the quantisizers will still be reasonably low. On the other hand if I have a source like the house of flying daggers even at a reasonably high bitrate it may look like crap because it has so much action the codec had to use high quantisizers to achieve that bitrate.

Teegedeck
4th October 2005, 08:49
You amassed quite some insights into XviD-encoding, already, Skywalkerjen. :)

*.mp4 guy just explained where you went wrong (probably better than I could have done it), so I only feel like adding some comments:
6. The MPEG matrix is said to "sharpen" the image because it provides more "steps" for higher bitrates which allow the detail to be stored.High-bitrate CQMs offer a finer stepping, not the standard MPEG-matrix.

7. MPEG matrix at quant 2 is roughly the same as SixOfNine at quant 3 simply because they produce approximately the same bitrate.Not true at all. Actually SixOfNine will be a bit smaller and look better.

8. For maximum "quality" (preservation of the source) I shouldn't be concerned about which quants are used but rather what is the bitrate and is it high enoughA constant-quantizer encode is a safe way to reach even quality. 2-pass might yield better perceived quality if the constant quantizer would have to be a 'high' (whatever that may be) one, though.

Skywalkerjen
4th October 2005, 14:53
Thanks very much for taking the time to answer those questions guys. I had the wrong idea there and thanks for explaining why.

What I should be more concerned with is using a Quantizer matrix that best suits my source material and how large an XviD filesize I'm happy to live with.

I'll continue encoding at a constant quantizer so each frame has the same "amount" taken out.

As I'm encoding at a high bitrate/resolution and my source is DVD then I'll use a matrix optimized for these specifications.

1. Are there any other recommendations of quantizer matrices other than Didee's SixOfNine?
2. I have to back up my Friends DVDs - I've never come across a worse picture! Would anyone recommend using a different quantizer matrix, or would you try cleaning the picture with the various avisynth plugins and use the optimized matrix as before?

Teegedeck
4th October 2005, 15:10
Well, I don't know how bad Friends actually looks. I don't have to deal with bad sources often but it always comes down to the question - 'do I want the result to still look similar to the original or do I want to smooth it till it's absolutely clean?'. Personally I tend to the former except for extreme cases. Recently I found the removedust-combo (actually lremovedust) to work wonders on some episodes of Blackadder.

Another thing is bad picture quality due to overquantization (are there artefacts present in the source?). When the picture is noisy and there's a lot of episodes stacked onto one DVD, then it's all the more probable that the content is overly compressed already. In that case you can forget about using high-bitrate matrices as real detail isn't present in the source, anyway, and you can as well use standard matrices or 1-CD CQMs on the post-processed source.

Skywalkerjen
4th October 2005, 15:37
A very good point - do I keep them as close to the original or try to clean them up to look better? I'm expecting to be watching these XviDs in 20 years time so I suppose it would be better to just keep them looking like the original. In 15 years time I can probably clean them up in real-time with the ultra fast PC!
I am archiving my DVD collection so it would be best to not mess with them even if they look better now on TV.

The Friends DVDs. To me they seem to have been done on the cheap.
They have 4 episodes on each side of a double sided DVD. So 80 minutes in what usually takes up only 3.8GB.
They obviously get better towards the final seasons, but the first season particularly looks terrible.
When I've used field deinterlace on it, any slight movement becomes completely blurry - you can get frames where the characters have no face!
It also feels as though the frame rate has been halved - like playing a computer game that is running at 10fps.
There isn't a problem before it's deinterlaced so I'm assuming that is more a question of handling interlaced video than quantizer matrices?

Teegedeck
4th October 2005, 16:17
Well, perhaps you should try a different deinterlacer. How about TDeint? Dead-simple, quick and effective.

And BTW, if you have a double-layered, two-sided DVD there ('DVD-18') it can store up to 17 GB of video-data. So 4 episodes per side seem OK to me.

edited: whoops! he, he ;)

Skywalkerjen
4th October 2005, 18:14
No - they are single layered double sided.
I was quite surprised when we got them as I thought this single layer-double sided format was all but replaced by single side dual-layer.
Each twenty minute episode takes up just less than 1GB.