Diary Of An x264 Developer

04/25/2010 (11:01 am)

Announcing the first free software Blu-ray encoder

Filed under: blu-ray,x264 ::

For many years it has been possible to make your own DVDs with free software tools.  Over the course of the past decade, DVD creation evolved from the exclusive domain of the media publishing companies to something basically anyone could do on their home computer.

But Blu-ray has yet to get that treatment.  Despite the “format war” between Blu-ray and HD DVD ending over two years ago, free software has lagged behind.  “Professional” tools for Blu-ray video encoding can cost as much as $100,000 and are often utter garbage.  Here are two actual screenshots from real Blu-rays: I wish I was making this up.

But today, things change.  Today we take the first step towards a free software Blu-ray creation toolkit.

Thanks to tireless work by Kieran Kunyha, Alex Giladi, Lamont Alston, and the Doom9 crowd, x264 can now produce Blu-ray-compliant video.  Extra special thanks to The Criterion Collection for sponsoring the final compliance test to confirm x264′s Blu-ray compliance.

With x264′s powerful compression, as demonstrated by the incredibly popular BD-Rebuilder Blu-ray backup software, it’s quite possible to author Blu-ray disks on DVD9s (dual-layer DVDs) or even DVD5s (single-layer DVDs) with a reasonable level of quality.  With a free software encoder and less need for an expensive Blu-ray burner, we are one step closer to putting HD optical media creation in the hands of the everyday user.

To celebrate this achievement, we are making available for download a demo Blu-ray encoded with x264, containing entirely free content!

On this Blu-ray are the Open Movie Project films Big Buck Bunny and Elephant’s Dream, available under a Creative Commons license.  Additionally, Microsoft has graciously provided about 6 minutes of lossless HD video and audio (from part of a documentary project) under a very liberal license.  This footage rounds out the Blu-ray by adding some difficult live-action content in addition to the relatively compressible CGI footage from the Open Movie Project.  Finally, we used this sound sample, available under a Creative Commons license.

You may notice that the Blu-ray image is only just over 2GB.  This is intentional; we have encoded all the content on the disk at appropriate bitrates to be playable from an ordinary 4.7GB DVD.  This should make it far easier to burn a copy of the Blu-ray, since Blu-ray burners and writable media are still relatively rare.  Most Blu-ray players will treat a DVD containing Blu-ray data as a normal Blu-ray disc.  A few, such as the Playstation 3, will not, but you can still play it as a data disc.

Finally, note that (in accordance with the Blu-ray spec) the disc image file uses the UDF 2.5 filesystem, which may be incompatible with some older virtual drive and DVD burning applications.  You’ll also need to play it on an actual Blu-ray player if you want to get the menus and such working correctly.  If you’re looking to play it on a PC, a free trial of Arcsoft TMT is available here.

What are you waiting for?  Grab a copy today!

UPDATE: Here is an AVCHD-compliant version of the above, which should work better when burned on a DVD-5 instead of a BD-R. (mirror)

What’s left before we have a fully free software Blu-ray creation toolkit?  Audio is already dealt with; AC3 audio (aka Dolby Digital), the format used in DVD, is still supported by Blu-ray, and there are many free software AC3 encoders.  The primary missing application is a free software Blu-ray authoring tool, to combine the video and audio streams to create a Blu-ray file structure with the menus, chapters, and so forth that we have all come to expect.  But the hardest part is dealt with: we can now create compatible video and audio streams.

In the meantime, x264 can be used to create streams to be authored using Blu-Print, Scenarist, Encore or other commercial authoring tools.

More detailed documentation on the new Blu-ray support and how to use it can be found in the official commit message.  Do keep in mind that you have to export to raw H.264 (not MKV or MP4) or else the buffering information will be slightly incorrect.  Finally, also note that the encoding settings given as an example are not a good choice for general-purpose encoding: they are intentionally crippled by Blu-ray restrictions, which will significantly reduce compression for ordinary non-Blu-ray encoding.

