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 1st June 2013, 22:11   #21  |  Link
jq963152
Registered User
 
Join Date: Apr 2012
Posts: 691
Quote:
Originally Posted by Groucho2004 View Post
What were the reported QP values?
Do you mean those:


Quote:
x264 [info]: frame I:7 Avg QP:42.29 size: 11828
x264 [info]: frame P:1794 Avg QP:36.10 size: 34432


?

Quote:
Originally Posted by Groucho2004 View Post
I bet 51. Which is as high as it can get with x264.
That seems to be wrong.

From the x264 fullhelp:


Quote:
Originally Posted by x264 fullhelp
Code:
  -q, --qp <integer>          Force constant QP (0-69, 0=lossless)
      --crf <float>           Quality-based VBR (0-51) [23.0]


So, CRF can go up to 51 but QP can go up to 69.

But, anyway, akupenguin said that there would be "virtual QPs above 51"?

@ akupenguin:

With "above 51", did you mean 52 to 69? Or did you mean that there are also virtual QPs above 69, like 99 or 999 for example?
jq963152 is offline   Reply With Quote
Old 2nd June 2013, 02:02   #22  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,393
QPs 52 to 69 are the virtual ones. They show up as "51" on the summary.

When I run `x264 --crf 1 --vbv-maxrate 1 --vbv-bufsize 1 --tune grain`, I get:
Code:
yuv [info]: 1280x528p 0:0 @ 25/1 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 3.1
x264 [warning]: VBV underflow (frame 0, -1800 bits)
x264 [warning]: VBV underflow (frame 1, -208 bits)
x264 [warning]: VBV underflow (frame 2, -200 bits)
x264 [warning]: VBV underflow (frame 3, -232 bits)
x264 [warning]: VBV underflow (frame 4, -208 bits)
... (warning for every frame)
x264 [info]: frame I:21    Avg QP:51.00  size:   262
x264 [info]: frame P:516   Avg QP:51.00  size:    36
x264 [info]: frame B:487   Avg QP:51.00  size:    31
x264 [info]: consecutive B-frames: 13.5% 61.7% 22.9%  2.0%
x264 [info]: mb I  I16..4:  0.0% 100.0%  0.0%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
x264 [info]: 8x8 transform intra:100.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:7.60
And the output video is not merely unwatchably low quality but rather contains no information at all: x264 quantized all of the coefficients to 0, leaving a blank grey rectangle. This still wasn't low enough bitrate, because there is no such thing as a 1kb/s 25fps h264 video. Frame headers alone are bigger than that, before you even get to the skipped MBs which cost a fraction of a bit each.

Last edited by akupenguin; 2nd June 2013 at 06:45.
akupenguin is offline   Reply With Quote
Old 2nd June 2013, 10:43   #23  |  Link
jq963152
Registered User
 
Join Date: Apr 2012
Posts: 691
Hmm, i tried again. But this time with --preset medium. Previously i was using --preset ultrafast.

Here's the log of --tune grain --crf 1 --vbv-bufsize 1 --vbv-maxrate 1 (no preset specified, i.e. Medium preset):


Quote:
Code:
raw [info]: 1920x1080p 1:1 @ 30/1 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
x264 [info]: profile High, level 4.0
x264 [warning]: VBV underflow (frame 0, -3572 bits)
x264 [warning]: VBV underflow (frame 1, -519 bits)
x264 [warning]: VBV underflow (frame 2, -543 bits)
x264 [warning]: VBV underflow (frame 3, -599 bits)
x264 [warning]: VBV underflow (frame 4, -551 bits)
x264 [warning]: VBV underflow (frame 5, -551 bits)
... (warning for every frame)
x264 [info]: frame I:38    Avg QP:51.00  size:   559
x264 [info]: frame P:1503  Avg QP:51.00  size:    74
x264 [info]: frame B:260   Avg QP:51.00  size:    69
x264 [info]: consecutive B-frames: 71.1% 28.9%  0.0%  0.0%
x264 [info]: mb I  I16..4:  0.0% 100.0%  0.0%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
x264 [info]: 8x8 transform intra:100.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:6.1% UV:3.5%
x264 [info]: kb/s:19.98

