Log in

View Full Version : max number of passes?


mrlipring
23rd June 2003, 00:03
I'm a brute force kinda guy.

I loved fairuse, and i still use it, but i'm thinking about starting to rip stuff in xvid...

How many passes can you do using xvid? I've only seen guides for doing 2 passes... Is that the most you can do?

If i can "brute force" my xvid encodes, i'll kiss goodbye to FU, as good as it is, but can you do more than 2?

iago
23rd June 2003, 00:08
No, you can't do more than two, but XviD is kinda smart enough to handle its job in two passes ;).

Edit: Nothing against FU btw, which afaik uses a different encoding technique by comparing frames, rather than doing a regular two-pass as in XviD or Nandub SBC or performing multi-passes as in Divx505...

mrlipring
23rd June 2003, 00:39
yeah, fu pieces together the best possible quality from up to 30 encodes.

i normally do 2cd full dvdres, ac3 rips, so i really want the best quality possible. i'll have a play with xvid and see what kinda results i get, but i can't see a 2-pass xvid beating a 30-pass fu-divx... (not that i'd be mental enough to do that many on every film i did, but some compress with better quality than others, and it's only time. :))

manono
23rd June 2003, 02:10
Hi-

but i can't see a 2-pass xvid beating a 30-pass fu-divx...

You're joking, right? Don't get me wrong, FU is very good at what it does. But imitation VBR encoding can't beat the real thing. And think of the time you'll save by getting better quality with only 2 passes.

TaZ4hvn
23rd June 2003, 05:52
It looks like you're a bit confused about techniques used by FU and a native vbr codec.
Let me explain a bit:
-Divx3.11 is not considered vbr (let's say it's abr:)) to circumvent this limitation FU does as much passes you ask for and then choose between them to concatenate scenes in order to keep 'almost' constant quality. Limitation of this technique is of course the number of passes you do, but in any case you'll end with a dicrete (i.e. finite) version of the movie.
-Xvid is a true vbr codec, it means it's able to choose the quality of the frame (whatever this can means to you) BEFORE actually encoding it, so you will have access to virtually infinite quality levels.

If this is not clear, you can thing to XviD (or any vbr codec) as FU with *infinite* passes but only in the time of two passes :)
So, for sure, quality will be better, and time a lot shorter :D

Teegedeck
23rd June 2003, 07:48
mrlipring, I hope you'll like the quality that a humble 2-pass of XviD can give you. :) Well, if this 'brute force' thing is more like you just sleep better when you feel you've put as much time into it as at all possible, you might like DivX5's nth-passes: You can do as many passes as you like and spend weeks, months or even years with it... Seriously, these multiple passes are all about slight optimizations of the quantizer-distribution, their effect can by design only be minimal. There may some possiblity of refinement for XviD, too, one day - but this will probably rely on manual editing of a stats-file after looking at the outcome of the second pass - reassigning bits to scenes that came out worse than the rest of the movie - and then doing a third pass. As this would rely on human perception, the effect migh be a bit less disputable than DivX5's multi-pass thing which makes things better or worse, depending on who you ask. But also manual editing would be only refinement then and not really necessary.

temporance
23rd June 2003, 08:17
Seriously, these multiple passes are all about slight optimizations of the quantizer-distribution, their effect can by design only be minimal.That's true only after the third pass. I've found that after two passes, the quantizer distribution does not always look very nice (both xvid and divx). But after three passes, divx 5 has really cleaned up the quantizer distribution. Four and more passes- there's not very much improvement.

So I'd say three is the best number of passes. You can definitely ses a much improved quantizer distribution on the third pass, though I'm not sure how much this affects the quality of the picture. PSNR does not seem to be a good metric to test this.

Acaila
23rd June 2003, 08:35
Originally posted by Teegedeck
There may some possiblity of refinement for XviD, too, one day - but this will probably rely on manual editing of a stats-file after looking at the outcome of the second pass - reassigning bits to scenes that came out worse than the rest of the movie - and then doing a third pass.I read the plans too, but DivX 5 has the EKG program which does exactly this. However hardly anyone ever posts about it, so my guess is almost no one actually uses this kind of manual adjusting. Having the same thing available for XviD may seem nice in theory, but I would much rather prefer an automatic 3rd pass where the codec itself determines which scenes to improve (based on a 2nd pass stats file perhaps), instead of having to scan the entire video with my eyes to make adjustments. Based on my experience with DivX 5 discussion about the nth-pass feature, I believe many other people would prefer automatic as well (and more than 3 passes is not needed).

