Log in

View Full Version : Anything wrong with always setting min. Quants to 2?


absinthe
28th July 2005, 13:51
I'm in the long process of backing up my entire, modestly massive DVD collection to XviD, and I'm shooting for 3 movies per DVD. But with movies 90 to 100 minutes or less, and especially if they're 2.35:1 A/R, I find that the bitrate is just plain excessive (keep in mind I'm shooting for playback on a Philips DVP642).

Because I've had problems with oversized files, I started setting my minimum Quants to 2 for the second pass for shorter movies. Then I figured, hey, why not do it for all movies?

Is there any drawback to this at all, disregarding filesize? I mean, if I understand correctly, my file with either be the size I specified or will be just as good in quality as if it were the size I specified?

Right?

-abs

sysKin
28th July 2005, 14:21
Only one problem - there is a maximum size and you won't get reach anything higher than that.
We used to have one post a week about this (and we called it "codec saturation") until I set minimum to 1 and they magically stopped ;)

bill_baroud
28th July 2005, 14:24
i remember the good old nandub days where it was capped at 2 because "1 is too big to be decoded real time" ... that was true ?

absinthe
28th July 2005, 15:16
Only one problem - there is a maximum size and you won't get reach anything higher than that.
Right. But as I said, if I'm specifying the maximum size, then that isn't a problem is it?

For instance, I set up a movie 2 hrs and 37 minutes in length for encoding. With MP3/VBR audio, calculated bitrate was about 1204 kbps (shooting for 1/3 DVD size, or about 1493 MB). I set minimum quants to 2 for the second pass and it actually came out at a bitrate of 970 kbps.

So, if I'm understanding correctly, there was nothing to be gained quality-wise by increasing this encode's bitrate from 970 to 1204. Right?

Sharktooth
28th July 2005, 15:47
right (almost).
but it also depends on the custom matrix you used (if you used that feature at all...).

absinthe
28th July 2005, 16:31
but it also depends on the custom matrix you used (if you used that feature at all...).
Nope. Just H263.

-abs

Elic
28th July 2005, 20:15
absinthe
> Just H263
Try MPEG instead. Or, IMHO even better, try to disable B-frames (or both disable B and set MPEG simultaneously).

jellysandwich
28th July 2005, 23:59
Or, you could put more movies onto each DVD. I try
to fit 5 movies on a single DVD, but sometimes I may
need to put only 4 or even 3 (very rarely - in fact, only
one).

Also, I have a question. I've noticed that when using
TV-out, my videos look much "cleaner" (I assume from
the way the TV works, which has some form of blending?)
than when I view them on my 19" CRT monitor. Would
this also be the case for the Philips DVP642?

js

SirCanealot
29th July 2005, 11:45
Yes, why not set your minimum quants to 2 for all your movies? And make sure you set the B-Frame quant ratio from 1.5 to 1.0 too :D

Using quant 1 frames does improve quality, but how much does it have to improve bitrate for such a minor quality gain?
Sure, if you want to reach xx.xxgb that badly, use quant 1 frames. However, I'll take lower filesizes and SLIGHTLY lower quality any day of the week :D

Didée
29th July 2005, 13:17
If you're encoding to bitrates where q1 is a topic at all, then my advice is:

- limit min. quants to "2"

and

- use a "high bitrate" matrix, like eqm_v3hr, or SixOfNine (http://home.arcor.de/dhanselmann/_stuff/SixOfNine.xcm) / SixOfNine-HVS (http://home.arcor.de/dhanselmann/_stuff/SixOfNine-HVS.xcm). (the latter I use for almost all of my encodings).


hint: I use Bframe settings of 1/1.62/0.00 , or 2/1.63/0.00 for more compression (still 'high' bitrate)

absinthe
29th July 2005, 19:07
Thanks for all opinions!

Custom matrices remain more of an academic curiosity to me for now since MPEG matrices generally cause some artifacts when playing back on my Phillips player, which is what I'm designing my encodes to do. Perhaps I'll get more use out of them in the future when I can replace all video players in my house with HTPC :), if H264/AVC hasn't taken over the world by then, that is.

Out of curiosity, why would you disable B-frames?

-abs

jon.schaffer
29th July 2005, 21:45
Out of curiosity, why would you disable B-frames?
Since a movie may have reached its saturation size (maximum size at Quant2), the 'unused' space can be used to maximize the quality.
The B-frames are at higher quantizers than I and P frames (even if B-frames are better than I/P frames at these high quant.) So, by disabling the B-frames, you create lower quantizers frames (they all will be at Q2): you increase quality, 'filling' the 'unused' space (if you were aiming for a certain size).

MeteorRain
1st August 2005, 05:43
i set b-vop at 4/1.0/0.0 to give a higher quality. it prevent the situation that you get qr1 at i/p frames but qr2~3 at b frames.
instead to disable b frame, i suggest you setting 1.0/0.0 b-frame-ratio/offset to improve quality.
you can use some high-quanlity matrix (such as hvs-best-picture), and constant qr2 is really high quality.

