View Full Version : NAL HRD has been committed!
Pages :
1
2
3
[
4]
5
6
7
8
9
10
11
12
13
Dark Shikari
2nd March 2010, 22:03
Here's the full details on the hopefully-final NAL-HRD patch from the commit message. Do note that it includes much much much more than just NAL-HRD, including many features useful for ordinary encoding (such as VFR ratecontrol).
Blu-ray support: NAL-HRD, VFR ratecontrol, filler, pulldown
x264 can now generate Blu-ray-compliant streams for authoring Blu-ray Discs!
An example command, using constant quality mode, for 1080p24 content:
x264 --crf 16 --preset veryslow --tune film --weightp 0 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --b-pyramid strict --slices 4 --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 <input> -o <output>
This command is much more complicated than usual due to the very complicated restrictions the Blu-ray spec has.
Most options after "tune" are required by the spec.
--weightp 0 is not, but there are known bugged Blu-ray player chipsets (Mediatek, notably) that will decode such video incorrectly.
Furthermore, note the Blu-ray spec has very strict limitations on allowed resolution/fps combinations.
Examples include 1080p @ 24000/1001fps (NTSC FILM) and 720p @ 60000/1001fps.
Detailed features introduced in this patch:
Full NAL-HRD compliance, with both VBR (no filler) and CBR (filler) modes.
Can be enabled with --nal-hrd vbr/cbr.
libx264 now returns HRD timing information to the caller in the form of an x264_hrd_t.
x264cli doesn't currently use it, but this information is critical for compliant TS muxing.
Full VFR ratecontrol support: VBV, 1-pass ABR, and 2-pass modes.
This means that, even without knowing the average framerate, x264 can get achieve a correct bitrate in target bitrate modes.
Pulldown support: libx264 allows the calling application to specify a pulldown mode for each frame.
This is similar to the way that RFFs (Repeat Field Flags) work in MPEG-2.
Note that libx264 does not modify timestamps: it assumes the calling application has set timestamps correctly for pulldown!
x264cli contains an example implementation of caller-side pulldown code.
Pic_struct support: necessary for pulldown and allows interlaced signalling.
Also signal TFF vs BFF with delta_poc_bottom: should significantly improve interlaced compression.
--tff and --bff should be preferred to the old --interlaced in order to tell x264 what field order to use.
Huge thanks to Alex Giladi and Lamont Alston for their work on code that eventually became part of this patch.
mp3dom
2nd March 2010, 22:36
Wow, thanks! I have some questions:
- Is the problem regarding Panasonic BD (that don't play or play with problems a stream with NAL-HRD patch) supposed to be fixed? (I don't have a Panasonic BD nor know its chipset so I'm asking only to know.)
- The 'incorrectly decode' of weightp for MediaTek chipset means play with macroblock (like the weightp 2 problem with some software AVC decoder?) Is the quality loss (from weightp from 2 to 0) noticeably in a 'bluray bitrates' (quite high) even on fades?
- Is 3:2 pulldown supposed to works in a 'BD-spec' way? I have made some test with 1.31 patch and wasn't able to import the stream in Scenarist BD (encoded as 23.976+nal+aud+pic-struct+pulldown 3:2)
Thank you very much!
rack04
2nd March 2010, 22:41
- Is the problem regarding Panasonic BD (that don't play or play with problems a stream with NAL-HRD patch) supposed to be fixed? (I don't have a Panasonic BD nor know its chipset so I'm asking only to know.)
I have a Panasonic BD35 and haven't experienced any problems in the last several revisions.
mp3dom
2nd March 2010, 22:47
The supposed problem is located in the BD Rebuilder thread (if I remember correctly the player was a Panasonic BD30)
shon3i
2nd March 2010, 23:00
Wow, many thanks.
First, buld on first page, is something wrong, i don't saw hrd or pulldown switches.
Second, about VFR ratecontrol? How to use it? and is Blu-Ray compatible?
EDIT: i just download Rack04 build and seem that have all switches :)
Dark Shikari
2nd March 2010, 23:17
Wow, many thanks.
First, buld on first page, is something wrong, i don't saw hrd or pulldown switches.
Second, about VFR ratecontrol? How to use it?
oldx264 some_vfr_anime.mkv -o output.mkv --bitrate 1000
Result: 300kbps (what?!)
newx264 some_vfr_anime.mkv -o output.mkv --bitrate 1000
Result: 1000kbps (yay!)
shon3i
2nd March 2010, 23:20
oldx264 some_vfr_anime.mkv -o output.mkv --bitrate 1000
Result: 300kbps (what?!)
newx264 some_vfr_anime.mkv -o output.mkv --bitrate 1000
Result: 1000kbps (yay!)
Amazing :) I can't beleve ;)
I need to test ASAP :)
rack04
2nd March 2010, 23:38
Here (http://www.multiupload.com/W6I41HO6UE) is a file that I just encoded. Can anyone with access to a verifier verify this stream? Thanks.
mp3dom
2nd March 2010, 23:49
I'm already testing on my own (for reference... a 3.2 HL + 3:2 soft pulldown and a 1080p24 4.1 HL)
Edit1: L3.2 High + 3:2 soft pulldown (SD) doesn't work. It is refused by MUI Generator (same error as previous 1.31 patch). It's not an issue but the file still is recognized as 59.94 fps while CineVision/Blu-Code encodes are recognized at 29.97.
Edit2: L4.1 High HD 24p pass both mux and verification successfully! (tested on a clip with about 15.700 frames) :)
creamyhorror
3rd March 2010, 04:51
Congratulations devs and testing team! It might almost be time to call Lyris (http://forum.doom9.org/showthread.php?t=148826) back.
Lyris
3rd March 2010, 12:55
I have been reading the whole time. I am lost for words :) Thank you!
shon3i
3rd March 2010, 14:03
Edit1: L3.2 High + 3:2 soft pulldown (SD) doesn't work. It is refused by MUI Generator (same error as previous 1.31 patch). It's not an issue but the file still is recognized as 59.94 fps while CineVision/Blu-Code encodes are recognized at 29.97.I have same issue, i even try with DGPulldown, which produce 29.97 stream, but MUI Generator refuse stream completly.
Edit2: L4.1 High HD 24p pass both mux and verification successfully! (tested on a clip with about 15.700 frames) Confirmed, same here :)
Revgen
3rd March 2010, 14:45
Wow, thanks! I have some questions:
- Is the problem regarding Panasonic BD (that don't play or play with problems a stream with NAL-HRD patch) supposed to be fixed? (I don't have a Panasonic BD nor know its chipset so I'm asking only to know.)
- The 'incorrectly decode' of weightp for MediaTek chipset means play with macroblock (like the weightp 2 problem with some software AVC decoder?) Is the quality loss (from weightp from 2 to 0) noticeably in a 'bluray bitrates' (quite high) even on fades?
- Is 3:2 pulldown supposed to works in a 'BD-spec' way? I have made some test with 1.31 patch and wasn't able to import the stream in Scenarist BD (encoded as 23.976+nal+aud+pic-struct+pulldown 3:2)
Thank you very much!
From the BDRebuilder Bug Thread.
Try adding MIN_M2TS_SIZE=700 to the BDREBUILDER .ini file. You can copy and past it from the HIDDENOPTS.TXT file. This should keep the menus from being re-encoded (I think this command means do not re-encode anything under 700 Mb). If you still have the problem try a larger number. I use this command this for all concert blu-rays because for some reason thier menus refuse to work after being re-encoded.Hey Willobee,
I have been trying for weeks to get Groundhog Day Region A to work in my Panasonic BD-35. I ripped and transcoded as BD25 full disk and the studio logo would play but would go no further. It would not play the Blu-ray ad video or the menus.
I tried your trick above and lo and behold, my Panasonic will now play the BD25 complete with menus. All other movies that I have tried (except for Drag Me To Hell) worked so I could not figure out why Groundhog Day would not. Now I am going to try Drag Me To Hell with the same setting and see what happens.
So the Panasonic BD-35 is very picky about what get transcoded.
Thank you for your tip. I am very please that it worked.
Jdobbs, thanks again for the great program and all the hard work you are putting into it. A donation will definitely be coming your way.
From what I understand, Menus use a different MiniCR than the movie does. That may be causing the problem.
kieranrk
3rd March 2010, 15:03
I have same issue, i even try with DGPulldown, which produce 29.97 stream, but MUI Generator refuse stream completly.
Therefore I have to conclude that it has no idea what it wants...
One way to try and tackle this is to make x264 timebase work in fields which is something I'm reluctant to do.
It's not that major for Blu-ray anyways since x264.c can't do mixed pulldown and your source framerate must be supported anyway.
mp3dom
3rd March 2010, 17:55
I doubt that MinCR for menu is different simply because menu are plain video with an IG in subpath (or muxed together). When you encode there's no way to tell that you're making a movie or a menu. It could be different if you're making still for menu (in that case if I remember correctly, the MinCR is 2). Reading the response from the thread bug, the workaround in that particular case is simply to avoid recompression so it's working because BDRebuilder is using the original menu.
Can someone with a BD30/BD35 confirm if the 1.32 NAL patch is safe even for that picky SAP?
Lyris
3rd March 2010, 20:19
Sorry if this derails the thread slightly, but I just thought I would post this as a reminder of your hard work is going to be such a boost to high quality video.
This is a frame grab from a Scandinavian Blu-ray Disc. The film source is 16mm, so there is quite a lot of high frequency grain. The bit-rate during this scene is about 34-35mbps (seriously). This is the sort of encoders small distributors are currently resorting to to pass verification:
http://www.lyris-lite.net/2010/girl_hornet.png (~3mb PNG)
kolak
3rd March 2010, 20:25
Sorry if this derails the thread slightly, but I just thought I would post this as a reminder of your hard work is going to be such a boost to high quality video.
This is a frame grab from a Scandinavian Blu-ray Disc. The film source is 16mm, so there is quite a lot of high frequency grain. The bit-rate during this scene is about 34-35mbps (seriously). This is the sort of encoders small distributors are currently resorting to to pass verification:
http://www.lyris-lite.net/2010/girl_hornet.png (~3mb PNG)
It looks similar to one of the Pro encoders problem :)
Blue_MiSfit
3rd March 2010, 21:44
_O_M_G_
MPEG-2 would be better. FAIL.
Why they would do this crap instead of lowpassing it is utterly beyond me...
~MiSfit
mp3dom
3rd March 2010, 21:44
It's anyway a bit difficult to say if that frame is the result of a bad encoder or bad setting. I've made in the past some encode of grainy sources with CineVision and honestly the results were not that bad, maybe your source is very hard for an encoder :)
Lyris
3rd March 2010, 22:44
I tend to find that many of the bad encoders tend not to let you tweak much, so it's maybe a bit of both?
kolak
3rd March 2010, 23:30
It's anyway a bit difficult to say if that frame is the result of a bad encoder or bad setting. I've made in the past some encode of grainy sources with CineVision and honestly the results were not that bad, maybe your source is very hard for an encoder :)
Yes, it's not to bad, but with some sources it has strange problems and sometimes there is no way to avoid them whatever setting you use.
kolak
3rd March 2010, 23:34
I tend to find that many of the bad encoders tend not to let you tweak much, so it's maybe a bit of both?
Blu-code doesn't let you tweak to much, but it's actually very good encoder.
Back to BD patch- there is still work which needs to be done- it's not 100% compatible yet, but very promising.
Dark Shikari
3rd March 2010, 23:40
Blu-code doesn't let you tweak to much, but it's actually very good encoder.
Back to BD patch- there is still work which needs to be done- it's not 100% compatible yet, but very promising.If it's not 100% compatible, tell us what isn't.
kolak
4th March 2010, 00:59
If it's not 100% compatible, tell us what isn't.
Just few posts above people say Scenarist doesn't even import some files.
1080 24p seams to working (confirmed by more than one user).
I can't tell what is not working- I don't have enough knowledge :), but what about different BD frame rates and frame sizes?
If we have all of them verified by more than one person than it's very close to the end :)
Dark Shikari, you have done some projects for the companies and I assume you know what do they want?
Yes- black box which just simply works :)
Moviewatcher666
4th March 2010, 02:31
From the BDRebuilder Bug Thread.
From what I understand, Menus use a different MiniCR than the movie does. That may be causing the problem.
Hi Revgen,
Thanks for the comment. I didn't know what MinCR was so I did a search on the net and it brought me here.
I thought the problem was solved until I tested my BD25 of Groundhog Day a little more.
What works:
The menu, playing movie from the menu, selecting audio and subtitle options from the menu, scene selection from the menu and only some special features from the menu (deleted scenes, previews).
What doesn't work:
3 of the special feature videos selected from the special features menu. The video freezes and I have to stop or eject.
I used PROCESS_SECONDARY=0 (audio is DTS Express and doesn't work anyway) & MIN_M2TS_SIZE=700 BD Rebuilder .32.05.
Any other suggestion to try to have it work 100%? Appreciate any suggestions
Thanks for reading!
Revgen
4th March 2010, 04:58
^I'll post my reply in the BD Rebuilder Bug thread.
shon3i
4th March 2010, 17:36
Just few posts above people say Scenarist doesn't even import some files.That is because pulldown is used. Pulldown have nothing with Blu-Ray compilancy, and x264 now produce 100% compilant streams, none of allowed combinations for Blu-Ray not require pulldown and pulldown is not mandatory at all.
If we have all of them verified by more than one person than it's very close to the endMore than one person lol, how many peoples allredy use BD-Rebulder and multiAVCHD, which use earlier versions that passes verificators and plays on every SAP, this is just the icing on the cake :)
Atak_Snajpera
4th March 2010, 18:05
1280x720p @ 23.976/24/25/50/60 is also ok?
shon3i
4th March 2010, 18:36
I checked 23.976 and 24, work fine, i don't have 50 or 60 material to test, 25p/i is not allowed for 720.
jpsdr
4th March 2010, 19:04
You take your file, just change the frame rate (not convert) , and encode it.
Ok, it will be ...slighty... speed-up, but it's not important in that case, if it's just to check.
Sharc
4th March 2010, 21:03
I get the warning "b-pyramid + mbtree is not supported".
Is this a limitation of the encoder or of the Blu-Ray spec?
Dark Shikari
4th March 2010, 21:12
I get the warning "b-pyramid + mbtree is not supported".
Is this a limitation of the encoder or of the Blu-Ray spec?This means your x264 is way too old.
Sharc
4th March 2010, 21:16
Yes, you are right, it's x264 core 79 r0+1360 528c100 from the first post in this thread. From where can I download the latest version?
mp3dom
4th March 2010, 21:37
Use this link (http://forum.doom9.org/showthread.php?p=1379904#post1379904) (choose the version suits better for you)
MadMonkey57
4th March 2010, 21:38
...Can someone with a BD30/BD35 confirm if the 1.32 NAL patch is safe even for that picky SAP?
Been watching for 10mn on my BD35... so far so good...
Sharc
4th March 2010, 21:43
@mp3dom
Thank you.
kieranrk
4th March 2010, 23:56
Yes, you are right, it's x264 core 79 r0+1360 528c100 from the first post in this thread. From where can I download the latest version?
Not sure why that happened. Fixed now.
mp3dom
4th March 2010, 23:57
Been watching for 10mn on my BD35... so far so good...
Very good!:)
mp3dom
5th March 2010, 00:34
1280x720p @ 23.976/24/25/50/60 is also ok?
If i have some time this weekend I'll try to make some test on all kind of progressive sources allowed by Bluray specs (1920x1080p23.976/24, 1440x1080p23.976/24, 1280x720p23.976/24/50/60). Probably it could be useful to test 576p25 and 480p29.97 too as these format are allowed for secondary video.
Dark Shikari
5th March 2010, 00:48
We're planning to release a downloadable free Blu-ray image when we announce x264's official Blu-ray support. As such, we need a free movie to use for this.
We really would like to avoid Elephant's Dream or Big Buck Bunny if possible due to horrific overuse.
Eyes on the Skies (http://www.eyesontheskies.org/movie.php") was a potential option, but after contacting them, it turns out they only have an MPEG-2 Intra 50mbps source, and nothing better; hardly suitable for authoring a Blu-ray.
What other options do people know of for a free film or short in top-quality HD?
pokazene_maslo
5th March 2010, 00:58
What other options do people know of for a free film or short in top-quality HD?Maybe Home (http://en.wikipedia.org/wiki/Home_%282009_film%29)
Boolsheet
5th March 2010, 01:45
Perhaps benwaggoner's "Lady Washington"? ;)
(Download links/torrents are outdated and down)
http://forum.doom9.org/showthread.php?t=137671
http://forum.doom9.org/showthread.php?t=135938
Dark Shikari
5th March 2010, 02:28
Perhaps benwaggoner's "Lady Washington"? ;)
(Download links/torrents are outdated and down)
http://forum.doom9.org/showthread.php?t=137671
http://forum.doom9.org/showthread.php?t=135938I'd prefer an actual film...Maybe Home (http://en.wikipedia.org/wiki/Home_%282009_film%29)Will look into it.
LoRd_MuldeR
5th March 2010, 03:02
Well, it's not an "actual film" but concert footage. It may be an option anyway:
Nine Inch Nails offers 405GB of free HD concert footage, fans make free Blu-ray, DVD (http://forum.nin.com/bb/read.php?52,378166)
Lyris
5th March 2010, 03:47
There's also various .R3D clips (output of the RED ONE camera) available on RedRelay.net (although the site was down for maintenance last time I checked). I've been using those with added synthetic grain for AVC encoder tests. You would never guess which of the encoders kept winning ;)
What about the trailer for "The Island" that BenWaggoner shared with us? The source isn't perfect and has banding during fades, but it provides clips of a real film, with a lot of detail.
I also have some raw 1920x1080 4:2:2 clips, sourced from film, of various shots: sunflowers, a field, traffic at rush hour, that I can somehow share with people because I forgot where I originally downloaded them from (maybe someone else knows).
kieranrk
5th March 2010, 10:59
I also have some raw 1920x1080 4:2:2 clips, sourced from film, of various shots: sunflowers, a field, traffic at rush hour, that I can somehow share with people because I forgot where I originally downloaded them from (maybe someone else knows).
The idea is that it's a proper film.
Lyris
5th March 2010, 11:16
"The Island" trailer is the only choice I can think of, then...
Biggiesized
5th March 2010, 17:48
You could also use the Match Point trailer. There is less banding but thicker grain and not as much high frequency detail.
mp3dom
5th March 2010, 17:50
I'll investigate tonight, but I had a buffer underflow in Scenarist today in a clip of 3 mins (it stops after 6 seconds of mux) with an avg bitrate of 25 Mbps (which is quite 'standard') and only one audio (DD at 640Kbps). It could be the vbv-bufsize set to 30.000 so tonight I'll try with a more conservative value.
Sharc
5th March 2010, 18:07
I made some 720p encodes with rack04's build and DS' Blu-ray settings (--preset medium). Worked flawlessly. I noticed improved back and forward seeking, with no audio/video sync issues as before. Is this thanks to the nal-hrd patch?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.