In addition to Blu-ray support, the aforementioned commit comes with a lot of fun extras:

x264 now has native variable-framerate ratecontrol, which makes sure your encodes get a correct target bitrate and proper limiting of maximum bitrate even if the duration of every frame is different and the “framerate” is completely unknown.  This helps a lot when encoding from variable-framerate container formats such as FLV and WMV, along with variable-framerate content such as anime.

x264 now supports pulldown (telecine) in much the same fashion as it is handled in MPEG-2.  The calling application can pass in flags representing how to display a frame, allowing easy transcoding from MPEG-2 sources with pulldown, such as broadcast television.  The x264 commandline app contains some examples of these (such as the common 3:2 pulldown pattern).

x264 now also exports HRD timing information, which is critical for compliant transport stream muxing.  There is currently an active project to write a fully DVB-compatible free software TS muxer that will be able to interface with x264 for a seamless free software broadcast system.  It will likely also be possible to repurpose this muxer as part of a free software Blu-ray authoring package.

All of this is now available in the latest x264.

65 Responses to “Announcing the first free software Blu-ray encoder”

  1. MrVacBob-sama Says:

    Use imgur instead of tinypic!

  2. R.T. Systems Says:

    Where do those two BluRay screenshots come from?

  3. Louise Says:

    This is awesome.

    I actually thought that BD players would only accept BD’s with AACS DRM…?

  4. onitake Says:

    nice work!

    looks like (some) video encoders are still choking badly on animated content. sad story…

    as for the second sample: how does x264 fare with artificial noise? many movie producers add it to make the material look more “natural” and “crisp”. i don’t like it at all, personally, but it does give an interesting touch.

  5. Dark Shikari Says:


    Nope. It’s *technically* a requirement of the spec, but no actual players require it.

  6. Louise Says:

    @Dark Shikari: That is really great. Now it is possible to make real back ups of original BD’s.

    Are there folks working on making a tool to make movie menus?

  7. Dark Shikari Says:


    There’s MultiAVCHD, but I’m not sure how close it is to being fully Blu-ray compliant.

  8. Shin Says:

    @R.T. Systems

    The first one is from the Anime Utawarerumono. the second i don’t know…

    btw. Bad example is this shitty air upscale that somehow got on a blu-ray.


  9. Gramner Says:

    The second image is from http://www.imdb.com/title/tt1343097/

  10. Anonymous Says:

    First one is Utawarerumono.

  11. Pavel Says:

    Thanks a lot for the release, it comes exactly at the time when I started looking for an opensource Blu-ray encoder ;) Native variable-framerate ratecontrol: lovely!

  12. KJ Says:

    As others have said, the first screenshot is indeed from Utawarerumono’s opening. I had never noticed that bad frame before, but after going back and advancing frame-by-frame that bad frame is indeed there, the others seem fine. The same frame on the creditless version isn’t so bad (http://bit.ly/cZTBPZ). While I can see a few quality issues on that frame it is from a high motion scene and also captured from a re-encode of the disk so it’s not entirely unexpected.

    Regardless though, it’s good to hear that you’ve extended x264 to do this. Keep up the good work!

  13. hamletiii Says:

    Utawarerumono TV 1st release is mpeg2 encoded. Not sure about the second release and the OVAs.
    Air upscale is really shitty, but I don’t think a different encoding would help since it’s more of a source problem, better get the ADV release, minus the 1080p op/ed+5.1 LPCM…
    PS3 can play a Blu-ray disguised as AVC-HD, including full pop-up and PIP, multi-angle, button sound etc (no BD-J unless your f/w is still below 2.50), you just have to modified the index.bdmv file a bit.
    I guess being Blu-ray compliant doesn’t mean it can pass the Blu-ray verifier test. But it’s good enough for casual home projects. The old Sonic Scenarist HDMV 4.5 did support x.264 without 4 picture slicing long time ago though. The new Scenarist BD 5.0+ removed the support.

  14. creamyhorror Says:

    According to shon3i on Doom9, multiAVCHD’s Blu-ray authoring output passes verification by Sony Verifier, “with few warnings, about missing AACS files and other unnecessary things.” So free Blu-ray creation should be ready to go.


  15. Rodrigo Polo Says:

    Nice, really good news, hope to see some app for final users that let the user make a BluRay very easly.

  16. Wouter Says:

    Hey just tried out the demo blu-ray image, but it doesn’t work that well yet…
    I mounted it via the newest daemon tools which worked fine. But it’s unplayable by WMP or VLC… only media player classic managed to play the elephants dream. It’s on windows 7 so it should be compatible :(

    Good to see that blu-ray is opening up :)

  17. Fota Says:

    The second screenshot is from a pretty new Swedish movie called Millennium. Actually is a triology and the screenshot is from the third movie, which has an under title: “Luftslottet som sprängdes”. It’s based on the books with the same name. Excellent books and OK movies but I was so upset with the bad technical quality of the BD so it’s kind of fun to see it being mentioned here.
    Music Box Films has just got US distribution rights, but rumor has it Hollywood are making new native english versions.

  18. Chaz6 Says:

    I can’t wait for the DVB TS muxer to be complete. It will be a very powerful tool.

  19. bdmv Says:

    how do you create this “index.bdmv file” and is it a simple text file perhaps in a binary format ?

    so we have a way to make the BR compatible AVC video stream, a known working disk layout application, a way to recode audio to BR, so what’s left ? an app to make this “index.bdmv file” from the content and structure you put down, and a nice cross platform browser GUI to remotely integrative all this into a turn key remote LAN iSCSI connected BR creation app ?

  20. saintdev Says:

    @hamletiii, this is EXACTLY the point of the post, that it DOES pass verification.

    If you reread Dark’s post you’ll see that The Criterion Collection sponsored x264′s official Blu-ray compliance test.

  21. Dark Shikari Says:

    And furthermore, Sony’s verifier confirms the compliance of this particular Blu-ray as well (which we didn’t test with Criterion, they tested some separate streams).

  22. Biggiesized Says:

    Blu-code costs up to $100,000? That’s not what your link says. (Yes, it’s expensive but not outside the pricing realm of enterprise encoders.)

  23. Dark Shikari Says:


    I’m pretty sure the link doesn’t say anything at all except “contact our sales department for pricing”. $100,000 is just what I’ve heard from people in the business from Doom9.

  24. JEEB Says:

    @hamletiii, unfortunately the same 1080i MPEG-2 track was used on both releases (the Blu-ray box as well as the per-one-disc re-releases).

    The only difference is in the fact that the AC3 English 5.1 track is removed from the re-releases.

    I did actually mail them about the usage of MPEG-2 and its problems, as well as the fact that, should the timing be right, it could be re-encoded with x264 for another release that they could get possible money of (as I am in Japan from time to time), but unlike a certain game company that was happy to even provide the x264 project with an RGB source for development/testing purposes (albeit in SD), there was no reply (although I did form my e-mail well enough, thus I just think that the e-mail I sent the message to was dead).

  25. Dâniel Fraga Says:

    Time for K9Copy developer to implement the blu-ray compression to bd-25/dvd5 using x264 ;)

  26. Clay Says:

    If you want to see more bad blu-ray conversions, check 28 Days Later.

  27. ghayes Says:

    Awesome work !

    So … what are the steps to take a given HD file and burn it to a DVD in blu-ray authored format ? I ask because I have been trying to find a way for my blu-ray player to play HD content that did not come from a blu-ray disc. So far I have a lot of coasters :)

  28. steve Says:

    Works fine with TMT but shows up as Data Disk on PS3. How do you get it to play right on PS3?

  29. nurbs Says:

    Burn the image on a BD-R. The PS3 doesn’t like blu ray structure on DVD.

  30. steve Says:

    thanks, but I am guessing you then need a different burner?

  31. steve Says:

    I am trying the new file above

  32. Chengbin Says:

    First of all, congratulations!

    I’d like to ask, why not make a BD version of the demo disk? Wouldn’t it look bad on x264 to see blocks on the Tallship video, especially on a demo disk? When it is a demo, people think it is the best the encoder has to offer, since most companies hand pick to find the “best” to make their product look better. We understand it has a maximum bitrate limit of 14MB/s, but for people who don’t know, the blocks will give a *bad* impression.


    I think the quality for 28 Days Later was intentional (for some reason I can’t even imagine), because at the end of the movie (last 5 minutes), where it shows present time, the quality becomes normal.

  33. kierank Says:


    28 Days Later was filmed on small standard definition cameras. The last scene was filmed in 35mm however.

  34. steve Says:

    Absolutely amazing work. Thank you so much

  35. any-SOC2010-progress? Says:


    AFAIK the BR disk will be made by one of the doom9 pro users with access to the pro BR authoring apps after his partner gets through some workload apparently.


    “20th April 2010, 21:21
    Big Bit Savings Now !

    In 5 days I will be back and can start making a BD-R 25 from Sony DVD-A output.

  36. suby sudhakaran Says:

    Wow this is amazing … We are 1 step closer to Best Quality for free ….

  37. salsaman Says:

    Cool ! I am right now implementing this for video encoding in LiVES (http://lives.sourceforge.net). Too bad there is no muxer yet though.

  38. salsaman Says:

    Does anybody know the file extension of these video files ? .mpg or something else ?

  39. kierank Says:

    DVD-A isn’t a “pro BR authoring app” by any stretch of the imagination.

  40. any-SOC2010-progress? Says:

    thanks kierank, ohh so you dont have any so called “pro BR authoring app” users offering to make any real BR image after all, thats a shame.

    so AVCHD ISO is as good as we can make right now then with the tools available ? is that right ?, thats what seems to being said here, please clear up this point if possible and any tools we average users might use to make such an industry standard BR image.

  41. Dean Says:

    Both ISOs use bitrates and options so a user can burn to the cheap DVD media (which has its read-speed limits).

    If Dark Shikari wanted, he could’ve encoded these three movies using much higher bitrates (and I believe he will) to prepare a true blu-ray version, which would require burning to BD-R/BD-RE disc.

  42. kierank Says:


    That’s not to say that DVD-A will not produce a valid Blu-ray image. It’s just not classified as a “pro” tool.

  43. john Says:

    Burned with imgburn to a dvdr and my samsung bluray doesn’t play it. Is this for the computer only?

  44. JEEB Says:

    Nope. I’d think that most probably then your player just wants it on a Blu-ray media.

    The fact that several players don’t like Blu-ray structure on a DVD media has been known for some time now.

  45. Dean Says:

    That’s why there are two versions. @john: download the AVCHD/Blu-ray compliant one if you’re going to burn to DVD. It will work in your Samsung.

  46. mp3dom Says:

    There’s no encoder out there that cost as much as 100.000$! (at least from the available high-end encoder, maybe some studios like Toshiba have in-house encoders that will never sell to public). 100.000$ is a complete system based on pro-encoder, Scenarist/BluPrint authoring software, BD emulator, Subtitling software and all you need to made a master for replication.
    As for encoder, 40.000$ is the cost of one high-end pro-encoder. In case of Blu-Code or CC-HDe, the cost is for the encoder and a high-end PC (dual xeon, 12 Gb ram, about 6 TB hd space) that allow a 1080p24 to be encoded at realtime. If you don’t want the PC you can buy the encoder for about 30.000/32.000$.

  47. AndreaV Says:

    Hi, guys.. this H264 encoder seems a very interesting achievement.
    Big pats to everyone.
    we are working since 2004 to an open source TS multiplexer (and SI table generator) for broadcasting in Italy; OpenCaster:


    actually encapsulate MPEG2 video only, as in Italy there’s few H264 interest today.

    but we were looking for proper H264 integration so this x264 is a very complimentary project.
    we plan to develop the encapsulation tool in the next weeks and we’ll let you know.

    Thanx again

    PS BTW i see mentioned another DVB mux tool. is that a sub-project of the videolan system. is there a web site for more information about it?

    kind regards

    Andrea Venturi

  48. ben Says:

    very very cool. i’ll play around with this.

  49. kierank Says:

    @AndreaV I’ll send you an email.

  50. grand_pannier Says:

    Good work. I’m still waiting for LaserDisk compliance though…come on! You’ve had 30 years!

  51. ghayes Says:

    Have a panasonic dmp-bd55K got compatability error on x264 Blu-ray.iso the AVCHD X264_DEMO_DISC.ISO did play, although the fast forward was not as smooth as a BD. I am guessing the player is the problem as the picture was good.

  52. ltsampros Says:

    @kierank would you mind sharing the details to the public? An open source/free software DVB mux is way too hot :)

  53. kierank Says:



    Haven’t got round to writing a buffering model and there are a few bugfixes necessary.

  54. Doris Says:

    Hi, I got a pretty good system with a Sony Blu-Ray ROM. I got a MPEG-2 CODEC for ROXIO about a year ago. I been having problems with the picture, a little, because of the codec is made for DVD’s.
    If you can help. Email me.
    The MPEG-2 looks video looks plain. I know I can get a better picture with BLU-Ray’s.

  55. brunogm0 Says:

    Guys using mediainfo in the streams of the Evangelion 2.22 Blu-ray i’ve found this:

    Codec/Info :
    Advanced Video Codec
    Codec/Url :
    Codec profile :
    Codec settings :
    CABAC / 2 Ref Frames
    Codec settings, CABAC :
    Codec_Settings_RefFrames :
    Duration :
    Duration :
    1h 52mn
    Duration :
    1h 52mn 9s 514ms
    File size :
    32.18 GiB

  56. Anonymous x264 fan Says:

    Chengbin: What blocks do you see? I gess that DVD was chosen to show x264′s capabilities. 14Mb/s is more than enough for x264!

  57. JonPan Says:

    Are there any plans to add support for MVC for encoding for 3D Blu-Ray’s ??

  58. imran14826 Says:

    so AVCHD ISO is as good as we can make right now then with the tools available ? is that right ?, thats what seems to being said here, please clear up this point if possible and any tools we average users might use to make such an industry standard BR image.


  59. Syrup1971 Says:

    Can you give more details of the licensing terms of the microsoft clips – are they permitted for public display (non-paying)?

    Good work!


  60. Dark Shikari Says:


    Yes, see the end of the video for licensing terms.

  61. Austin Says:

    Any news about the DVB-compatible free software TS muxer ? Thk

  62. David Harry Says:

    This is fantastic. Have made a number of Blu-rays using elementary streams from the latest x264, authored via Encore CS5. In the past I would have to use commercial software for my h264 stream as x264 did not generate legal blu-ray streams, but not now. I have compared encoding against Carbon Coder and Reference. X264 is as least as good in many situations, and in some it is better. I am working on a front end for people who want authoring streams from their NLE files such as Edius, Avid, Premiere, etc.



  63. Lawrence Wilson Says:

    I’ve been using this for a couple weeks now to compress HDTV transport streams of my favorite shows for burning to Blu-Rays. So far, I’ve made three Blu-Rays, and I’ve been very pleased with the end results. I’d rather it didn’t take so long to encode, but I guess H.264′s more processor-intensive than MPEG-2, right?

  64. witek Says:

    Wow. This screenshots indeed are disaster.

    How about publishing Microsoft lossless clips separetly file by file?

  65. roger Says:

    Thanks for your work on this. x264 rocks!

Leave a Reply