Teegedeck
23rd June 2003, 09:43
I don't know based upon which data DivX5 fine-tuning is performed. I'm suspicious that it isn't reliable and I wouldn't want to invest so much time into an automated third pass just because it's easier to use. There's something like a pain (encoding time) / gain (in quality) ratio... The quality gained by a high VHQ-level seems much rather worth the time than a third pass in XviD would be, I think. Perhaps sysKin could come up with some ingenious '3D-VHQ' that could actually tune the quantizer-decision during second pass based upon a reliable quality measurement. :D :D :D Ahhh, daydreaming again...

But I'm not a big fan of the idea of doing another pass, in fact. XviD's scaling gives great results already IMHO, so there'd be few occasions when I'd make some manual adjustments. On the other hand, in some of my encodes I could pick out just one scene that could have used special treatment to be able to call the encode 'perfect'. As it is just one scene, I guess there can't be any modifications for scaling derived from that, so me thinks that 'human perception' idea is not all wrong. This stats-reader would be just for fanatics in my mind, and not for general and everyday use.

sysKin
23rd June 2003, 10:22
Originally posted by Teegedeck
Perhaps sysKin could come up with some ingenious '3D-VHQ' that could actually tune the quantizer-decision during second pass based upon a reliable quality measurement. :D :D :D Ahhh, daydreaming again...LOL, I'm gonna surprise you all: I have this on my 'todo list' already.
The first part is done - b-frame decision no longer conciders dark/foggy scens as 'easy' and makes them of b-frames only, while bright, colorful scenes were concidered 'difficult', with limited number of b-frames.
Alternating qualitizer distribution using this rule (already working rule) seems like a piece of cake - but more complicated HVS models might work much better.

And now, the funny part: it's still 2-pass only. I can analyze the frames during first pass and it will work already, there is still no need for 3rd pass.

:D

Radek

temporance
23rd June 2003, 10:59
Originally posted by Acaila
I read the plans too, but DivX 5 has the EKG program which does exactly this. However hardly anyone ever posts about it, so my guess is almost no one actually uses this kind of manual adjusting.Have you ever tried to use EKG? The interface sucks - it's just completely confusing and unusable. I couldn't work out how to change anything. That's why no-one uses it or posts about it.

I think people do want this functionality and they would use it a lot. However, I don't think DivX has quite got it right yet. Perhaps someone will write an "OpenEkG" application that is more user-friendly (it could have a back end for xvid too) :)

Originally posted by sysKin
And now, the funny part: it's still 2-pass only. I can analyze the frames during first pass and it will work already, there is still no need for 3rd pass.
@sysKin: Do you make the frame-type decision on the second pass then?

Teegedeck
23rd June 2003, 11:01
SysKin, why did I have a premonition you'd say something like that? ;)

Take your time, it's always like the days before Christmas waiting for new features in XviD.
We're all looking forward to 1.1 alpha, now...

BTW, mrlipring, you see that there's pretty much to tweak within 'old' MPEG-4. Because decoder is defined strictly but how to produce the compliant stream that gets decoded is pretty much up to the developers.

mrlipring
23rd June 2003, 11:51
i see what you guys are saying (or did 'til you started getting technical) and i'll give xvid a bash, but as i said, quality isn't my only issue, i really need 2-cd rips. I don't want a 1600mb rip, or a 1200mb rip, i need 1400mb. If xvid will give me the best quality in 1400mb, i'll stick with it.

thanks for the answers, those who answered me, it's appreciated.

sysKin
23rd June 2003, 12:26
Originally posted by temporance
sysKin: Do you make the frame-type decision on the second pass then? Oops you're right, I mixed up ;) For the decision, it's even one pass only - I look at the picture and make a decision, basing it on this darkness/blurrness etc.
It's just that for 'advanced' quant distribution I need the second pass, because I can't really change the quantizer in the middle of coding a frame (external application says it wants Q3, Q3 it must be).

Teegedeck
23rd June 2003, 12:27
mrlipring: filesize-accuracy? That's trivial, no problem.