View Full Version : modulated quant - 1st pass question
canadian_fbi
29th July 2002, 21:11
regarding the use of modulated quantizers on the second pass, acaila said:
Actually it depends on the movie. On the 1st pass you will want to use that quantizer type that gets used most on the 2nd pass. So if you would end up with an average quant of anything under say 3.5 you will want to use MPEG quant on 1st pass to make your encoding as efficient as possible.
You can actually see the difference of H.263 or MPEG on 1st pass on the final quantizer average of the second pass.
i was wondering... is there any consensus as to what to use on the first pass when using modulated quants for the second pass? i know koepi recommends H.263, but from what acaila says, it sounds like the only way it affects things is through the first pass size and how the curve scales it, so that if most of your frames will be 2 or 3 (MPEG), it'll help the accuracy of the scaling to do the first pass as MPEG.
Koepi
29th July 2002, 21:17
Erm. If you#d read further you'd seen that I acknowledged that, it's true.
But it doesnt have real impact so it doesn't matter anyways. The curve treatment spreads the bits which are over- or underused in those cases, just as it does now.
Regards,
Koepi
canadian_fbi
29th July 2002, 21:27
right, but you did recommend H.263 in that thread, and i was wondering if there was any special reason for doing so, since in most cases, most encodes get an avg. quant of less than 3.5, so having it as MPEG would be the most efficient. yeah, i agree that this is sort of a picky question to ask since it shouldn't matter anyway, but acaila mentioned something about there being a noticable difference in the second pass, so i was kind of hoping that he could elaborate on that a bit.
Koepi
29th July 2002, 21:40
EDIT:
Repeat: But it doesnt have real impact so it doesn't matter anyways. The curve treatment spreads the bits which are over- or underused in those cases, just as it does now.
Maybe now?
EDIT: and no, it doesn't show visual differences in second pass, forget about that.
EDIT2: :stupid:
Acaila
29th July 2002, 22:01
Sure I can comment of it. I said it makes a noticable difference on the average quant, whether or not that difference is visible is up to you to judge.
e.g.
H.263 on 1st pass, Modulated on 2nd pass:
Quant 2: 20214
Quant 3: 127221
Quant 4: 34141
Quant 5: 3162
Quant 6: 1210
Quant 7: 112
Quant 8: 113
Quant 9: 13
Quant 10: 2
MPEG on 1st pass, Modulated on 2nd pass:
Quant 2: 30525
Quant 3: 126034
Quant 4: 27479
Quant 5: 2019
Quant 6: 123
Quant 7: 7
Quant 8: 1
Averages:
H.263 -> 3.13
MPEG -> 3.01
All other settings exactly identical except the H.263/MPEG quantizer matrix.
I call that a sizable difference on the average. So either the curve treatment didn't do its work properly, or the ME or whatever else was more efficient in the MPEG-case.
Ps. This is reproducable on all other movies I've done in case you're wondering (although I haven't used the newest builds with the new CC code yet).
Koepi
29th July 2002, 22:06
Acaila,
you should know better in this case.
MPEG quant works better on pure, no-noise material.
I guess I don't have to tell more.
Regards,
koepi
PS: EDIT: we did our tests as well and they showed ambivalent results. so in the end it really doesn't matter.
Acaila
29th July 2002, 22:15
No offense, but I'm only encouraging people to test things for themselves, instead of blindly following what others say.
MaTTeR
29th July 2002, 22:26
Well that's some interesting numbers above and I would have never guessed that would be the case. Admitingly I never tried MPEG on the first pass except if I were doing a high bitrate 2CD rip.
Time for some testing now:)
canadian_fbi
29th July 2002, 22:27
thanks for your replies acaila. after koepi's mountain of evidence in his first reply, i began doing some tests myself, and confirmed what you said in a couple of short tests:
h.263: 3.48
mpeg: 3.39
and another (same first-pass, bigger output file)...
h.263: 3.36
mpeg: 2.85
that second test in particular was very striking... again, the only difference between the two was that the stats file was generated using either H.263 or MPEG quantization. and hinted ME was off, so that couldn't be doing it. whether or not visual quality is affected... i haven't looked frame-by-frame yet, but i don't see how it couldn't be higher in the one with the MPEG first pass.
EDIT: the big difference in the second test was due in part to keyframes in the MPEG file being encoded at quant 3 and the H.263 one encoding them at quant 2. for the first test though, both of them encoded keyframes at quant 3.
Koepi
29th July 2002, 22:32
Well, then why care at all?
Damn, take some different footage. Make more tests. Don't take a single (lemme guess, highly cleaned anime?) file as general case! Don't do that error.
Regards,
Koepi
Koepi
2nd August 2002, 04:47
Well, I'm not all that wanker that you may think :P
I'm testing your thesis (...again, we already tested with some small clips and the results weren't indicating anything but MPEG quant doesn't handle noisy sources well...) ATM and the first result is:
[EDITED OUT]
I prepare some numbers right now, but I'm waiting for the first (and then the 2nd pass) of the h263/modulated version to finish up, can take some hours.
It is in fact very important to know which movie, which DVD, which kind of movie (anime/real life/action / clean /noisy..) you tested that way.
Well, when the test is finished I'll post a draft here (or in a new thread?) where this is all respected and I want to encourage you to do some further (public!) testing.
Regards,
Koepi
Koepi
2nd August 2002, 14:32
Erm with public testing I mean that you test the way I propose you do (stating which source, kind of movie, quality of source,... even the avisynth script is important).
Regards,
Koepi
canadian_fbi
2nd August 2002, 14:43
oh, i don't think you're a wanker :)
the 'movie' i tested was an episode of the x-files from the first season dvd set. it was actually pretty noise-free for being from a tv show from 1993 - i think the dvd was pre-processed pretty well. still, it did have a good amount of details and was encoded with neutral bicubic and no noise filtering.
unfortunately it looks like i've deleted the h.263-modulated analysis file (i kept the mpeg-modulated one). the mpeg-modulated avg. quant was 2.917, and i think the h.263 one was about 2.94 or something slightly higher. the mpeg version had about 2000 more quant 2 frames (the show was 66000 frames long), and a few more quant 4 frames, but more 2's than 4's. i think what's happening is that when the curve compression has a more accurate stats file it's able to really optimize the curve. when its stats file is a bit off (usually giving frames mpeg quantization when the stats give h.263 numbers), it doesn't have the best information to work with so it might not give the most optimum output curve. depending on the movie it might not have any effect at all or it could have minor visual effect. when comparing them visually you'd probably be able to pick out a few frames in the h.263 first pass version that looked better and a few more in the mpeg version that looked better, depending on how the bitrate was being distributed at that point. you're right, probably you wouldn't notice it, but i think it's still probably best to have the closest 1st pass stats file for the second file so that it can be scaled as accurately as possible.
Koepi
2nd August 2002, 15:27
Thanks for the reply :)
Well, my first pass needs another hour, and the second pass will need about 2 1/2 - 3 hours again, I already prepared the post and only have to fill in the results.
I'm looking forward to that! :)
Regards,
Koepi
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.