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. |
16th April 2009, 12:53 | #1 | Link |
Registered User
Join Date: Oct 2007
Posts: 1,060
|
How many b-frames?
How do you find out how many b-frames are actually used in a video?
Is there a sample clip that makes x264 use 16 (or a large number of) b-frames and ref-frames? Last edited by Chengbin; 16th April 2009 at 13:00. |
16th April 2009, 13:13 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Look at the final output of x264 in the console. It prints the percentage for each number of consecutive b-frames.
And take care that the first number means zero b-frames, the second number means one b-frame and so on... (You will notice that even with "--b-adapt 2" and "--bframe 16" it will hardly go above ~5 consecutive b-frames) --[EDIT]-- It usually looks like this: Code:
x264 [info]: slice I:1 Avg QP:20.11 size: 98726 x264 [info]: slice P:128 Avg QP:25.58 size: 16829 x264 [info]: slice B:170 Avg QP:28.69 size: 5555 x264 [info]: consecutive B-frames: 6.7% 36.2% 46.3% 10.7% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% x264 [info]: mb I I16..4: 1.1% 90.2% 8.6% x264 [info]: mb P I16..4: 0.1% 9.0% 1.2% P16..4: 45.2% 19.2% 14.6% 0.4% 0.5% skip: 9.8% x264 [info]: mb B I16..4: 0.0% 0.6% 0.1% B16..8: 48.1% 3.6% 4.2% direct: 4.9% skip:38.3% L0:39.0% L1:50.4% BI:10.5% x264 [info]: 8x8 transform intra:86.6% inter:70.5% x264 [info]: direct mvs spatial:97.1% temporal:2.9% x264 [info]: ref P L0 73.4% 11.8% 5.1% 3.1% 2.2% 1.9% 1.4% 1.2% x264 [info]: ref B L0 80.1% 11.7% 3.3% 1.8% 1.2% 1.2% 0.7% x264 [info]: ref B L1 95.3% 4.7% x264 [info]: kb/s:2138.7
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th April 2009 at 13:21. |
16th April 2009, 14:15 | #4 | Link |
Silent Reader
Join Date: Dec 2003
Location: Germany
Posts: 295
|
Maybe it's 1bframe=6.7%, 2bframes=36.2%...
Why should it show how many bframes are not used. It shows how usage is divided. In example --bframe 4 would be enough. If all starting numbers are 0% and 8th is 1%, then there is one or more scenes in clip, where codec put 8 bframes in a row. Very unusual and impossible, because all numbers together are around 100%. ---- ok, forget this, I don't delete it, but its wrong --- I will try to explain in above example Clip has 299 Frames 1 I-frame 128 P-frames 170 B-frames 6.7% of these bframes are solo = around 11 bframes 36.2% have another bframe as neighbor 46.3% do a triple and so on Following is possible but rare: bframes: 68% 24% 0% 0% 5% 0% 2% 0% 1% .............1.....2.....3....4...5....6...7....8....9....10.... ----snap---- Last edited by Wishbringer; 16th April 2009 at 14:34. Reason: Forget my adds |
16th April 2009, 14:18 | #5 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
No, it's not like that! That's why I said you should take care... (Why do you think there are 17 numbers, but the maximum number of consecutive B-Frames is only 16 ???) Quote:
Of course allowing up to 16 consecutive B-Frames never hurts quality, but the benefit will be very very small, if it all. So it's not worth the additional time, especially when using "--b-adapt 2", which becomes really SLOW with a high number of B-Frames... (In my example using more than three consecutive B-Frames doesn't give any benefit at all)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th April 2009 at 14:27. |
||
16th April 2009, 14:20 | #6 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
coz x264 shows b-frames usage in that way. the first number represent 0 consecutive b-frames.
if you're not a coder or a power user you should not even care about the bframes distribution...
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
16th April 2009, 14:21 | #8 | Link |
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
Yes...
if what you said was true (which is not) then the non consecutive b-frames would be logged as non cosecutive... hence would be in the second column (1 bframe).
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
16th April 2009, 14:22 | #9 | Link |
Registered User
Join Date: Dec 2007
Posts: 639
|
Sorry, I was responding to LoRd_MuldeR. You posted inbetween and my net was being sluggish so I didn't manage to add the quote fast enough.
No, what I'm saying is that 0 consecutive B-frames were used, so it could look like this: I,P,B,P,P... if 1 is used, it would look like this: I,P,B,B,P,P... it's the amount of consecutive B-frames, which, in my interpretation and logic, means the amount of B-frames that follow a B-frame. Last edited by Comatose; 16th April 2009 at 14:25. |
16th April 2009, 14:25 | #12 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
Zero B-frames indicates a sequence of zero B-frames. I forget exactly how the terms go (but akupenguin or Dark Shikari posted on this) but they indicate the number of PP, PBP, PBBP, PBBBP, etc sequences out of the total number of sequences.
See: http://forum.doom9.org/showthread.ph...81#post1163681 [EDIT] Jeez, a lot of posts appeared while searching
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. |
16th April 2009, 14:28 | #13 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
So, for example, if you have: PPPPBPBB This is really: P <-size 1 P <-size 1 P <-size 1 PB <-size 2 PBB <-size 3 So the %s are: (1+1+1)/(1+1+1+2+3) = 37.5% 2 / (1+1+1+2+3) = 25% 3 / (1+1+1+2+3) = 37.5% or 37.5% 25% 37.5% |
|
16th April 2009, 14:28 | #14 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
The only possible cases with a maximum of 4 consecutive B-Frames are 0, 1, 2, 3 and 4 consecutive B-Frames.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
|
16th April 2009, 14:29 | #15 | Link | |
Registered User
Join Date: Dec 2007
Posts: 639
|
Quote:
Consecutive implies that they follow something, without interruption. So having 0 consecutive B-frames still doesn't mean there were no B-frames AT ALL, just that there weren't any cases like PBB, and that's misleading. Again, I'm not saying this is what happens in practice, but merely that the wording is misleading. |
|
16th April 2009, 14:33 | #17 | Link |
Registered User
Join Date: Dec 2007
Posts: 639
|
So then am I the only person who understands the meaning of 'consecutive'? I'm not saying it should be omitted, I'm saying it should be changed to something that, when read without prior knowledge, would give you the right idea.
|
16th April 2009, 14:33 | #18 | Link |
Registered User
Join Date: Oct 2007
Posts: 1,060
|
Is it possible to find the time stamp where x264 uses 16 b-frames and 16 ref-frames? I want to do some stress testing on my 5, and see how many b and ref-frames it actually supports.
We've been talking about a lot about b-frames, but my other question about number of ref-frame has not been answered yet. How do you find the number of ref-frames? |
16th April 2009, 14:34 | #19 | Link | ||
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
Quote:
There is no vagueness here except in your mind.It was changed to the current one for exactly the reason you stated.
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 16th April 2009 at 14:37. |
||
16th April 2009, 14:35 | #20 | Link | ||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Quote:
The same is possible with DGAVCIndex... Code:
x264 [info]: slice I:1 Avg QP:20.11 size: 98726 x264 [info]: slice P:128 Avg QP:25.58 size: 16829 x264 [info]: slice B:170 Avg QP:28.69 size: 5555 x264 [info]: consecutive B-frames: 6.7% 36.2% 46.3% 10.7% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% x264 [info]: mb I I16..4: 1.1% 90.2% 8.6% x264 [info]: mb P I16..4: 0.1% 9.0% 1.2% P16..4: 45.2% 19.2% 14.6% 0.4% 0.5% skip: 9.8% x264 [info]: mb B I16..4: 0.0% 0.6% 0.1% B16..8: 48.1% 3.6% 4.2% direct: 4.9% skip:38.3% L0:39.0% L1:50.4% BI:10.5% x264 [info]: 8x8 transform intra:86.6% inter:70.5% x264 [info]: direct mvs spatial:97.1% temporal:2.9% x264 [info]: ref P L0 73.4% 11.8% 5.1% 3.1% 2.2% 1.9% 1.4% 1.2% x264 [info]: ref B L0 80.1% 11.7% 3.3% 1.8% 1.2% 1.2% 0.7% x264 [info]: ref B L1 95.3% 4.7% x264 [info]: kb/s:2138.7
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 16th April 2009 at 14:38. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|