View Full Version : Has anyone used X264 to produce a replicated BD title?
Lyris
10th August 2009, 20:15
First of all: I apologize if this question has already been asked. However, I don't think there has ever been a central thread asking this question.
Have any Blu-ray Disc authors out there produced titles encoded using X264 (perhaps one of the various patched versions), and had its output verified and passed by a replication facility? The reason I ask is because in the coming months, I will be working on a retail BD title and if it's possible to use X264, I would absolutely love to do it due to the quality of its output.
My other option is the upcoming Netblender DoStudio Workflow Edition, comes with an integrated AVC encoder. Even although at BD bitrates, the differences can be less obvious, I still want to use the absolute best quality option within the allocated budget. The big draw of this is that its output is guaranteed to be compatible.
Lastly, to the developers of x264: thank you for this wonderful encoder and everything that you do for free. I realise that as a highly scalable system, BD compliance is not at the top of you priorities in producing an h.264 encoder. But if anyone can pitch in, I'd be very grateful!
LoRd_MuldeR
10th August 2009, 20:27
x264 can't produce streams that are 100% conform to the BD specs, because as far as we know the BD specs say that at least 4 slices are required. But x264 doesn't use slices currently.
Dark Shikari
10th August 2009, 20:29
x264 can't produce streams that are 100% conform to the BD specs, because as far as we know the BD specs say that at least 4 slices are required. But x264 doesn't use slices currently.There's a patch that adds slicing support, though the author still hasn't sent to me the version he promised...
Lyris
10th August 2009, 20:53
Could it be the versions found here? I've used it to produce streams that certainly play on the players I have here, but not with consistent success...
http://skystrife.com/x264/?C=M;O=A
Chengbin
10th August 2009, 21:12
Are you telling me that I can't encode a video with x264 in the BD's allowed maximum H.264 settings and it won't play on a Blu-ray player?
Lyris, THANK YOU for choosing x264 to encode your next blu-ray title. After you're done with it, could you tell us the title of the movie you produced? I might buy that Blu-ray just to see what "real" 1080p looks like without low passing.
LoRd_MuldeR
10th August 2009, 21:14
Could it be the versions found here? I've used it to produce streams that certainly play on the players I have here, but not with consistent success...
http://skystrife.com/x264/?C=M;O=A
I don't think so. I guess the patch mention by Dark Shikari was never released to the public -or- the (early) version released was not working properly yet.
Are you telling me that I can't encode a video with x264 in the BD's allowed maximum H.264 settings and it won't play on a Blu-ray drive?
The drive shouldn't be the problem :p
However a H.264 decoder that is strictly limited to the BD specs may fail to decode streams produced by current x264.
Consequently a BD authoring software, which checks the H.264 streams against the BD specs (and not against "real" implementations), would have to reject x264's streams.
Anyway, as far as I know most (all?) the BD players that exist in reality would handle those streams just fine. It only can't be guaranteed...
nixo
10th August 2009, 21:53
You could always use level 4.0. I've been told that doesn't require slices to be BD compliant.
--
Nikolaj
JEEB
10th August 2009, 22:12
The patch for 1195 can be found on the mailing list here (http://mailman.videolan.org/pipermail/x264-devel/2009-August/006106.html), but since D_S says "...though the author still hasn't sent to me the version he promised..." I'd think it'd be ok for you to be somewhat wary of it albeit he says he has been using it for a while...
Anyways, nice to hear that people are interested in using x264 with blu-ray manufacturing.
Lyris
10th August 2009, 22:17
Chengbin: I'll gladly share details and the production process once it's out there, yes. However, there are thankfully a lot of unfiltered AVC titles out there - all of the Disney titles I've seen seem to have got through unmolested. Low-passed BD titles are thankfully the exception rather than the norm.
Are you telling me that I can't encode a video with x264 in the BD's allowed maximum H.264 settings and it won't play on a Blu-ray drive?
Professional authoring software scrutinizes every part of the input file. By default, the output of X264 is rejected. Lord_Mulder has explained the whole situation.
When you're stamping out thousands of discs for a title that is probably going to get some attention, it "maybe" working fine on "most" BD players isn't enough for me to sleep easy!
Nixo: is 4.0 allowed on BD? What are the limitations of it when compared to 4.1?
Guest
10th August 2009, 22:21
You could always use level 4.0. I've been told that doesn't require slices to be BD compliant.
Correct. From the spec:
9.5.1.3.1 Parameter limits
[...]
If level_idc in SPS indicates level 4.1, each picture shall be encoded as multi-slice picture with 4 or
more slices per picture. The number of macroblocks in any slice shall not exceed 1/2 of the total
number of macroblocks. The number of macroblock rows in every slice in the picture should be as
equal as possible for the current picture height and interlace coding mode.
* In case of 1920x1080 video format with frame_mbs_only_flag=1, it is recommended that
each slice has 17 macroblock rows (17/17/17/17 configuration).
* In case of 1920x1080 video format with frame_mbs_only_flag=0 and
mb_adaptive_frame_field_flag=0, it is recommended that in each field, odd numbered slices
have 8 macroblock rows each and even numbered slices have 9 macroblock rows each
(8/9/8/9 configuration) or some similar configuration.
* In case of 1920x1080 video format with frame_mbs_only_flag=0 and
mb_adaptive_frame_field_flag=1, it is recommended that odd numbered slices have 16
macroblock rows each and even numbered slices have 18 macroblock rows each
(16/18/16/18 configuration) or some similar configuration.
* In case of 1280x720 video format, it is recommended that four slices have 11/11/11/12 or
some similar configuration.
nixo
10th August 2009, 22:31
Nixo: is 4.0 allowed on BD? What are the limitations of it when compared to 4.1?
As far as I know the limitations are really just a bit lower max bitrate (--vbv-maxrate 25000).
--
Nikolaj
Lyris
10th August 2009, 22:35
Very interesting - but according to x264, Level 4.0 has an upper bitrate limit of 25mbps, which I'd like to avoid.
Edit: you got there before me - 4.1 is something I'd really like to use, but your suggestion is one possibility.
Lyris
11th August 2009, 15:57
Well, here's hoping that the quality of the AVC encoder in DoStudio Workflow will be comparable to x264 at BD bitrates. The coded material is going to be razor-sharp (4K DI sourced from a RED One) and probably handheld and free-moving so hopefully things can hold up. I'll post some comparisons of the two encoders' output when I can.
Chengbin
11th August 2009, 16:36
In case if you don't know, weight-p will be available soon (hopefully), and according to Dark Shikari on the SoC page, it has the "potential to significantly improve encoding quality"
I want to ask a question. BD specs say the video needs 4 slices. When they refer to slices, do they mean the multithreading technique? If it is, I thought at 4 slices, PSNR is already -1dB?
BTW, lyris, you're the man. Thanks for doing this for us. I'm curious of how a $3000 (!!!) software compare with x264. If you don't mind asking, does the company provide you with software, or do you have to pay for the software yourself?
Lyris
11th August 2009, 16:38
Will that do anything to help compatibility, though?
Chengbin
11th August 2009, 17:19
Will that do anything to help compatibility, though?
No, just picture quality (especially with mb-tree during fades)
LoRd_MuldeR
11th August 2009, 17:40
I want to ask a question. BD specs say the video needs 4 slices. When they refer to slices, do they mean the multithreading technique? If it is, I thought at 4 slices, PSNR is already -1dB?
With "Slices" they mean that each frame should consist of at least 4 slices (parts), that can be decoded/processed independently.
If a stream consists of several slices, this allows (but doesn't enforce) slice-level multi-threading.
So if an encoder relies on slice-level multi-threading, but the stream doesn't consist of several slices, that encoder will fail to decode the stream (at an acceptable speed).
I guess they included the "4 slices" requirement in the BD specs, because they wanted to make sure that even such decoders will be able to decode the BD streams.
Anyway, all the state-of-the-art H.264 decoders (ffmpeg-MT, CoreAVC, DivX H.264, etc.) use frame-level multi-treading and hence work with single-slice streams just fine.
It appears that also the hardware decoders used in "stand-alone" BD players are capable of decoding Level 4.1 H.264 streams without multiple slices.
Also it was found that slices reduce compressibility. In case of x264 the loss was around -0.1 PSNR for 4 slices (link (http://git.videolan.org/gitweb.cgi?p=x264.git;a=blob;f=doc/threads.txt;h=3777b516117c6a7dc8e4943dcee0386449dc405c;hb=9a54c483f5f12aa5614ba0a4a4cfaee19377047e)). And: The more slices/threads, the bigger the loss!
Frame-based multi-threading not only gives more speed-up, also the loss in quality/compressibility is very small - even at high number of threads.
Lyris
11th August 2009, 18:09
If you don't mind asking, does the company provide you with software, or do you have to pay for the software yourself?
There's the possibility of both (or a combination). I'm a freelance author right now so there's nothing set in stone.
Regarding how a $3000 encoder is going to compare to x264: one of the most respected names in the video world said that none of the main studio's encoders matched the quality of x264. Certainly, on most BD titles, I can see small compression artefacts that I don't see on (quite grainy) test encodes I've done. I imagine this is the "speed over quality" argument again.
Oh, if anyone wants to buy me a copy of Cinema Craft HD, I will gladly try that out ;)
Chengbin
11th August 2009, 18:43
Could the quality difference be the fact that x264 does not use slices, where the commercial encoders must?
Sagekilla
11th August 2009, 18:47
No, slices can make a difference but they shouldn't be that huge of a difference. If it is, they're doing their slicing horribly wrong.
Most of the difference comes from the various rate control and RDO algorithms x264 uses: MB Tree, trellis, psy-rd, aq, etc.
LoRd_MuldeR
11th August 2009, 18:49
Could the quality difference be the fact that x264 does not use slices, where the commercial encoders must?
I wouldn't expect slices to make such a difference. Not at BD bitrates (36 Mbit/s).
Manao
11th August 2009, 20:51
The link given by LoRd_MuldeR applies to SD (480p). 1080p with 4 slices will suffer a slightly lower PSNR loss than 480p with 2 slices, thus 0.038dB, which roughly amounts to a 0.8% bitrate loss at same quality.
shon3i
11th August 2009, 22:26
@neuron2, where you find that blu-ray specs?
Guest
11th August 2009, 22:56
I have it through my employer as we implement decoders and players. Sorry, but I cannot re-distribute it. I can answer questions on the spec though.
shon3i
11th August 2009, 23:19
I have it through my employer as we implement decoders and players. Sorry, but I cannot re-distribute it. I can answer questions on the spec though.
Can you just list the lack's of x264 that need to became full Blu-ray compatible, and point developers what is primary?
Dark Shikari
11th August 2009, 23:21
Can you just list the lack's of x264 that need to became full Blu-ray compatible, and point developers what is primary?I have the spec as well.
Guest
11th August 2009, 23:25
If a developer wants to contact me privately about it, the appropriate information can be provided.
EDIT: Dark already has it, so that's the main man.
LoRd_MuldeR
11th August 2009, 23:34
I have the spec as well.
So you can already tell whether there are any other problems with BD compliance in x264, in addition to the known slices issue?
shon3i
11th August 2009, 23:36
I have the spec as well.
then why, not make x264 to be blu-ray compatible finaly? Last time when i asked you, you say that you do not have to specification because they are hide specs from public.
Dark Shikari
11th August 2009, 23:47
then why, not make x264 to be blu-ray compatible finaly? Last time when i asked you, you say that you do not have to specification because they are hide specs from public.I don't have the whole spec, only part of it, and you pretty much already know what that part contains (VBV limits, 3 B-frames, no P-frames referencing B-frames, GOP size, slicing, etc).
benwaggoner
12th August 2009, 04:26
Very interesting - but according to x264, Level 4.0 has an upper bitrate limit of 25mbps, which I'd like to avoid.
25 Mbps is really a very high bitrate for 1080p24 H.264! using single-slice x264 with good settings. I'd expect Level 4.0 x264 with 25 Mbps peaks to be transparent for almost all real-world film content. 1080i30 without MBAFF, could be an issue, but 24p should be just fine. HD DVD titles looked great with older encoders, shorter GOPs, and similar or even lower peaks (one highly rated title was VC-1 with 13 Mbps ABR and 19 Mbps PBR).
Remember Blu-ray's peak bitrate was defined for MPEG-2 applications. It's rather overkill for modern codecs.
kypec
12th August 2009, 06:05
Remember Blu-ray's peak bitrate was defined for MPEG-2 applications. It's rather overkill for modern codecs.My thinking exactly. I'm just a noob in encoding myself but seeing as SD content has 720x576=414 720 pixels to be delivered by MPEG-2 on standard DVD at peak video bitrates ~9 Mbps I would assume that HD material consisting of 1920x1080=2 073 600 pixels cannot require more than 5 times higher bitrate ~45 Mbps with same encoder used.
Now take into account we may use H.264 instead of older MPEG-2 and necessary video bitrate can be halved for the same visual quality I suppose. :cool:
shon3i
12th August 2009, 12:00
I have it through my employer as we implement decoders and players. Sorry, but I cannot re-distribute it. I can answer questions on the spec though.
Ok, i have several questions:
1. What is max allowed vbv-buffersize and vbv-maxrate for Level 4.0 from blu-ray specification (i.e for 4.1 are 30000/40000 buffer/maxrate), not H264.
2. So definitly L 4.0 dosen't require slices? can be then L 4.0 video primary video?
3. What is max allowed vbv-buffersize and vbv-maxrate for Level 3.2 from blu-ray specification for SD content, and what resoultion and fps allowed for SD, and is L 3.2 maximum for SD?
4. Is there anything about BD5/9 and special restrictions such as VBV or other?
That is for now.
Thanks.
Chengbin
12th August 2009, 13:16
25 Mbps is really a very high bitrate for 1080p24 H.264! using single-slice x264 with good settings. I'd expect Level 4.0 x264 with 25 Mbps peaks to be transparent for almost all real-world film content. 1080i30 without MBAFF, could be an issue, but 24p should be just fine. HD DVD titles looked great with older encoders, shorter GOPs, and similar or even lower peaks (one highly rated title was VC-1 with 13 Mbps ABR and 19 Mbps PBR).
Remember Blu-ray's peak bitrate was defined for MPEG-2 applications. It's rather overkill for modern codecs.
I thought many Blu-ray's even at mid to high 20mbps look "not that good", as in lack of fine detail
Remember this thread? (http://forum.doom9.org/showthread.php?t=147300)
LoRd_MuldeR
12th August 2009, 13:23
I thought many Blu-ray's even at mid to high 20mbps look "not that good", as in lack of fine detail
That's probably not the result of the bitrate, but a result of bad encoders and/or bad authoring ;)
Chengbin
12th August 2009, 14:34
That's probably not the result of the bitrate, but a result of bad encoders and/or bad authoring ;)
Therefore because of these bad encoders, you're lacking bitrate even though you have 25-30mbps. Therefore you're not getting "transparency"
Didn't Dark Shikari say even with x264, you need a lot more than 25mbps to reach transparency on 1080p videos (from a master)?
LoRd_MuldeR
12th August 2009, 15:35
Didn't Dark Shikari say even with x264, you need a lot more than 25mbps to reach transparency on 1080p videos (from a master)?
This is highly source dependent. I'm pretty sure for most sources you will be fine with x264 and much lower bitrates...
Chengbin
12th August 2009, 16:20
Dark Shikari, do you mind clarifying this quote in terms of what kind of source are you referring to?
x264 would require significantly more bitrate for transparency if encoding from a lossless source than from a Blu-ray. Blu-rays generally seem to have very little high-frequency content, almost as if they were lowpassed. I wouldn't be surprised if they were--and even if they aren't, the quantizatoin matrices they use often do so for them anyways.
LoRd_MuldeR
12th August 2009, 16:26
He mans that if you were encoding from an original lossless source ("Master"), then you would need significant more bitrate to retain all detail, because there is so much detail/grain in that source.
However we usually don't have access to such sources. What we have are BluRay's, which have already been filtered and compressed in a lossy way. Many detail is already gone for good when we get the data!
Re-encoding such lossy sources requires less bitrate to retain all details (the details that are still there) for obvious reasons...
Chengbin
12th August 2009, 16:40
LoRd_MuldeR, I see you didn't finish reading my post, I said "from a master". :)
Anyway, I'm very excited to see what Lyris can do with his project using x264. BTW, p_l_e_a_s_e use the full 50GB of the disk. I've seen so many Blu-rays with low 20mbps bitrate and the disk still has 10-15GB free. But then truthfully this 40mbps cap is kind of a bottleneck. If you use high average bitrates (like Jumper's 33mbps), if you use bitrate viewer on it, it will probably look like CBR.
Lyris
12th August 2009, 17:33
Sadly, if compliance isn't at least "likely", then I really doubt I'll use x264 (unless some sort of solution appears). Even if it involves going with a slightly less high quality but compliant encoder, the quality gains wouldn't be worth the amount of sleep I'd lose (or the consequences of putting a dodgy disc out there).
The best-looking disc in the world done with x264 would be pointless - not to mention a liability! - if it creates playback problems.
Chengbin: on past DVD projects, I've normally just filled the disc up - I just don't see any reason not to when you're guaranteed a certain amount of space. A little headroom is good since the sizes can be a little unpredictable, but re-encoding a bonus feature to be 3% smaller to get the whole thing to fit is really no big deal with the speed of today's SD MPEG-2 encoding.
Chengbin
12th August 2009, 18:23
If a solution for x264's compatibility doesn't come up, and you're forced to use a commercial encoder, could you encode a tiny part of the film with x264 "just for fun"?
LoRd_MuldeR
12th August 2009, 19:22
Well, it seems the outcome of this thread is that x264 should be able to produce a BD compliant stream at Level 4.0, just not at Level 4.1 yet.
Also: If somebody is willing to spend thousands of dollars for a proprietary encoder, he could also give that money to the x264 devs to complete the required slices patch ;)
Lyris
12th August 2009, 19:34
Also: If somebody is willing to spend thousands of dollars for a proprietary encoder, he could also give that money to the x264 devs to complete the required slices patch
If compliance could be guaranteed and access to a stream verifier was possible, this is an option I would certainly consider running past the money people (assuming that the off-the-shelf encoders were producing visibly poorer results). Real-world issues could get in the way though.
I know there are a lot of people who would love to see a free, high quality BD compliant AVC encoder. And also people who would probably be quite disturbed by the appearance of one...
turbojet
12th August 2009, 20:40
One thing that's been reported is some Panasonic and Samsung players don't display video with 24p enabled from x264 encoded streams. It may be an x264 issue or it may be that directshowsource changes the framerate of the input which also breaks eac3to. Either way it's something that would affect millions.
Forteen88
12th August 2009, 21:53
Well, it seems the outcome of this thread is that x264 should be able to produce a BD compliant stream at Level 4.0, just not at Level 4.1 yet.Doesn't enabling p4x4, b-pyramid (increases ref sometimes) and other resolutions than 1920x1080 or 1280x720 still create compatibility-problem?!
EDIT: Although it's no point using b-pyramid now that mb-tree doesn't allow it, which is positive in that way :) BTW, I forgot to mention that maximum 3 bframes is allowed for Blu-ray.
EDIT2: Some more resolutions are allowed, http://en.wikipedia.org/wiki/Blu-ray#Technical_specifications
Thanks for answering DS, I didn't knew that b-pyramid created that problem (beside adding a ref sometimes).
Dark Shikari
12th August 2009, 21:56
Doesn't enabling p4x4, b-pyramid (increases ref sometimes)B-pyramid violates Blu-ray rules anyways because Blu-ray rules prohibit P-frames referencing B-frames. But it's not on by default.
p4x4 is fine, but not useful for Blu-ray resolutions anyways.and other resolutions than 1920x1080 or 1280x720 still create compatibility-problem?!Well obviously, Blu-ray prohibits other resolutions.
Astrophizz
12th August 2009, 21:57
Doesn't enabling p4x4, b-pyramid (increases ref sometimes) and other resolutions than 1920x1080 or 1280x720 still create compatibility-problem?!
Then just don't turn on those functions and resize/crop the film properly.
Edit: Doh, beaten.
moviefan
12th August 2009, 22:05
B-pyramid violates Blu-ray rules anyways because Blu-ray rules prohibit P-frames referencing B-frames. But it's not on by default.
Oh, b-pyramid is not Blu-ray compliant? In that case... damn, encode again :mad:.
Does this slicing patch add the needed slice-feature to be ultimately Blu-ray compliant or are there any problems with it?
http://mailman.videolan.org/pipermail/x264-devel/2009-August/006106.html
How about a Blu-ray preset in x264 with max. settings being compliant to the specs? (except for AQ and psy-rd since it's personal taste and source dependent I guess)
cacepi
13th August 2009, 01:45
http://mailman.videolan.org/pipermail/x264-devel/2009-August/006106.html
Please stop mentioning this patch, as:
1) I didn't write it and am getting a little tired of the PMs asking me questions about it, and:
2) This commit to x264 (http://git.videolan.org/?p=x264.git;a=commit;h=7139b088129707b0daf3fd3bae9647f649deb1ba) breaks the patch and I don't have the time to fix it (although it's probably just a one-line realloc() fix), and finally:
3) Even if the patch worked with the latest revision, I still don't see how it would help as it doesn't allow you to directly specify an arbitrary number of macroblocks, just a threshold. In other words, the patch is not ready for blu-ray prime time.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.