Log in

View Full Version : x264 VBV going crazy


shon3i
16th September 2009, 18:11
Ok, today i tryed to backup my Final Destination 2 Blu-Ray to BD9. When i finished encoding i normaly import to Sonic Scenarist 5.12, and everything was fine until i start to mux. I checked stream with Elecard Buffer Analyser and i was shocked

http://img233.imageshack.us/img233/5673/vbvi.jpg

Here is cmd i used:

--profile high --level 4.1 --pass 2 --bitrate 10317 --stats "FinalDestination2.stats" --thread-input --deblock -2:-2 --keyint 48 --min-keyint 2 --b-adapt 2 --direct auto --ref 4 --slices 4 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 15000 --vbv-maxrate 15000 --rc-lookahead 60 --aq-mode 2 --me umh --partitions all --trellis 2 --psy-rd 1.0:0.2 --no-dct-decimate --no-fast-pskip --sar 1:1 --mvrange 511 --aud --nal-hrd --aud --output "FinalDestination2.264" "FinalDestination2.avs"

x264 itself not report any over/underflows in log

Encoding started
Standard output stream
Standard error stream
avis [info]: 1920x1080 @ 23.98 fps (129700 frames)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [warning]: target: 10317.00 kbit/s, expected: 9999.59 kbit/s, avg QP: 20.1893
x264 [info]: profile High, level 4.1

x264 [info]: frame I:6179 Avg QP:19.80 size: 95766
x264 [info]: frame P:47781 Avg QP:19.56 size: 79197
x264 [info]: frame B:75740 Avg QP:20.86 size: 31491
x264 [info]: consecutive Bframes: 4.9% 14.9% 75.7% 4.6%
x264 [info]: mb I I16..4: 13.9% 79.8% 6.3%
x264 [info]: mb P I16..4: 2.6% 16.8% 0.9% P16..4: 52.9% 13.7% 8.5% 0.1% 0.1% skip: 4.4%
x264 [info]: mb B I16..4: 0.2% 1.6% 0.1% B16..8: 61.9% 1.9% 1.5% direct: 7.3% skip:25.6% L0:48.0% L1:43.3% BI: 8.7%
x264 [info]: 8x8 transform intra:82.0% inter:75.9%
x264 [info]: direct mvs spatial:98.0% temporal:2.0%
x264 [info]: coded y,uvDC,uvAC intra:80.1% 85.3% 46.9% inter:39.8% 47.2% 15.4%
x264 [info]: ref P L0 64.6% 18.9% 10.6% 5.9%
x264 [info]: ref B L0 89.0% 7.2% 3.9%
x264 [info]: kb/s:9998.5
encoded 129700 frames, 3.44 fps, 9998.56 kb/s

Did this can be maybe NAL-HRD related problem??

i use rack04 1251 build, but i not haved such problems.

Dark Shikari
16th September 2009, 18:31
Please test only with unpatched builds. I don't want to spend hours looking for bugs that don't exist in official x264.

shon3i
16th September 2009, 18:52
Well this is impossible because unpached buld does not contain nal-hrd. Elecard Buffer Analyser follow HRD information to build the graph, Scenarist need HRD too. I don't know how to encode for blu-ray without NAL-HRD? H264Info or Tsmuxer not insert correnct HRD info aslo.

I will encode tonight with different settings such --vbv-bufsize 30000 --vbv-maxrate 30000 and i don't like because i must reduce --keyint to 24.

Any help is welcome.

Dark Shikari
16th September 2009, 19:04
Well this is impossible because unpached buld does not contain nal-hrd. Elecard Buffer Analyser follow HRD information to build the graph, Scenarist need HRD too. I don't know how to encode for blu-ray without NAL-HRD? H264Info or Tsmuxer not insert correnct HRD info aslo.Well, give us a few weeks and we'll have officially Blu-ray compliant HRD in x264 ;)

