{"id":77,"date":"2009-09-02T10:44:00","date_gmt":"2009-09-02T00:44:00","guid":{"rendered":"https:\/\/www.serenux.com\/?p=77"},"modified":"2021-01-14T10:55:26","modified_gmt":"2021-01-14T00:55:26","slug":"howto-deal-with-bd-copy-protection-when-ripping-blu-ray-titles-using-ubuntu","status":"publish","type":"post","link":"https:\/\/www.serenux.com\/index.php\/2009\/09\/02\/howto-deal-with-bd-copy-protection-when-ripping-blu-ray-titles-using-ubuntu\/","title":{"rendered":"HowTo: Deal with BD+ copy protection when ripping Blu-ray titles using Ubuntu"},"content":{"rendered":"\n<p>A fair while back now, I wrote an article detailing&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/2009\/01\/howto-rip-a-blu-ray-movie-using-an-lg-ggc-h20l-blu-ray-drive-with-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">how to decode Blu-ray titles using Ubuntu and an LG GGC-H20L Blu-ray optical drive<\/a>.<\/p>\n\n\n\n<p>This article detailed how to decrypt just about every movie under the sun except for a newer type of protection called \u201cBD+\u201d which I never got around to supplementing my original article with.<\/p>\n\n\n\n<p>What is \u201cBD+\u201d protection? Well in short, it\u2019s the deliberate corruption of random parts of the video track of the movie (well, OK \u2013 that is a highly simplified definition as BD+ protection can do a lot more than that, but the end result is the same \u2013 to prevent unauthorised playback which includes ripping). The idea BD+ is that when you rip the title, you can still watch the movie, but with some or all of the screen corrupt at various stages in the movie which well and truely ruins the movie-watching experience, especially since you paid good money for it and should not be forced to buy a dedicated consumer Blu-ray player when you\u2019ve got a perfectly good PC that can do the same task.<\/p>\n\n\n\n<p>But hang on, if the movie is deliberately corrupt, then how come it plays fine in a stand-alone consumer Blu-ray player or PlayStation3 console?<\/p>\n\n\n\n<p>Well, let me tell you about that and how to get around it yourself.<\/p>\n\n\n\n<p>I have to give credit to the movie studios for this one. It\u2019s a simple, and annoying, method of protection. But as with anything, it was eventually reverse-engineered and broken, and neat little tools were developed to allow us consumer types to backup, or watch in our preferred way, our movies bought with our hard-earned cash.<\/p>\n\n\n\n<p>So what\u2019s this BD+ thing all about? Basically after the movie is mastered and just before being pressed to discs, an extra step is taken where by random parts of the movie data stream are deliberately exchanged with random data or removed altogether, thus corrupting the video stream. A record is kept, however, of what parts of the movie have been changed \u2013 a table listing where, when and what data needs to be put back into the movie stream in order to watch the movie back in its original uncorrupted format. This table is called a \u201cconversion table\u201d, and it is processed by your Blu-ray player while you watch the movie, with the correct data substituted back into the video stream before the image hits your screen, thus resulting in a proper uncorrupted picture.<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDCorruptStream.jpg\"><\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193504if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDCorruptStream.jpg\" alt=\"\"\/><figcaption>An example of a corrupted video stream showing the BD+ Protection in full effect.<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193510if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDNotCorruptStream.jpg\" alt=\"\"\/><figcaption>An example of the repaired video stream using the Conversion Table.<\/figcaption><\/figure><\/div>\n\n\n\n<p>So how do we get around BD+? Well, all we have to do is follow this conversion table ourselves and correct the corrupted data as the title is decrypted.<\/p>\n\n\n\n<p>As I showed in my previous article, the DumpHD application is brilliant and it has been extended by the author KenD00 to allow the \u201cplugging in\u201d of another program called the \u201cBD VM Debugger\u201d. What this program does is simple \u2013 it executes the Java Virtual Machine that runs the conversion table in concert with the normal decrypting process which happens when the disc is played in your normal BD player, patching up the stream as it goes. The end result is a clean decryption with no corrupt video stream.<\/p>\n\n\n\n<p>This tutorial was written using Ubuntu Jaunty but should work with Intrepid and should definitely work with Karmic and beyond as well.<\/p>\n\n\n\n<p><em>DISCLAIMER: This article describes decrypting BD titles using an Intel or AMD based PC with Ubuntu Linux. At this time of writing you&nbsp;<strong>cannot<\/strong>&nbsp;use Ubuntu installed on a PlayStation3 console to deal with BD+ copy protection because the BD VM Debugger and AACS Keys applications are not available for the PPC processor used by the PS3.<\/em><\/p>\n\n\n\n<p>So let\u2019s set this up, but first \u2013 since my last article,&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/forum.doom9.org\/showthread.php?t=123111\" target=\"_blank\" rel=\"noreferrer noopener\">DumpHD<\/a>&nbsp;has been updated to 0.61 so let\u2019s upgrade this first.&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/rapidshare.com\/files\/240557737\/dumphd-0.61.tar.gz\" target=\"_blank\" rel=\"noreferrer noopener\">Go and download yourself a copy<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Extract the archive out by either double-clicking on it or via the terminal. You should get a \u201cdumphd-0.61\u2033 directory.<br><\/li><li>If you are upgrading from an older version of DumpHD, copy over the \u201cKEYDB.cfg\u201d file, overwriting the archive copy. No point losing your collection of keys accumulated thus far.\u00a0<img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193548im_\/http:\/\/www.serenux.com\/wp-content\/themes\/grey-opaque\/images\/smilies\/icon_smile.gif\" alt=\"Smilie: :)\"><br><\/li><li>You\u2019re done for this bit.<\/li><\/ol>\n\n\n\n<p>The AACSKeys program (which extracts the decryption key for the Blu-ray title and can automatically update your \u201cKEYDB.cfg\u201d file for you when you insert a new Blu-ray title) has also been updated to 0.4.0c since my last article, so&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/rapidshare.com\/files\/273476005\/aacskeys-0.4.0c.tar.gz\" target=\"_blank\" rel=\"noreferrer noopener\">go download yourself a copy of that as well<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Extract the archive out by either double-clicking on it or via a terminal. You should get a \u201caacskeys-0.4.0c\u201d.<br><\/li><li>Copy the \u201cProcessingDeviceKeysSimple.txt\u201d and \u201cHostKeyCertificate.txt\u201d into the \u201cdumphd-0.61\u2033 directory.<br><\/li><li>Copy over the \u201clibaacskeys.so\u201d file located in the \u201c\/lib\/linux32\/\u201d OR \u201c\/lib\/linux64\/\u201d directories (depending on which architecture you\u2019re using) to the \u201cdumphd-0.61\u2033 directory. Do NOT copy or create the \u201c\/lib\/linux32\u2033 or \u201c\/lib\/linux64\u2033 directories themselves. Copy the library file only.<br><\/li><li>You\u2019re done for this bit.<\/li><\/ol>\n\n\n\n<p>Right, let\u2019s get the BD VM Debugger installed. As of this writing, the current version is 0.1.5.&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/uploaded.to\/?id=xcco6l\" target=\"_blank\" rel=\"noreferrer noopener\">Go and download yourself a copy<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>This archive is provided as a 7zip file. Ubuntu does not have out-of-the-box support for this archive format, so install it first with:<br><br><code>$ sudo apt-get install p7zip-full<\/code><br><\/li><li>Once installed, extract the archive either by double-clicking on it like any normal archive, or via the terminal as follows:<br><br><code>$ 7z e bdvmdbg-0.1.5.7z<\/code><br><\/li><li>Copy over the everything into the \u201cdumphd-0.61\u2033 directory except the \u201cchangelog.txt\u201d, \u201creadme.txt\u201d and \u201cdebugger.sh\u201d files since you don\u2019t really need them, but there\u2019s no harm copying them anyway.<br><\/li><li>That\u2019s it!<\/li><\/ol>\n\n\n\n<p>You should now have a total of at least of 17 files and two directories inside the \u201cdumphd-0.61\u2033 directory (if you are setting up these tools for the first time, you will only have 15 files instead, as two of them&nbsp; \u2013&nbsp;<em>conv_tab.bin<\/em>&nbsp;&amp;&nbsp;<em>hash_db.bin<\/em>&nbsp;\u2013 are generated by DumpHD in conjunction with the BD VM Debugger).<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHD061Folder.jpg\"><\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193513if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHD061Folder.jpg\" alt=\"\"\/><figcaption>The prepared DumpHD folder with the tools we need.<\/figcaption><\/figure><\/div>\n\n\n\n<p>Now let\u2019s try decrypting a BD+ protected Blu-ray title. In this example, I will use the Australian release of \u201cDay Watch\u201d, the sequel to the Russian epic \u201cNight Watch\u201d.<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DayWatchBox.jpg\"><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193517if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DayWatchBox.jpg\" alt=\"\"\/><figcaption>The BD+ Protected &#8220;Day Watch&#8221; Blu-ray title I am ripping.<\/figcaption><\/figure>\n\n\n\n<p><em>NOTE: Your ability to decrypt a given Blu-ray title, BD+ protected or not, will ultimately depend on the MKB version of the disc. As of this writing, DumpHD can only decrypt up to MKB version 10. Newer discs using version 11 or later can only be decrypted once suitable decryption keys are uncovered and added to the \u201cProcessingDeviceKeysSimple.txt\u201d file in the \u201cdumphd-0.61\u2033 directory.<\/em><\/p>\n\n\n\n<p><em>The obtaining of the decryption key of the Blu-ray title also requires the player authentication mechanism of your Blu-ray drive to be bypassed, or through use of a drive that deliberately does not have this feature such as some imported drives from China. In the case of my LG GGC-H20L drive, I used a&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/2009\/01\/howto-rip-a-blu-ray-movie-using-an-lg-ggc-h20l-blu-ray-drive-with-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">modified firmware<\/a>&nbsp;so that the drive always gave up the disc\u2019s decryption key regardless of what player certificate I used \u2013 blacklisted or not.<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Start the DumpHD program by double-clicking on the \u201cdumphd.sh\u201d icon. You will be asked if you want to run the script file. Click on the \u201cRun\u201d button.<\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193521if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/StartingDumpHD.jpg\" alt=\"\"\/><figcaption>Starting the DumpHD application.<\/figcaption><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>When the DumpHD GUI appears, make a note of the messages in the bottom pane to ensure that AACSKeys and the BD VM Debugger was found and loaded OK. You should see the following information:<br><br>DumpHD 0.61 by KenD00<br>Opening Key Data File&#8230; OK<br>Initializing AACS&#8230; OK<br>Loading aacskeys library&#8230; OK<br>aacskeys library 0.4.0 by arnezami, KenD00<br>Loading BDVM&#8230; OK<br>BDVM 0.1.5<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHDStarted.jpg\"><\/a><br><br><\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193525if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHDStarted.jpg\" alt=\"\"\/><figcaption>The DumpHD Interface<\/figcaption><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>Insert the Blu-ray title into your Blu-ray drive.<br><\/li><li>Next to the \u201cSource\u201d section at the top-right of the DumpHD window is a \u201cBrowse\u201d button. Click on it.<br><\/li><li>Navigate to the path of your Blu-ray drive (generally \u201c\/media\/cdrom\u201d will work fine). and hit the OK button.<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHDBrowseSource.jpg\"><\/a>Choosing a source to rip from. Click for full size.<\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193528if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHDBrowseSource.jpg\" alt=\"\"\/><figcaption>Setting up the ripping source<\/figcaption><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\"><li>DumpHD will read the disc and will pass it through AACSKeys to identify the title\u2019s descryption key. If it is successful, it will output some data about the disc in the lower pane. In the case of my\u00a0<em>Day Watch<\/em>\u00a0title, it shows the following:<br><br>Initializing source&#8230;<br>Disc type found: Blu-Ray BDMV<br>Collecting input files&#8230;<br>Source initialized Identifying disc&#8230; OK<br>DiscID : 73886D08811073F45AD8C75012689097E17EBD3C<br>Searching disc in key database&#8230;<br>Disc found in key database<a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHDDiscIdentified.jpg\"><\/a><br><br><\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193530if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/DumpHDDiscIdentified.jpg\" alt=\"\"\/><figcaption>Identifying the disc and getting the decryption keys to rip with<\/figcaption><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li>This is good. We can decrypt this. If the title is not one you have ripped before, you have the option to click on the \u201cTitle\u201d button at the top-left of the DumpHD window to give the movie a name in your Key Database.<br><\/li><li>In the \u201cDestination\u201d section on the right, click on the \u201cBrowse\u201d button.<br><\/li><li>Choose a place to dump the decrypted disc to. Note that most titles will dump at least 20GB worth of data and in some cases 50GB. Ensure that you have enough hard-drive space in the location you choose to dump to.<br><\/li><li>We\u2019re ready to rock and\/or roll. Click on the \u201cDump\u201d button and decryption will begin, automatically executing the BD VM and applying the Conversion Table to correct the deliberate corruption in the video stream. Here\u2019s a small extract of what you will see in the lower pane of the DumpHD window:<br><br>AACS data processed<br>Initializing the BDVM&#8230; OK<br>Executing the BDVM&#8230; OK<br>Parsing the Conversion Table&#8230; OK<br>Processing: BDMV\/BACKUP\/CLIPINF\/00000.clpi<br>Processing: BDMV\/BACKUP\/CLIPINF\/00001.clpi<br>Processing: BDMV\/BACKUP\/CLIPINF\/00002.clpi<br>etc&#8230;<br><br><a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDRipStart.jpg\"><\/a><\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193534if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDRipStart.jpg\" alt=\"\"\/><figcaption>Beginning the ripping process<\/figcaption><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"11\"><li>And after awhile it will finish with something like:<br>Processing: BDMV\/STREAM\/00211.m2ts<br>Searching CPS Unit Key&#8230; #1<br>0x0000000000 Decryption enabled<br>Processing: BDMV\/STREAM\/00212.m2ts<br>Searching CPS Unit Key&#8230; #1<br>0x0000000000 Decryption enabled<br>Processing: BDMV\/index.bdmv<br>Disc set processed<br><br><a href=\"https:\/\/web.archive.org\/web\/20160311193548\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDRipDone.jpg\"><\/a><\/li><\/ol>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20160311193537if_\/http:\/\/www.serenux.com\/wp-content\/uploads\/2009\/09\/BDRipDone.jpg\" alt=\"\"\/><figcaption>Finished decrypting the Blu-ray title.<\/figcaption><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"12\"><li>That\u2019s it! You\u2019ve successfully decrypted the disc and fixed up the corrupted video track. Identify and playback the actual movie M2TS file using a player like MPlayer or VLC, and you should now find that it contains no corruption whatsoever. In the case of\u00a0<em>Day Watch<\/em>, the movie file was under\u00a0<em>BDMV\/STREAM\/00012.m2ts<\/em>\u00a0identifiable simply because it was the largest file in the directory. Using MPlayer, you can play this file with:<br><br><code>$ mplayer -fs BDMV\/STREAM\/00012.mt2s<\/code><br><br>Thankfully this title does not have the movie broken up into multiple files (I\u2019ll be writing another article soon showing you how to deal with multi-part movies).<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>A fair while back now, I wrote an article detailing&nbsp;how to decode Blu-ray titles using Ubuntu and an LG GGC-H20L Blu-ray optical drive. This article detailed how to decrypt just about every movie under the sun except for a newer type of protection called \u201cBD+\u201d which I never got around to supplementing my original article [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":1,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/77\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}