Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th June 2006, 06:13   #21  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,256
Quote:
Originally Posted by huang_ch
and x264 does seems to use more b frames after the max is set to 16, but the overall bitrate & PSNR is also decrease a bit.
Hence why people don't allow the encoder to use a maximum of 16 b-frames and set the maximum to say 3 b-frames.

However!!! Your first post states that you did not see any major loss of video quality to your eyes with a max of 16.
So don't bother with metric calculations. Just use max 16.
Audionut is offline   Reply With Quote
Old 15th June 2006, 07:47   #22  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,415
Quote:
--crf 24 --ref 5 --mixed-refs --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --filter 4,4 --subme 6 --trellis 2 --analyse all --8x8dct --qpmin 14 --qpmax 28 --ipratio 1.6 --pbratio 1.6 --me umh --progress --no-dct-decimate
1) Well you must use constant size if you want make real comparison. More and more bframe with ratio for bframe imply less size and less quality too simply because average quantizer is more and more high.

2) If you want see bframe adaptive efficacity use crf with ratio = 1.0 for bframe. Here IMO if the adaptive algo is good then size will be less important with constant quality.

3) ipratio = 1.6 is totaly useless. Quality for IFrame will be too high and will produce certainely quality dropp.
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9
Sagittaire is offline   Reply With Quote
Old 15th June 2006, 14:01   #23  |  Link
huang_ch
Registered User
 
Join Date: Jul 2004
Posts: 169
I've tried to increase the value of -crf(25,26) to get the bitrate of bframe-3 closer to 288Kbps (b-frame16) and the PSNR is also about 0.3 higher than b-frame16 with crf24. Does this mean I should prefer less b-frame with higher crf than higher b-frame with lower crf to encode this content? Even try b-frame1?
huang_ch is offline   Reply With Quote
Old 15th June 2006, 14:04   #24  |  Link
huang_ch
Registered User
 
Join Date: Jul 2004
Posts: 169
Quote:
Originally Posted by Sagittaire
3) ipratio = 1.6 is totaly useless. Quality for IFrame will be too high and will produce certainely quality dropp.
I'm not quit familiar with --ipratio & --pbratio, but after I increase them all to 1.6 from the default 1.4/1.3, the PSNR really increased a bit. But I didn't try to individually increase them, will try later.
huang_ch is offline   Reply With Quote
Old 15th June 2006, 16:09   #25  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,415
Well if you don't know then simply don't touch default setting ...

Use 16 adaptative bframe is simply useless because in most case x264 never use it (no more than 3 bframe for perhaps 99.9% of the cases). IMO best setting are 2 bframes or 3 pyramidal bframes. Use "over setting" for max bframe is simply useless and potentially worst if you use no adaptative bframe.
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9
Sagittaire is offline   Reply With Quote
Old 15th June 2006, 18:16   #26  |  Link
MeteorRain
紺野木綿季
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 468
Quote:
Originally Posted by huang_ch
I'm not quit familiar with --ipratio & --pbratio, but after I increase them all to 1.6 from the default 1.4/1.3, the PSNR really increased a bit. But I didn't try to individually increase them, will try later.
eg if you use ip/pb ratio 1.6, and if your p-frame is encoded in q24, then i-frame would be q15 and b-frame would be 38~39

mean, i-frame encoded in really good quality, and b-frame encoded in really bad quality.

when you use more b-frames, since the quantizer rises, the filesize reduces, the quality decreases.

if you want a real comparation about the problem, you could consider setting ip/pb ratio to 1.0, or just use -qp instead of -crf. in that case, b-frame is encoded at the same quantizer of p-frame. using more b-frames won't decrease quality lot.
MeteorRain is offline   Reply With Quote
Old 15th June 2006, 21:51   #27  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,393
Quote:
Originally Posted by MeteorRain
eg if you use ip/pb ratio 1.6, and if your p-frame is encoded in q24, then i-frame would be q15 and b-frame would be 38~39
No. ip- & pb-ratio are measured in bitrate (as a bonus on top of the different rates inherently caused by different frame types), not in QP.
QP is an exponential scale, so it does not make sense to ever multiply a QP by anything.
akupenguin is offline   Reply With Quote
Old 16th June 2006, 03:31   #28  |  Link
huang_ch
Registered User
 
Join Date: Jul 2004
Posts: 169
Quote:
Originally Posted by akupenguin
No. ip- & pb-ratio are measured in bitrate (as a bonus on top of the different rates inherently caused by different frame types), not in QP.
QP is an exponential scale, so it does not make sense to ever multiply a QP by anything.
Is the ratio used as a constant ratio or an adaptive(maximum) ratio?
huang_ch is offline   Reply With Quote
Old 16th June 2006, 05:04   #29  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,393
pb-ratio is constant.
ip-ratio is a maximum, and in 2pass it will decrease for very short GOPs.
akupenguin is offline   Reply With Quote
Old 16th June 2006, 07:14   #30  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,256
That explains why, with a low ip-ratio it will often result in a lower average P quant than I quant.

Thanks.
Audionut is offline   Reply With Quote
Old 16th June 2006, 10:49   #31  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,393
What explains what?

The reason you can have higher average I quant than average P-quant is that high motion scenes get higher quant than low motion, and high motion scenes have more scenecuts.
That would be true regardless of how ip-ratio works, though for large ip-ratio you'd need a very uneven distribution for the averages to still end up like that.
(Same for P vs B)
akupenguin is offline   Reply With Quote
Old 16th June 2006, 13:46   #32  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,256
With all the encodes I have done thus far, with the default ip-ratio of 1.4, the P frame quantizers are always are higher value than I frame quantizers.
Say I-frames = quant 17 and P-frames = quant 18

But if I reduce the ip-ratio to 1.05 or even 1.10, then often (not always), I generally end up with P frame quantizers that have a lower value than I frame quantizers.
Say I-frames = quant 17 and P-frames = quant 16.8

I never expanded on why this would be the case.
When you said that ip-ratio is a maximum value and not an absolute value I assumed that was the reason why lower ip-ratio's would result in the findings as stated above.


Thanks for the clarification. Again.
Audionut is offline   Reply With Quote
Old 16th June 2006, 14:18   #33  |  Link
unmei
frying subs
 
unmei's Avatar
 
Join Date: Jan 2003
Location: ch-2500
Posts: 891
Quote:
Originally Posted by Sagittaire
Use 16 adaptative bframe is simply useless because in most case x264 never use it (no more than 3 bframe for perhaps 99.9% of the cases).
I definitly wouldn't say that. Or a lot of my anime and esp. cartoon encodings fall into the remaining 0.1%
I never checked the stats file, but from x264 stats at the end of the encode it's not so uncommon for me to have close to 3 B-frames per one P-Frame and in a recent case i had over 3.5 B-frames per P-frame (as per the total number of frames encoded in each mode, thus the overall average).
__________________
-nyo
unmei is offline   Reply With Quote
Old 16th June 2006, 16:32   #34  |  Link
huang_ch
Registered User
 
Join Date: Jul 2004
Posts: 169
Quote:
Originally Posted by Audionut
But if I reduce the ip-ratio to 1.05 or even 1.10, then often (not always), I generally end up with P frame quantizers that have a lower value than I frame quantizers.
Say I-frames = quant 17 and P-frames = quant 16.8
Does that mean, if I reduced ip ratio to rather low, and got quant of p higher than I, the overall quality/quant will be improved? Is it the same to b-frames?
huang_ch is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.