Backflip
2nd August 2005, 12:23
Also, I have a question. I've noticed that when using
TV-out, my videos look much "cleaner" (I assume from
the way the TV works, which has some form of blending?)
than when I view them on my 19" CRT monitor. Would
this also be the case for the Philips DVP642?

js

Cleaner or less blocky? It'd probably be the lower resolution of the TV and size. What kind of TV you got?

absinthe
2nd August 2005, 12:34
Also, I have a question. I've noticed that when using
TV-out, my videos look much "cleaner" (I assume from
the way the TV works, which has some form of blending?)
than when I view them on my 19" CRT monitor. Would
this also be the case for the Philips DVP642?
Artifacts are definitely less visible on a television due to its lower resolution (vs. a monitor). It should definitely hold true for any standalone-to-TV-set Mp4 player.

Also, if your flick is interlaced, it will look much better on TV as compared to a monitor (if encoded properly). Having said that, though, there are video players (computer software, I mean) which purportedly "deinterlace" on the fly, though I've never used one.

-abs

absinthe
2nd August 2005, 12:37
i set b-vop at 4/1.0/0.0 to give a higher quality. it prevent the situation that you get qr1 at i/p frames but qr2~3 at b frames.
instead to disable b frame, i suggest you setting 1.0/0.0 b-frame-ratio/offset to improve quality.
you can use some high-quanlity matrix (such as hvs-best-picture), and constant qr2 is really high quality.
What exactly will changing the B-frame ratio/offset settings do? I've never messed with those two settings. Do you think my files will come out equally compatible in standalones?

I know, for instance, that the "DivX certified" standard for settop players allows for 1 consecutive B-frame. However, my player handles 2 just fine, so I often use 2. But come to think of it, I've never tried 3 or 4 ...

-abs

absinthe
3rd August 2005, 12:48
Okay, on the topic of B-frames, let me re-"frame" my question this way :) :

So my 2-pass encode with 1 or 2 B-frames and minimum quants set to 2 comes out pretty darn far undersized. Would I be better off to encode it again without any B-frames and otherwise the same settings for better quality?

-abs

708145
3rd August 2005, 13:25
So my 2-pass encode with 1 or 2 B-frames and minimum quants set to 2 comes out pretty darn far undersized. Would I be better off to encode it again without any B-frames and otherwise the same settings for better quality?


Hi absinthe,

recoding without b-frames will only increase bitrate by a few percent.

If you really want to spend the additional bits I suggest to use a high bitrate CQM, leave b-frames on and encode 2pass again.

WIMNI, this will give you the max quality at your target bitrate.

bis besser,
Tobias

MeteorRain
3rd August 2005, 15:42
encoded to a qr2 b-frame or a qr2 p-frame results the same quality (IMHO)
so, w/o b-frames will lead to that all frames are encoded at qr2, while, if we adjust the ratio and offset to 1/0, this will cause all b-frames encoded at qr2 too.
and usually, on the same quantizer, b-frames are smaller.

b-f qr = i/p-f qr * ratio + offset

if you set it as 1.5/1, then
b-f qr = 2 * 1.5 + 1 = 4, worse than qr2.

and consecutive b-frame, you can use 1, or 2 as you like.
I set it to 4 becuz it will reduce bitrate at a non-motive scene
(in anime "Oh_My_Goddess" ending songs, i even use 16 consecutive b-frames, in x264:))

absinthe
5th August 2005, 02:17
Well, I've changed my strategy to just doing 1-pass Q2 encodes with 1 b-frame (1.00/0.00). I use VHQ4 (+VHQ for B-frames) and ultra-high search precision. Trellis On, chroma motion on. No GMC, no QPel, and no adapative quant (this last I thought would put more bitrate into darks and lights ... I tend to see a lot of blockiness there). I'm also setting a credits zone at Q20.

I tend to stay away for MPEG matrices and just use H263 as it has been demonstrated to me that MPEG matrices cause some streaking artifacts in my standalone player.

Anyway, it's amazing how small some files actually come out this way. Then again, I'm getting some "too big" ones as well, though those are rare.

"Panic Room," for instance, at 1 hr. 51 min. actually comes out at 506 MB (video only) and only 627 kbps! Go figure.

Then there's "On The Waterfront," in black & white and full-frame, which is still encoding and at 95% done is already a whopping 2.53 GB. Whoa ... I'll have to find another way to do that one (standalone doesn't recognize files over 2 GB in size).

I've thought about changing the profile to try and get more bitrate for some movies, but it looks like the NTSC HT profile actually has a lower bitrate than the AS@L5.

-abs

MeteorRain
5th August 2005, 03:07
when you use constant quantizer, the filesize depends on the complexity of the scene. if you encode a normal anime, the filesize maybe small. but if it's a war movie, and was made several years ago (w/ terrible tech.), the final work will be big enough to surprise you. in such condition, you may choose to use some avisynth filter to reduce noise, and use qr3 instead of 2. (qr2 really eats harddisk:o)