Use vbv.pl (http://akuvian.org/src/x264/vbv.pl) to measure compliance instead.

shon3i
16th September 2009, 19:09
Ok i use Neuron2 VBV checker which not found any VBV error. So basicly that means the problem is NAL-HRD.

btw how to use vbv.pl??

And thanks for realy good news :)

Dark Shikari
16th September 2009, 19:11
Ok i use Neuron2 VBV checker which not found any VBV error. So basicly that means the problem is NAL-HRD.

btw how to use vbv.pl?? It'll print help when you run it... :p

shon3i
16th September 2009, 19:28
I don't have Perl Compiler, that is my problem :D

kieranrk
16th September 2009, 19:31
I don't have Perl Compiler, that is my problem :D

http://www.activestate.com/activeperl/

shon3i
16th September 2009, 19:36
And here is second problem when i tryed to reencode :(

--profile high --level 4.1 --pass 2 --bitrate 10317 --stats "FinalDestination2.stats" --thread-input --deblock -2:-2 --keyint 24 --min-keyint 2 --b-adapt 2 --direct auto --ref 4 --slices 4 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 30000 --rc-lookahead 60 --aq-mode 2 --me umh --partitions all --trellis 2 --psy-rd 1.0:0.2 --no-dct-decimate --no-fast-pskip --sar 1:1 --mvrange 511 --aud --nal-hrd --aud --output "FinalDestination2.264" "FinalDestination2.avs"

I get error message

Assertion failed: cpb_removal_delay < pow( 2, sps->vui.nal_hrd_parameters.i_cpb_removal_delay_length ), file encoder/set.c, line 649

This error which is reported by other users here http://forum.doom9.org/showthread.php?p=1325105#post1325105

So Trahald something broke in his x264_hrd_pd_interlace.19.diff patch. I am going to try with x264_hrd_pd_interlace.16.1247.VFRManiac.diff and JEEB 1247 Build

G_M_C
16th September 2009, 19:54
And here is second problem when i tryed to reencode :(



I get error message



This error which is reported by other users here http://forum.doom9.org/showthread.php?p=1325105#post1325105

So Trahald something broke in his x264_hrd_pd_interlace.19.diff patch. I am going to try with x264_hrd_pd_interlace.16.1247.VFRManiac.diff and JEEB 1247 Build


Well, maybe it's possible to wait a little. They' re perparing committing nal-hrd into main branch atm (see thread on API changes in libx264 that hint on this change). Also DS suggested this;

Well, give us a few weeks and we'll have officially Blu-ray compliant HRD in x264 ;)

Use vbv.pl (http://akuvian.org/src/x264/vbv.pl) to measure compliance instead.

Trahald
16th September 2009, 23:44
I posted a redone patch in the patch thread [not by me]. It will be closest to what gets commuted.

moviefan
17th September 2009, 07:45
I have encoded with r1247 that did finish successfully. Now I'm a little worried that it might have VBV problems. Is there a way to check, if the HRD-patch worked well in that revision? It is supposed to be Blu-ray-/BD9-compliant with Level 4.0 so that it plays on a SA player.

shon3i
17th September 2009, 08:45
So Trahald something broke in his x264_hrd_pd_interlace.19.diff patch. I am going to try with x264_hrd_pd_interlace.16.1247.VFRManiac.diff and JEEB 1247 Build

Ok i confirm that JEEB 1247 Build with x264_hrd_pd_interlace.16.1247.VFRManiac.diff work flawlessly. I am now go to test this new patch poted by Trahald. I alredy download binary but i don't figure out how to turn on HDR? I look into x264 --fullhelp and there is no any info?

tetsuo55
17th September 2009, 08:59
Well, give us a few weeks and we'll have officially Blu-ray compliant HRD in x264 ;)that is very good news. Is there anything else missing from x264 for 100% blu-ray compliance?

i can't wait for the day to have a retail disc encoded with x264 :D

alwa
17th September 2009, 11:51
I alredy download binary but i don't figure out how to turn on HDR? I look into x264 --fullhelp and there is no any info?
You can turn it on like with Trahalds patch, just the help text for --nal-hrd is missing in the patch but the parameter should be recognized.