View Full Version : Question about x264 warning I get when encoding
PurpleMan
9th October 2012, 10:03
Hello everyone,
can anyone explain why I'm getting the warning message in bold below?
C:\5>avs2yuv.exe "c:\5\mib3.avs" -o - | x264-10bit-x64.exe --profile high10 --frames 152232 --preset veryslow --crf 18.25 --threads auto --thread-input --stdin y4m --output "c:\5\out.264" -
infile 'C:\5\mib3.avs" doesn't look like an avisynth script
c:\5\mib3.avs: 1920x2080, 24000/1001 fps, 152232 frames
y4m [info]: 1920x2080p 0:0 @ 24000/1001 fps (cfr)
x264 [warning]: DPB size (16 frames, 95846400 bytes) > level limit (11 frames, 70778880 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High 10, level 5.1, 4:2:0 10-bit
What does it mean, is it significant, and how to prevent it from happening?
Thank you :)
LoRd_MuldeR
9th October 2012, 11:39
Is this really the complete command-line?
I ask, because it seems x264 is trying to hit H.264 Level 5.1, although I cannot see "--level 5.1" in your command-line. Well, maybe x264 will default to "5.1", if you don't specify a lower one.
Anyway, the warning "DPB size > level limit" says that the DPB (Decoded Picture Buffer) size of the selected (effective) H.264 Level is not large enough to hold 16 reference frames at 1920x2080 (and 10-Bit per pixel).
So the stream will not actually be fully compatible to H.264 Level 5.1, which might be a problem for hardware players that supper Level 5.1 at maximum. But hardware players don't support 10-Bit anyway ;)
If Level compliance is anything you care about, then you may resolve the problem by forcing the ref frames to a lower value than 16. The 16 is currently is set via "--preset veryslow", but you can overwrite it by specifying "--ref" explicitly.
See also:
http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels
PurpleMan
9th October 2012, 12:08
Yes, this is the complete command line.
I've previously encoded a larger resolution (1920x2160) with the same settings and did not receive that warning message.
As for the 5.1 level, I think it's implied by the '--profile high10', but I could be mistaken.
The content is not intended for hardware playback, only PC.
LoRd_MuldeR
9th October 2012, 12:20
I've previously encoded a larger resolution (1920x2160) with the same settings and did not receive that warning message.
Then you probably used fewer reference frames or you didn't use 10-Bit.
As for the 5.1 level, I think it's implied by the '--profile high10', but I could be mistaken.
I don't think so. H.264 Level and Profile are two separate things. But why do you set "--profile" explicitly at all? x264 will automatically choose the proper Profile.
So you can leave that one out, except when you want to enforce a lower Profile than what x264 would set. But for 10-Bit H.264 you are going to need the "High10" Profile anyway, so it's pointless.
The content is not intended for hardware playback, only PC.
Then there's not much to worry about. Software decoders usually are not picky about Profile/Level restrictions. As long as you have a decoder that handles 10-Bit H.264 you should be fine.
"Hardware acceleration" won't work anyway, with 10-Bit streams...
akupenguin
9th October 2012, 14:16
It seems x264 is trying to hit H.264 Level 5.1, although I cannot see "--level 5.1" in your command-line. Well, maybe x264 will default to "5.1", if you don't specify a lower one.
x264 defaults to the lowest level that matches your settings, or the highest level in existence if none of them fit. There is a level 5.2, but it was only added a few months ago, and doesn't increase DPB compared to 5.1 anyway.
PurpleMan
9th October 2012, 21:35
Then you probably used fewer reference frames or you didn't use 10-Bit.
Nope, that's the weird thing. I always use the same command and I never stumbled on that warning. This is exactly what led me into posting this thread (i.e. "why now?")
LoRd_MuldeR
10th October 2012, 00:33
...because it also depends on the content (input).
The H.264 Level defines the maximum DPB size, the resolution of the video defines how many bytes one frame occupies in the DPB, and the number of reference frames (--ref) specifies the number of frames that need to fit into the DPB.
So higher resolutions means bigger frames and thus fewer reference frames. Last but not least, have you always been using 10-Bit x264? With 10 Bit/Pixel the frames should occupy more space in the DBP than with 8 Bit/Pixel...
vivan
10th October 2012, 01:56
With 10 Bit/Pixel the frames should occupy more space in the DBP than with 8 Bit/Pixel...... however standart specifies DBP limit in macroblocks, not in bytes.
E.g. 184320 macroblocks for 5.1, which equals to 88473600 bytes for Hi10P (15 bpp) and 70778880 bytes for HiP (12 bpp).
So with any profile number of maximum reference frames (for given resolution) is the same.
PurpleMan
10th October 2012, 09:20
Always same command, always 10bit x264. Nothing changed yet first time I see this warning. The last movie I encoded was 1080p Over-and-Under (1920x2160) and no warning message.
LoRd_MuldeR
10th October 2012, 11:01
... however standart specifies DBP limit in macroblocks, not in bytes.
E.g. 184320 macroblocks for 5.1, which equals to 88473600 bytes for Hi10P (15 bpp) and 70778880 bytes for HiP (12 bpp).
So with any profile number of maximum reference frames (for given resolution) is the same.
The copy of the specs that I was looking at defines "Max decoded picture buffer size MaxDPB" in units of "1024 bytes". For Level 5.1 it is defined as "69120.0" (×1024 bytes).
Though for non-mod16 video we have to round up the width/height to the next macro-block boundary, so it should be "floor((MaxDPB * 1024 * 8) / ((16*ceil(width/16)) * (16*ceil(height/16)) * 12)", assuming 8-Bit and 4:2:0.
With that formula I get a maximum of "9" ref frames (9.6 rounded down to 9) for 2560×1920 video, which is the same number that Wikipedia suggests. And with 10-Bit it should be "7" (7.68 rounded down to 7).
(Unless the values of "MaxDPB" are defined differently for "High10" Profile, which I'm not quite sure about)
Always same command, always 10bit x264. Nothing changed yet first time I see this warning. The last movie I encoded was 1080p Over-and-Under (1920x2160) and no warning message.
Well, something must have changed.
Either the resolution of your input, the number of reference frames you selected (either directly via "--ref" or indirectly via "--preset") or maybe the x264 version you were using.
Or you just didn't notice the warning before?
vivan
10th October 2012, 15:48
The copy of the specs that I was looking at defines "Max decoded picture buffer size MaxDPB" in units of "1024 bytes". For Level 5.1 it is defined as "69120.0" (×1024 bytes).Time to update ;) Your copy is from 2007 and was superseded in 2009. And since then it was updated 4 times... So current version is http://www.itu.int/rec/T-REC-H.264-201201-I/en (2012).
Also I've found what was corrected in 2009.
http://firepic.org/images/2012-10/10/ksk9qolek40i.png
setarip_old
11th October 2012, 01:56
@PurpleMan
Hi! The last movie I encoded was 1080p Over-and-Under (1920x2160) and no warning message.
And if you now once again encode "Over and Under" with identical settings to its previous encoding, does the mysterious error message get generated?
sneaker_ger
13th October 2012, 18:33
Seems like x264 was still relying on an older version of the spec as well:
https://github.com/DarkShikari/x264-devel/commit/ed460769c3f51749bf944576e6f3c214b4301e51
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.