Log in

View Full Version : Underflow with x264 ... ???


Sagittaire
29th May 2012, 19:11
Well I test actualy x264 BluRay encoding. Elecard Buffer Analyser report Underflow with x264. Anyway x264 encoder don't report these problemes. Elecard Buffer Analyser report massive Underflow problem if Average Bitrate is close to Maximum Bitrate with mbtree too.

My encoding setting:

x264.exe --slow-firstpass --bframe 1 --b-pyramid "strict" --b-adapt 2 --weightp 1 --ref 4 --direct auto --deblock -1:-3 --bitrate 24000 --pass 1 --stats "test.log" --no-mbtree --qcomp 1.00 --ipratio 1.00 --pbratio 1.00 --min-keyint 1 --partitions "all" --me "hex" --subme 7 --no-fast-pskip --no-dct-decimate --deadzone-inter 2 --deadzone-intra 2 --trellis 1 --psy-rd 1.0:0.25 --aq-mode 1 --aq-strength 0.5 --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --vbv-init 0.9 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --psnr --ssim -o test.264 Lossless.avs

x264.exe --bframe 1 --b-pyramid "strict" --weightp 1 --ref 4 --direct auto --deblock -1:-3 --bitrate 24000 --pass 3 --stats "test.log" --no-mbtree --qcomp 1.00 --ipratio 1.00 --pbratio 1.00 --min-keyint 1 --partitions "all" --me "umh" --subme 10 --no-fast-pskip --no-dct-decimate --deadzone-inter 2 --deadzone-intra 2 --trellis 2 --psy-rd 1.0:0.25 --aq-mode 1 --aq-strength 0.5 --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --vbv-init 0.9 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --psnr --ssim -o test-10.264 Lossless.avs

x264.exe --bframe 1 --b-pyramid "strict" --weightp 1 --ref 4 --direct auto --deblock -1:-3 --bitrate 24000 --pass 3 --stats "test.log" --no-mbtree --qcomp 0.90 --ipratio 1.00 --pbratio 1.00 --min-keyint 1 --partitions "all" --me "umh" --subme 10 --no-fast-pskip --no-dct-decimate --deadzone-inter 2 --deadzone-intra 2 --trellis 2 --psy-rd 1.0:0.25 --aq-mode 1 --aq-strength 0.5 --bluray-compat --vbv-maxrate 40000 --vbv-bufsize 30000 --vbv-init 0.9 --level 4.1 --keyint 24 --open-gop --slices 4 --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 --psnr --ssim -o test-9.264 Lossless.avs


With qcomp=1.0 : Underflow problem
http://jfl1974.free.fr/BluRay/Buffer_01.PNG


With qcomp=0.9 : No Underflow problem
http://jfl1974.free.fr/BluRay/Buffer_02.PNG

LoRd_MuldeR
29th May 2012, 19:46
Well, it has been mentioned various times that any effect of "qcomp" on Underflow problems is pure coincidence.

Furthermore, if x264 does not report any underflow's but Elecard Buffer Analyser does, then the first thing that comes to my mind is:
Is the Elecard Buffer Analyser assuming the exactly same VBV parameters (MaxRate, BuffSize, InitialOccupancy) as x264 used?

Sagittaire
29th May 2012, 19:54
Well, it has been mentioned various times that any effect of "qcomp" on Underflow problems is pure coincidence.

Not here with no-mbtree. Lower qcomp imply higher Curve Compression for Rate Control and less variability for bitrate.

Furthermore, if x264 does not report any underflow's but Elecard does, then the first thing that comes to my mind is:
Is the Elecard Buffer Analyser assuming the exactly same VBV parameters (MaxRate, BuffSize, InitialOccupancy) as x264 used?

It's perhaps a bug for Elecard Buffer Analyser but Elecard Buffer Analyser detect correct value for VBV parameters.

kieranrk
29th May 2012, 23:58
No --nal-hrd vbr present so elecard doesn't know what the VBV parameters are.

sneaker_ger
30th May 2012, 00:02
No --nal-hrd vbr present so elecard doesn't know what the VBV parameters are.

Should be implied by --bluray-compat.

Blue_MiSfit
30th May 2012, 03:43
I definitely wonder if the nal-hrd information is being both written properly to the stream, and read properly by Elecard.

Guest
30th May 2012, 04:11
If a sample can be posted, we can pretty easily determine whether HRD info is present and what it states.

Sagittaire
30th May 2012, 08:56
If a sample can be posted, we can pretty easily determine whether HRD info is present and what it states.

I will make that today ...

Sagittaire
3rd June 2012, 18:06
Well here an example with massive underflow ... for Elecard Buffer Analyser:
http://jfl1974.free.fr/BluRay/test.264

http://jfl1974.free.fr/BluRay/Buffer_03.PNG

Someone can check this file for confirmation?

Guest
4th June 2012, 01:06
---HRD INFO---

NAL HRD INFO:

cpb_cnt_minus1 = 0
bit_rate_scale = 0
cpb_size_scale = 2

bit_rate_value_minus1[0] = 46874 [3000000 bits/s]
cpb_size_value_minus1[0] = 46874 [3000000 bits]
cbr_flag[0] = 0

initial_cpb_removal_delay_length_minus1 = 18
cpb_removal_delay_length_minus1 = 9
dpb_output_delay_length_minus1 = 6
time_offset_length = 0

---END HRD INFO---

VBVChecker detects a bitrate of 3000000 bits/per second and runs clean, i.e., no underflow on your sample.