So, as you can see, with --preset medium it seems to work like it did for you.

But here is the log of --preset ultrafast --tune grain --crf 1 --vbv-bufsize 1 --vbv-maxrate 1 (same as above but Ultrafast preset instead of Medium preset):


Quote:
Code:
raw [info]: 1920x1080p 1:1 @ 30/1 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
x264 [info]: profile Constrained Baseline, level 4.0
x264 [warning]: VBV underflow (frame 0, -121156 bits)
x264 [warning]: VBV underflow (frame 1, -30335 bits)
x264 [warning]: VBV underflow (frame 2, -29959 bits)
x264 [warning]: VBV underflow (frame 3, -29351 bits)
x264 [warning]: VBV underflow (frame 4, -186255 bits)
x264 [warning]: VBV underflow (frame 5, -178479 bits)
... (warning for every frame)
x264 [info]: frame I:7     Avg QP:42.29  size: 11828
x264 [info]: frame P:1794  Avg QP:36.10  size: 34432
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4: 22.7%  0.0%  0.0%  P16..4: 15.0%  0.0%  0.0%  0.0%  0.0%    skip:62.3%
x264 [info]: coded y,uvDC,uvAC intra: 51.2% 18.4% 3.8% inter: 14.7% 6.4% 1.8%
x264 [info]: i16 v,h,dc,p: 35% 19% 31% 14%
x264 [info]: i8c dc,h,v,p: 56% 20% 18%  5%
x264 [info]: kb/s:8242.62

So, as you can see, with --preset ultrafast it does not work .

Why?

A Bug?

PS: Haven't tested other presets.

Quote:
Originally Posted by akupenguin View Post
A because there is no such thing as a 1kb/s 25fps h264 video.
What's the minimum bitrate for each Profile @ Level?

Last edited by jq963152; 2nd June 2013 at 11:19.
jq963152 is offline   Reply With Quote
Old 2nd June 2013, 11:39   #24  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,570
ultrafast and superfast don't use mbtree - maybe that's where the difference comes from?
sneaker_ger is offline   Reply With Quote
Old 2nd June 2013, 11:53   #25  |  Link
MasterNobody
Registered User
 
Join Date: Jul 2007
Posts: 536
That is due --rc-lookahead 0 in --preset ultrafast i.e. lookahead for VBV is disabled.
MasterNobody is offline   Reply With Quote
Old 2nd June 2013, 18:54   #26  |  Link
jq963152
Registered User
 
Join Date: Apr 2012
Posts: 691
Thanks for your replies.

But:


Quote:
Originally Posted by MasterNobody View Post
That is due --rc-lookahead 0 in --preset ultrafast i.e. lookahead for VBV is disabled.

Please explain further.

Does --rc-lookahead 0 (included in --preset ultrafast and --preset superfast) make --vbv-bufsize --vbv-maxrate non-functional, or what ?
jq963152 is offline   Reply With Quote
Old 2nd June 2013, 19:50   #27  |  Link
paradoxical
Guest
 
Posts: n/a
No, he said that lookahead for VBV was disabled not that VBV was disabled.
  Reply With Quote
Old 2nd June 2013, 21:35   #28  |  Link
jq963152
Registered User
 
Join Date: Apr 2012
Posts: 691
Then why did the --preset ultrafast encode came out at 8242 Kbps while the --preset medium encode came out at 19 Kbps, even though both were set to --vbv-bufsize 1 --vbv-maxrate 1 ?

To me that looks like as if --preset ultrafast (i.e. --rc-lookahead 0) made --vbv-bufsize 1 --vbv-maxrate 1 non-functional...
jq963152 is offline   Reply With Quote
Old 2nd June 2013, 23:18   #29  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,688
Most likely for some reason or another the VBV algorithm tripped up given those absurd parameters (crf 1, VBV 1) and neutered analysis settings.

Obviously it still had some effect; if not, the QP would have been about 40 steps lower.
Dark Shikari is offline   Reply With Quote
Reply

Tags
.stats, crf, rate controlm logging

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 15:22.


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