View Full Version : I got really confused with a "sticky" pls Help
gatekeeper_007
4th May 2006, 20:16
It's about the quantization, and I'll get right to the point...
In the "sticky" sais:
'first case: the 1st pass creates a movie which size is bigger than the desired final size, then the codec has to lighten the ancoding - the 2nd pass will use higher quantizers, so the final encoding will have a correct size and a maximum quality for this size (quality which will be lower than the fixed Q2 quality).'
1st Question: is this case talking about when you are usin' a 1/31 quantization ? because it compears this method with the fixed Q2 quality at the end)
'second case:the 1st pass creates a file which is smaller than the desired final size. In other words, since Q2 can be considered as maximum quality, the first pass was already perfect........... theorically the quality shoud be perfect: many Q2 frames + some Q1 frames.
2nd Question: is this the case talkin' about when you are using a 2/31 quantization?
3rd Question: if this is the case meening - if in deed here the codec is set on 2/31-then I can't understund the followin':
when he's talkin' latter on about oversizing he sais that you should try the setting 2/31 so you will get a smaller file size, but he sais that this way you PREVENT the codec from usin' Q1 fames. So if u prevent the codec from using Q1 frames how is the 2nd case posible?
I hope I made my self clear about my confusion.
thx 4 u'r time.
BigDid
5th May 2006, 00:50
It's about the quantization, and I'll get right to the point...
Hi,
Your point is not so clear, but I will attempt to answer :) . Another time please try to separate your comments and what you quote (use quotes: "" or html quoting )
The sticky is this one (http://forum.doom9.org/showthread.php?t=92046). Your problems seems related to 2pass encode=first and second pass; different from a single pass encode that will target either constant quantizer or constant bitrate (look in the xvid encoder GUI). A definition: Q2 same as Quantizer2/quantization2
1st question...If the question is: how to create an exact file size because 1st pass was smaller than target(undersizing)?
Answer is: Qualitypreset/more/quantization use 1/31 instead of 2/31 for I-P-B frames
- And/or do not check /motion "Use VHQ for Bframes too"
- Your misunderstanding seems to come from: "...the quality should be perfect: many Q2 frames + some Q1 frames."; just forget that part until you fully understand it :)
2nd question... if the question is when is the author talking about 2/31 quantization and when is he talking of 1/31?
Answer is 2/31 is now (after the sticky was made) the standard for a 2 pass encode, 1/31 is the exception when first pass (or final size after 2nd pass) is smaller thant target(undersizing): see answer to question1
3nd question... if the question is related to oversizing (instead of undersizing)?
Answer is: solving oversizing is different from solving undersizing. JonSchaffer is talking of oversizing in his "first case" and giving some clues in the "some remedies against oversizing" part of the sticky.
The author is talking of undersizing in his "second case"; look at the answer I gave for your first question for clues :)
Re-reading the sticky made me realize that it may be somehow difficult to understand for non-native english; and even more to comment for non-native english like me :) . If it is your case, my suggestion would be to translate the sticky or have it translated in your native langage and re-read it for full understanding.
You also can use search in this forum with key words like oversize, undersize, xvid oversize, 1st pass oversize etc...
I am not completely satisfied with my posting but cannot give you more time at the moment :(
Anybody else, feel free to comment/complete/contradict :D
Did
sysKin
5th May 2006, 10:17
I personally can't understand either of you >_< I kindly please more English and less funny accents, they're just making things worse.
What do you mean by "1/31" and "2/31" quantization? Is that maximum/minimum? If so,So if u prevent the codec from using Q1 frames how is the 2nd case posible?
It's simply not possible.
Once you start playing around with maximum and minimum and taking decision away from encoder, unexpected things can happen and various guides are no longer true.
Teegedeck
5th May 2006, 11:56
OK, OK, OK; I think I have finally understood the question. :) (Must admit I had a problem with that, too.)
Let me try and simplify the solution, if not the explanation:
The first pass is always performed at quant=2, no matter what minimum and maximum quantizers are set (2/31, 1/31).
For the second pass set the minimum quantizer always to '2' (2/31).
If you get undersizing increase the input resolution.
That's all.
All other solutions also reach the goal, if you define 'goal' als 'reaching the filesize', but they don't really make sense if you define 'sense' as 'reaching the filesize and making the best of it'.
jon.schaffer
5th May 2006, 19:19
I think Teegedeck sorted out all that and summarized up quite well the "problem".
I edited the sticky in order to make it clearer (?): the 3 different cases are the ones encountered with the XviD default values. There are three (well, practically two) cases because of the content (compressability) of the movie...
Re-reading the sticky made me realize that it may be somehow difficult to understand for non-native english; and even more to comment for non-native english like me :).
Sorry, maybe is it because I am not english speaking myself.
gatekeeper_007
5th May 2006, 21:11
1st I would like to say THX! for the replys.
but from what I'm readin' I didn't make my self so clear, so I'll try once more...
Let me first explain that I really understand the oversize/undersize problem and how to solve this.
(by the way this part of the 'sticky' which explains why you get file sizes over or under the target size files and what you should do to fix this, it's very good explained and if someone use's - play with the values/settings in the codec for a while /get to know the codec/ then it wont be hard to get it).
I'm usin' this codec for over a year (the codec is awsome by the way, great work) so you may say now -it's kinda late for this kind of questions, isn't it?
Well when I start usin' the codec even though I new all that I'm sayin' above. I didn't like to make that 2nd pass several times till I get the file size correct, so I decided to play it safe I putted in the 2nd pass settings -quantizations min.1 / max.31- so I will always get an oversized 1st pass and a correct final but with lower quality.
But now I'm now I'm not so lazy as I used to be and I decided to follow the right way... so I said to read once more all the stickys just to make sure for what I know till know...
so it's not that part that confused me (over/undersized), but this...
I knew that when you use - quantization like : min.2 / max. 31- in the 2nd pass your clip wont have any Q1 frames in it.
But when I read the part " (many Q2 frames + some Q1) " it really made me wonder...
Is he talkin' here about a case that has settings - quant. min.1/max.31 in the 2nd pass?
or is it possible the codec is trying to fatten the file with Q1 frames because the file size after the 1st pass was smaller than the target size, even though I have set the quant. min.2/ max.31?(and the confussion came because I can't see the point why should be there any explanation for the /quant. settings min.1, max.31 (2nd pass)/ ,as it's very well said in the 'stiky' this wont be a compression anymore and you better keep the original source than waste time on this.)
BUT now I've got a second question...
-Teegedeck- you said that:
"The first pass is always performed at quant=2, no matter what minimum and maximum quantizers are set (2/31, 1/31)."
and I really want to believe that but I made a test....
I made a 1st pass with quantiz. min.1/max.31, I took the stats file and I loaded in the 'stats reader' to see the file size. It was (844MB) when the target size was (607MB) and this ok till here.
but then I made a second test - I made again the 1st pass with the same settings in the codec exept the quant. I put it min.2/max.31, I loaded the stats file.... guess what? it was sayin' (1300MB)
Can you expain this? shouldn't be the same size?
/I didn't mess something up- same settings, same .avs,resolution....filters.../
This makes me wonder about another part in the sticky that sais - when you put Q2 frames instead of Q1 will reduce the file size... (but I guess in the sticky is talkin' about the 2nd pass and not the 1st)
I'm really sorry if I'm askin' silly questions but I want to learn... and as in maths has no point to move on 3 if u don't allready know 2/ I wouldn't like to move on compressin' because I know how to make the correct file size with the best way for quality without fully understand first perfectly the basics.
//meanin'~ like in the matrix(the film) sais:
"knowin' the path is different than walkin' the path"
I would like to walk in path that I know, if you know what I mean.
anyway THX!!! again for your replys the did help a lot as they made some things in my mind clear.
keep up the good work!
##Jonschaffer## I'm sorry if I made you 're-edit' your post -it's a very good sticky and now it will be easyer for many to understand.
jon.schaffer
5th May 2006, 21:42
But when I read the part " (many Q2 frames + some Q1) " it really made me wonder...
Is he talkin' here about a case that has settings - quant. min.1/max.31 in the 2nd pass?
YES: this is related to the default settings, i.e. Q1/Q31 (I updated the sticky).
...or is it possible the codec is trying to fatten the file with Q1 frames because the file size after the 1st pass was smaller than the target size, even though I have set the quant. min.2/ max.31?
NO, if you cap the quantizers (Q2/Q31), the codec won't use Q1 frames at all and thus will not fatten the file. If you use Q2/Q31 in this scenario, the 2nd pass will have the same size as the 1st pass.
I made a 1st pass with quantiz. min.1/max.31, I took the stats file and I loaded in the 'stats reader' to see the file size. It was (844MB) when the target size was (607MB) and this ok till here.
but then I made a second test - I made again the 1st pass with the same settings in the codec exept the quant. I put it min.2/max.31, I loaded the stats file.... guess what? it was sayin' (1300MB).Can you expain this? shouldn't be the same size?Exact same parameter? Only changed settings being Q2->Q1 ? Do other software (like DRF Analyzer) report Q1 frames in the file ?
I must admit that I suspect an error from your part because it's totally illogical.
It was (844MB) when the target size was (607MB) and this ok till here.Maybe the confusion is here: if you do a first pass, you have not to tell yet the target size. This is only available for 2nd pass or single pass encondings.
gatekeeper_007
5th May 2006, 22:11
Exact same parameter? Only changed settings being Q2->Q1 ? Do other software (like DRF Analyzer) report Q1 frames in the file ?
I must admit that I suspect an error from your part because it's totally illogical.
well- I thought so 2 (that I must made something incorrect)
so I made a 3rd test with quant. min3/max.31 and I checked all the settings over and over again... They were the same!
guess what? the stats file said...(1028MB):eek:
I can't check if there were any Q1 frames in it, as I deleted the stats files yesterday...:rolleyes:
Maybe the confusion is here: if you do a first pass, you have not to tell yet the target size. This is only available for 2nd pass or single pass encondings.
I can't say that I get you completly here.
Isn't this the way to see if the file should be 'fatten' or 'lightened' for the second pass?
I understand that the stats file wont give me the exact target size, but shouldn't be close to that?....
sorry that isn't right... I want to say. isn't this the best way to understand the compressability so I'll know what settings/matrices .... should I choose?
jon.schaffer
5th May 2006, 22:28
I can't say that I get you completly here.
You mentioned a "target" size. This parameter can be set only before a 2nd-pass or a single-pass encoding, NOT during the first pass. The size will only depend on the compressability of the movie.
So, if you had to set this value at a certain point, you might have used a bad encoding method in your comparison test.
The size displayed in the StatReader is the actual size of the 1st pass (i.e. the size of your movie file after an encoding with the fixed quantizer = 2). The stat file doesn't give a target size. YOU will set the desired target size manually before making the 2nd pass.
If the actual size of the 1st pass (that you read in the StatReader) is lower that the size you would like to get, then you'll have to fatten (by modifying your source - increasing resolution - or by using Q1/Q31 in order to create 'big fat' Q1 frames)
If actual 1st pass size > desired target size then the codec will try (and manage) to lighten it...
gatekeeper_007
5th May 2006, 22:41
THX!!!!
you have solve all of my questions!! I think I can stop the bullets now :thanks:
about the "target size" I re-edit my post imidiatly after I read it, (it didn't sound right to me either) but you were all ready readin' it so... you didn't see.
###about the differnt 'compression' sizes I still can get it, so I'll take it as---I must made somewhere a mistake---
THX again you've saved the day!
THX to all that did reply.!!!! muchos gracias.
because as we all know : teamwork + attitude = exellence!
gatekeeper_007
5th May 2006, 22:52
_____
all this time I was doing a 1st pass with the same compression settings as yesterday...
I only changed the quant. to min.4/max.31...
the stats file was sayin' (1028MB) again so I had make somewhere a mistake with the others, as this time I had written the setting so I wont make any!
BigDid
5th May 2006, 23:55
I personally can't understand either of you >_< ...
:stupid: So now I have the choice to speak pidgin: you naughty with me :)
Or I can use Guada2 automatic translator; beware of the results :devil:
... Sorry, maybe is it because I am not english speaking myself.
Ouaaaaaaah, We call, we eat (=on s'appelle, on se fait une bouffe): this basic english langage was graciously offered by Guada2 auto-translator :D
Problem we may have (note the Yoda effect),on the world Me South you North :eek:
@Teegedeck, sorry nothing for you except my deep regards: you were the only one not to tease me :)
@gatekeeper_007, this is not about you, my apologies for polluting your thread and my best wishes for your encodes
Did
gatekeeper_007
6th May 2006, 00:44
@gatekeeper_007, this is not about you, my apologies for polluting your thread and my best wishes for your encodes
1st of all: thanks for your wishes (I hope they'll come true some day soon)
and 2nd : You didn't pollute the thread, on the contrary you've made it more colorfull (with you're smilles):p
after all you did help 2 and the thread was made so I'll get some things straight in my head and it did just that.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.