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. |
19th June 2010, 00:48 | #1 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
[2-pass] Inaccurate average bitrate
x264 r1649 (64bit) from x264.nl
Avatar BD Code:
C:\>"C:\Users\Dawid\Documents\Delphi_Projects\RipBot264\tools\avs2yuv\pipebuf.exe" "C:\Users\Dawid\Documents\Delphi_Projects\RipBot264\tools\avs2yuv\avs2yuv.exe" "C:\temp\RipBot264temp\job1\job1.avs" - : "C:\Users\Dawid\Documents\Delphi_Projects\RipBot264\tools\x264\x264_x64.exe" --pass 1 --bitrate 2966 --stats "C:\temp\RipBot264temp\job1\job1.stats" --fps 24000/1001 --force-cfr --min-keyint 24 --keyint 240 --frames 232606 --sar 1:1 --level 4.0 --aud --nal-hrd vbr --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --bframes 3 --b-adapt 1 --b-pyramid none --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh --stdin y4m --output "C:\temp\RipBot264temp\video.264" - : 2 y4m [info]: 1280x720p 1:1 @ 10000000/417083 fps (cfr) x264 [info]: using SAR=1/1 x264 [warning]: VBV bitrate (25000) > level limit (20000) x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 x264 [info]: profile Main, level 4.0 C:\temp\RipBot264temp\job1\job1.avs: 1280x720, 10000000/417083 fps, 232606 frames x264 [info]: frame I:2585 Avg QP:21.94 size: 77743 x264 [info]: frame P:127011 Avg QP:25.21 size: 22405 x264 [info]: frame B:103010 Avg QP:27.13 size: 5309 x264 [info]: consecutive B-frames: 23.2% 46.3% 14.5% 15.9% x264 [info]: mb I I16..4: 33.5% 0.0% 66.5% x264 [info]: mb P I16..4: 21.5% 0.0% 0.0% P16..4: 57.7% 0.0% 0.0% 0.0% 0.0% skip:20.8% x264 [info]: mb B I16..4: 1.8% 0.0% 0.0% B16..8: 24.4% 0.0% 0.0% direct: 6.7% skip:67.1% L0:28.1% L1:49.6% BI:22.4% x264 [info]: final ratefactor: 22.92 x264 [info]: coded y,uvDC,uvAC intra: 41.4% 46.3% 15.8% inter: 19.1% 13.6% 1.6% x264 [info]: i16 v,h,dc,p: 31% 22% 24% 23% x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 20% 18% 4% 10% 6% 7% 6% 8% x264 [info]: i8c dc,h,v,p: 57% 18% 19% 6% x264 [info]: Weighted P-Frames: Y:3.2% x264 [info]: kb/s:2963.25 encoded 232606 frames, 15.37 fps, 2963.25 kb/s C:\>"C:\Users\Dawid\Documents\Delphi_Projects\RipBot264\tools\avs2yuv\pipebuf.exe" "C:\Users\Dawid\Documents\Delphi_Projects\RipBot264\tools\avs2yuv\avs2yuv.exe" "C:\temp\RipBot264temp\job1\job1.avs" - : "C:\Users\Dawid\Documents\Delphi_Projects\RipBot264\tools\x264\x264_x64.exe" --pass 2 --bitrate 2966 --stats "C:\temp\RipBot264temp\job1\job1.stats" --fps 24000/1001 --force-cfr --min-keyint 24 --keyint 240 --frames 232606 --sar 1:1 --level 4.0 --aud --nal-hrd vbr --vbv-bufsize 25000 --vbv-maxrate 25000 --filter 0,0 --ref 3 --bframes 3 --b-adapt 1 --b-pyramid none --subme 7 --aq-mode 1 --trellis 1 --partitions all --me umh --stdin y4m --output "C:\temp\RipBot264temp\video.264" - : 2 y4m [info]: 1280x720p 1:1 @ 10000000/417083 fps (cfr) x264 [info]: using SAR=1/1 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 x264 [info]: profile High, level 4.0 C:\temp\RipBot264temp\job1\job1.avs: 1280x720, 10000000/417083 fps, 232606 frames x264 [info]: frame I:2585 Avg QP:24.86 size: 58349 x264 [info]: frame P:127011 Avg QP:26.49 size: 22757 x264 [info]: frame B:103010 Avg QP:28.91 size: 5485 x264 [info]: consecutive B-frames: 23.2% 46.3% 14.5% 15.9% x264 [info]: mb I I16..4: 14.4% 68.0% 17.6% x264 [info]: mb P I16..4: 2.4% 9.5% 2.0% P16..4: 42.2% 11.8% 2.7% 0.4% 0.3% skip:28.7% x264 [info]: mb B I16..4: 0.3% 1.0% 0.1% B16..8: 40.3% 5.0% 1.0% direct: 1.6% skip:50.6% L0:37.2% L1:57.8% BI: 5.1% x264 [info]: 8x8 transform intra:68.5% inter:74.9% x264 [info]: coded y,uvDC,uvAC intra: 62.4% 65.1% 32.2% inter: 18.3% 15.8% 2.3% x264 [info]: i16 v,h,dc,p: 32% 19% 8% 41% x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 14% 15% 7% 10% 10% 10% 9% 9% x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 16% 13% 7% 12% 10% 11% 7% 7% x264 [info]: i8c dc,h,v,p: 57% 17% 18% 8% x264 [info]: Weighted P-Frames: Y:3.7% x264 [info]: ref P L0: 62.4% 22.4% 10.5% 4.4% 0.3% x264 [info]: ref B L0: 93.1% 6.9% x264 [info]: kb/s:2973.73 encoded 232606 frames, 11.83 fps, 2973.73 kb/s
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
19th June 2010, 00:54 | #2 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
You're complaining about an inaccuracy of 0.26%? Seriously? Is this some kind of practical joke?
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 19th June 2010 at 09:03. |
19th June 2010, 07:09 | #3 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
This is not a one case http://forum.doom9.org/showthread.ph...19#post1409119
Accuracy is crucial for AVCHD. BTW. Shouldn't be more accurate with longer footage?
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper Last edited by Atak_Snajpera; 19th June 2010 at 07:15. |
19th June 2010, 07:11 | #4 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 19th June 2010 at 09:06. |
|
19th June 2010, 08:31 | #6 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Lowering qcomp should not affect this at all. If it does, it's sheer dumb luck. It's no different from any other trivial modification to settings -- it's rerolling the dice on something that is 100% random.
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 19th June 2010 at 09:02. |
19th June 2010, 11:58 | #9 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
It probably would help, if x264 didn't hit the desired target bitrate by accident, i.e. x264 is off by more than what is to be expected. But in this case the deviation from the target bitrate is within the expected range. x264 intentionally doesn't hit the target bitrate 100% exact, because (as far as I know) enforcing the bitrate too strictly would hurt quality. So if you do a third (or even forth pass), x264 still won't hit the bitrate 100% accurate, as it still doesn't try to. I assume using "--slow-firstpass" won't help either, for the very same reason. I wonder if "--ratetol" has an effect on 2-Pass...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 19th June 2010 at 12:03. |
|
19th June 2010, 12:16 | #11 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Then this should be solution here, right ???
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
19th June 2010, 12:23 | #12 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Of course.
There is a way that x264 can be improved here slightly though. Currently the rate tolerance converges to zero towards the end of the video. But this isn't useful if the end of the video has no bits to adjust anyways (e.g. all black, like the end of the credits). So I've made a commit locally to do the adjustment based on the position in the video bit-wise instead of frame-wise. This reduced misprediction by 50% on a quick contrived test case. |
19th June 2010, 21:28 | #13 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
Quote:
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
|
19th June 2010, 22:24 | #15 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
Quote:
2966 kbps / 2974 kbps = 0.9973100201748487 * 4483 MB (<- size with 2974kbps) = 4471 MB
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
|
19th June 2010, 22:57 | #17 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
I give up as well Your Highness. Obviously We are not on the same page.
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper Last edited by Atak_Snajpera; 19th June 2010 at 23:01. |
19th June 2010, 23:10 | #18 | Link | |
Registered User
Join Date: Nov 2003
Posts: 1,281
|
Yeah, If I'm encoding for media I always leave enough room.
So If the bitrate calc says encode at 3460, I'll encode it at 3400. Honestly, 60kb/s is neither here nor there when aiming for size. And I know I won't have to re-encode because the encoder overshoot the bitrate. Quote:
So, the way x264 works, shaving a few kb/s off the encode and having that encode hit 2950, is better than an encoder made to hit 2966 exactly. It just means that the end user has to apply a little common sense. Besides, I challenge you 2 find the difference in quality between 2966 and 29??
__________________
http://www.7-zip.org/ Last edited by Audionut; 19th June 2010 at 23:24. |
|
19th June 2010, 23:47 | #19 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
|
LOL why don't you just undershoot the bitrate by like 1%??? I always do at least this much when I'm preparing stuff for optical media.
Derek
__________________
These are all my personal statements, not those of my employer :) |
20th June 2010, 00:43 | #20 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Clearly.
If you don't like the fact that x264 doesn't hit the target bitrate exactly, why don't you use ratetol as suggested? If this doesn't satisfy you - like you're getting 4789.01 Kbps instead of 4789.0 Kbps - how about looking for a different encoder that can do it better? |
Thread Tools | Search this Thread |
Display Modes | |
|
|