Log in

View Full Version : XviD, 2nd pass: Lower Max B-Frames vs Lower Quantizer Values (vs ?)


P_72
13th October 2009, 13:47
I'm in the process of encoding a lot of episodes from a TV show using XviD (2 passes, video size), and I've found the recurrent problem of some of them not reaching the desired file size.

Since I don't want to increase the resolution any more, I've been experimenting a bit with different XviD parameters to reach that file size, but I'm not sure about my conclusions regarding video quality (and yes, I know that my eyes should be the judge, but my eyes would appreciate a little help on the XviD theory...)

So, these are my two strategies so far:

1. Reduce the maximum consecutive B-frames to 1 (default was 2).

2. Allow a wider range of quantizer values: 1-31 instead of 2-31.

Which one is theoretically more recommendable, and why?

I tend to believe that #2 is more flexible and will provide better quality if the encoder goes down to Q1 only on the tricky parts, therefore helping to preserve more details where it's needed (and only there), but frankly speaking I have no idea if that's the way XviD will "spend" that extra "budget".

So any thoughts or alternatives will be welcome.

Thanks in advance!

BigDid
13th October 2009, 20:01
...
Since I don't want to increase the resolution any more, I've been experimenting a bit with different XviD parameters to reach that file size...
1. Reduce the maximum consecutive B-frames to 1 (default was 2).
...

Hi,

Go for reducing to 1 consecutive Bframe (small increase); go for no-Bframe (higher increase) or go for high quality cqm matrix like Sharktooth EQM V2 or V3HR; see:
http://forum.doom9.org/showthread.php?s=&threadid=83125
See also this sticky:
http://forum.doom9.org/showthread.php?t=24584

Did

P_72
13th October 2009, 21:12
Thanks for your response BigDid.

Yes, I knew that sticky, but as far as I can see it lists, rather than compare, the available solutions. I was trying to go a step further and check if one of them is really better or more recommendable, and why.

Custom matrices look interesting, except for the fact that I could lose compatibility with standalone players. I'll give them a try and check it for myself with my "DivX compatible" DVD/HDD players, like I did with QPel and GMC.

Anyway, does this mean that the q1-32 approach is generally worse than reducing the number of B-frames? What I know about B-frames is close to nothing, but I thought they're like a "cheap" (more compressible) way to encode the easy parts in a video, therefore allowing the tricky parts (e.g. those with a lot of motion or fine detail) to be encoded with better, "more expensive" frames (yes, I know, sorry for the lame vocabulary :))

Or to put it shorter, shouldn't I expect better quality by allowing some Q1 frames that otherwise would be Q2?

BigDid
13th October 2009, 22:04
...
Custom matrices look interesting, except for the fact that I could lose compatibility with standalone players. I'll give them a try and check it for myself with my "DivX compatible" DVD/HDD players, like I did with QPel and GMC.
Hi,
V2 is SAP compatible; at least MTK/SIGMA ones.
V3-HR needs a little tuning; see:
http://forum.doom9.org/showthread.php?p=941097#post941097


Anyway, does this mean that the q1-32 approach is generally worse than reducing the number of B-frames? ...
Or to put it shorter, shouldn't I expect better quality by allowing some Q1 frames that otherwise would be Q2?
This has been discussed to death at that time; answer is Q1 doubles the frame size but does not double the quality !

Try 1 BFrame, try no Bframe; if not enough, try no Bframe AND a custom cqm; that should be enough :rolleyes:

Did

Edit: you did not tell what GUI you are using; if it has access to the avisynth script, some sharpening (LSF, LSFmod, SoftSharpen) will raise the size easily.

P_72
14th October 2009, 10:10
Hi,
V2 is SAP compatible; at least MTK/SIGMA ones.
V3-HR needs a little tuning; see:
http://forum.doom9.org/showthread.php?p=941097#post941097


OK, thanks for the info.

This has been discussed to death at that time; answer is Q1 doubles the frame size but does not double the quality !


Good to know, that's the kind of theoretical consensus I was looking for and couldn't find.

Speaking of which, please understand that finding those old discussions is pretty hard using the search (which I tried), and no sticky or FAQ covers my question as far as I know ;)

Edit: you did not tell what GUI you are using; if it has access to the avisynth script, some sharpening (LSF, LSFmod, SoftSharpen) will raise the size easily.

I've been using Avidemux (2.4.4 first, 2.5.1 now).

I didn't mention it partly because I wanted to focus on the XviD theory and then see what I could do (or not) with my sw; and also because I'm pretty happy with Avidemux and a specific set of filters (including asharp btw) that I'm not sure I could find or use as simply as it is in Avidemux. But yes, if it was necessary I could always [learn how to] use the AviSynth proxy in Avidemux.

Thanks for your help, BigDid. I'll stick with 1 Max B-Frames and experiment a little with custom matrices.