View Full Version : Help achiving same quality level on all movie parts
nightrhyme
30th December 2004, 00:15
I'm in the process of making encodes af a 24 part tv series and would like same quality on all parts. BTW Size doesn't matter only Quality.
The problem is that they differ in length. From 45min to 1h 20min.
I read in other threads that when faced with this problem people use constant quant like constant quant 2.
But how do you get constant quant = 2 ?
I tried Single Pass Target Quant = 2 with the following settings: XviD 1.3 koepi. HVS-Best-Picture Matrix, B-Vobs Default, Motion Search precision 6, VHQ for B-Frames, Chroma motion, Quatization all 2-31 and Trellis Quantization.
The
Which results in Quants being spread like this:
DRF Analyzer Report - Target Quant 2 (http://hjem.tele2adsl.dk/nightrhyme/Target-Quant-2.txt)
The thing is it doesn't use Quant 3 at all only Quant 2 and 4
Tried using a Zone at Quantizer 2. Same Result.
Then tried using a similar bitrate as the
Quant 2 encodes with same Encoder settings as above.
Resulting in the Quants being spread like this:
Drf Analyzer report - Bitrate 3200 (http://hjem.tele2adsl.dk/nightrhyme/Bitrate-3200.txt)
Now Quant 3 is being used.
But how do I force the Codec to use only Quant 2 and 3.
And why is Quant 3 simply skipped in Target Quant = 2 ?
Or just how do I get the same Average quality on all parts of the series ?
//Thanx in advance
//and sorry for my long post.
manono
30th December 2004, 00:39
Hi-
The ones that aren't quant 2 in your first link are the B-Frames. If you really want them all to be quant 2 or quant 3 or whatever, then turn off B-Frames. Or make the B-Frame settings 1/1/0. Not sure I'd recommend the second solution, though.
Bogalvator
30th December 2004, 00:42
The different quants are being used for the B-frames. On the default settings, the B-VOP multiplier is 1.5, and the offset is 1, so that means if you set a constant quant encode at 2, then the B-frames will be encoded at (2 x 1.5) + 1 = quant 4.
To have all frames encoded at quant 2, set the multiplier to 1 and the offset to 0.
To use quant 2 for the I & P frames and quant 3 for the B-frames then set the multiplier to 1.5 and the offset to 0 (or set the multiplier to 1 and the offset to 1 - I recommend the former) etc.
More detailed explanations will be found in the FAQ ;)
nightrhyme
30th December 2004, 01:06
Thanx for reply guys.
Ofcourse the B-Frames didn't use my head :rolleyes:
Now that you explained the mystery for me what would you recommend to achieve best quality ?
At this bitrate around 3200 would turning B-frames off be the best choice ? or what would you do ?
//Again Thanx in advance
Blue_MiSfit
30th December 2004, 05:15
best quality IS CQ2. If you don't want your BVOPS to be Q4, then change the BVOP settings to the following:
Max. Consec: Whatever
Quantizer Ratio: 1
Quantizer Offset: 1
The quant of B frames in CQ encoding mode is determined by taking the specified target quant (2), adding the offset to it (1), and then multiplying that by the ratio (or something along those lines)
Anyway, the whole point of bvops is that they look better (in theory) at any given quant than a pframe at that same quant. For example, a q4 bframe looks about the same as a q2 pframe (ideally). The default settings really offer a good mix between compression effeciency and image quality. I would not worry about having q4 bvops.
I sort of bastardized the specifics I know, forgive me those who know better :) Just wanted to give a general idea here.
~misfit
nightrhyme
30th December 2004, 08:45
ok Thanx for reply.
Would like any suggestions to help get the best quality rip.
Ark
30th December 2004, 09:27
I personally use for high quality encodings:
- SixOfNine matrix at Costant Quantizer 3, with AQ and Qpel on, B-vops at default, VHQ4 (for B-vops too), Trellis.
IMHO the quality is amazing!
nightrhyme
30th December 2004, 16:31
Originally posted by Ark
I personally use for high quality encodings:
- SixOfNine matrix at Costant Quantizer 3, with AQ and Qpel on, B-vops at default, VHQ4 (for B-vops too), Trellis.
IMHO the quality is amazing!
Thanx will test that.
Did do a couple of encodes using sixofnine max=20 but was uncertain which Quant to go for.
Will sixofnine really look better at Quant3 than hvs-Best-Picture at Quant2 ?
And since I use GKnot should I use Undot() or not ?
Ark
30th December 2004, 16:42
Originally posted by nightrhyme
Thanx will test that.
Did do a couple of encodes using sixofnine max=20 but was uncertain which Quant to go for.
Will sixofnine really look better at Quant3 than hvs-Best-Picture at Quant2 ?
And since I use GKnot should I use Undot() or not ?
SixOfNine "uses" a different scale for quantizers, so that quality and size-wise quant 3 is almost equal to quant 2 in other matrices.
I remember a table in a post of Didée (who created this matrix) with the quantizer and their corrispectives for the other metrices...needs a search...
SixOfNine HVS gives compression ratios slightly higher, so it will result in a bit less bitrate than with max=20.
*remember to use qpel, as this matrix is designed to work with that on.*
Well, using or not GK not necessarily imply that you can or can't use undot... it's an Avisynth filter, and btw it's i suggest to use it, the quality impact is invisible and you gain a little bit of compressibility.
You can also try removegrain(mode=1) for the same effect, or (mode=2) for more filtering.
nightrhyme
30th December 2004, 16:43
Again thanx for advice.
Will run a series af tests :)
nightrhyme
30th December 2004, 20:49
Alright. Have done a lot of testing.
sixofnine looks the best at this bitrate.
Using Single Pass Target Quant = 3 with the following settings: XviD 1.3 koepi. sixofnine max=20 Matrix, B-Vobs Default, Motion Search precision 6, VHQ for B-Frames, Chroma motion, Quatization all 2-31 and Trellis Quantization.
However I'm still a little bothered by the jump in quant for the b-frames. Tried comparing encodes with quant 4 B-Frames and B-Frames Default (Quant5). But don't know how to make sure I pick 2 b-frames to compare.
Could someone explain how to do this ?
And do you guys think forcing the b-frames to Quant 4 is worth the jump in filesize ?
Or should I perhaps turn them off ?
DRF Analyzer Report - B-Frames-Default (http://hjem.tele2adsl.dk/nightrhyme/B-Frame-Default.txt)
DRF Analyzer Report - B-Frames-Quant.4 (http://hjem.tele2adsl.dk/nightrhyme/B-Frame-Q4.txt)
//Thanx in advance
ObiKenobi
30th December 2004, 20:58
Originally posted by nightrhyme
However I'm still a little bothered by the jump in quant for the b-frames.
Why? B-frames are meant to be more compressed than I and P frames so that's why they will have a higher quantizer.
Originally posted by nightrhyme
And do you guys think forcing the b-frames to Quant 4 is worth the jump in filesize ?
Not really, cause the difference in quality won't really warrant the change.
Originally posted by nightrhyme
Or should I perhaps turn them off ?
If you do this the filesize will be much larger then encode using b-frames as p-frames are significantly larger then a b-frame. If you aren't concerned about the filesize then you could do this.
Didée
30th December 2004, 21:29
Just leave the B-frame settings at default. B-frames look almost the same as P-frames with default settings, and when using a high bitrate matrix like SixOfNine, B-frames are already of higher quality compared to the default matrix or H263, due to the smaller quantizer steps.
To make sure what frametype actually is displayed, you have to decode your clip through ffdshow, and check the corresponding settings in the "OSD" tab.
Oh, you're encoding a 4:3 source at 800*592 - out of curiosity, is that true 4:3 content, or is it 16:9 anamorph?
Eventually you could try to apply more pre-processing to your source, to lower the bitrate.
A standard filter chain that achieves a *big* gain in compressability could be
WhateverSource()
crop(whatever)
undot()
temporalsoften(2,2,3,23,2) # or maybe even LimitedTemporalSoften()
converttoyuy2().PixieDust(2).Converttoyv12()
LimitedSharpen(dest_x=800,dest_y=592)
This will lower the needed bitrate by 15% ~ 25%, source dependant. The encoding time will raise by a big amount (two times or three times as much), and it is not sure that you like the visual effect at all. Some do, some do not. Encode some small parts, and decide for yourself.
jon.schaffer
30th December 2004, 21:31
Originally posted by nightrhyme
But don't know how to make sure I pick 2 b-frames to compare.
Could someone explain how to do this ?
You can use the FFDSHOW decoder. The OSD option can output the current frame-type. If you want to do a frame-by-frame analysis, I suggest you to use FFDSHOW and to open your file via an AviSynth script (with DIRECTSHOWSOURCE command) in VirtualDub.
I think you can simply use MediaPlayerClassic or BSPlayer (with Goto or Jump option) for the frame-by-frame viewing.
OR... you can compress the XviD with the option "print debug info on each frame". IIRC, the frame-type is given.
And do you guys think forcing the b-frames to Quant 4 is worth the jump in filesize ?
It's really hard to answer this. I've done a lot of testing and comparing about the B-frames subject. There's not just one perfect setting. The content of a movie is to be considered: some movies/scenes are better encoded with B-frames, some not. Moreover, in some cases, using B-frames lead to a samller file-size, in other cases to a larger one! (more rare, though, but I've seen it)
I think it's because B-frames were not created in order to be more compressed (higher Quant) but in order to carry more information (Bi-directional encoding). Their better quality at higher quant is a secondary consequence, that has been greatly used by encoders like XviD...
Or should I perhaps turn them off ?
Agreed with ObiKenobi for full-length movies...
But maybe an alternative: With 2 consecutive B-frames, the ringing effect in many scenes is too disturbing for me (look closer at scenes where an object moves behind a fiwed background...). I personally use 1 consecutive (sic) B-frame, less ringing but there's still a size gain.
(in fact, I even prefer Q2-Q3-Q2 sequence than Q2-Q4-Q2...)
Do not matter the theoric jump in quant. Trust your eyes.
nightrhyme
30th December 2004, 22:05
Wow a lot of info. Thanx so much guys.
Will have to mess a bit around with this OSD feature.
Figured out how to make screenshots of the frames with the OSD info on but it saves as BMP not PNG.
Didée The source is true 4:3 resized/Cropped from 720 x 576.
//Again Thanx
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.