{"id":454,"date":"2012-09-19T14:31:24","date_gmt":"2012-09-19T14:31:24","guid":{"rendered":"http:\/\/www.redrobe.com\/mike\/?p=454"},"modified":"2012-09-19T14:31:24","modified_gmt":"2012-09-19T14:31:24","slug":"play-dvd-disk-on-raspberry-pi","status":"publish","type":"post","link":"https:\/\/redrobe.com\/mike\/play-dvd-disk-on-raspberry-pi\/","title":{"rendered":"Play DVD disks on Raspberry Pi"},"content":{"rendered":"<p>In August the Raspberry Pi Foundation started selling MPEG2 codec licenses for the popular Raspberry Pi.<\/p>\n<p>With this installed, the Pi can decode MPEG2 directly on its GPU chip, with very little CPU usage. The ARM CPU used in the Pi isn&#8217;t really powerful enough to decode MPEG2 on its own.<\/p>\n<p>Since DVDs use MPEG2, this is a very welcome addition as it means hardware accelerated playback for DVDs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-463\" title=\"DVD with Pi\" src=\"http:\/\/www.redrobe.com\/mike\/wp-content\/uploads\/2012\/09\/photo-1-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" \/><\/p>\n<p>Unfortunately due to the legal position on decrypting the CSS encryption on DVD disks, many distributions don&#8217;t include the relevent files.<\/p>\n<p>You can get around this by compiling it yourself on the Pi, and here&#8217;s how:<\/p>\n<p>Download and extract the libdvdcss source code:<\/p>\n<p><code> wget http:\/\/www.videolan.org\/pub\/libdvdcss\/1.2.12\/libdvdcss-1.2.12.tar.bz2<br \/>\nsudo apt-get install -y bzip2<br \/>\ntar -xvjpf libdvdcss-1.2.12.tar.bz2<br \/>\n<\/code><\/p>\n<p>Compile it (only takes a few minutes):<\/p>\n<p><code>cd libdvdcss-1.2.12<br \/>\n.\/configure<br \/>\nmake<br \/>\nsudo make install<\/code><\/p>\n<p>All done, now copy the libraries over:<\/p>\n<p><code>sudo cp \/usr\/local\/lib\/libdvdcss* \/lib<\/code><\/p>\n<p>Now we can play a DVD direct from the disk:<br \/>\n<code><br \/>\nmkfifo \/tmp\/dvdpipe<br \/>\nmplayer dvd:\/\/1 -dumpstream -dumpfile \/tmp\/dvdpipe 1&gt;\/dev\/null 2&gt;\/dev\/null &amp;<br \/>\nomxplayer -r \/tmp\/dvdpipe <\/code><\/p>\n<p>This may come to XBMC eventually,  but current XBMC DVD code doesn&#8217;t allow for hardware acceleration. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In August the Raspberry Pi Foundation started selling MPEG2 codec licenses for the popular Raspberry Pi. With this installed, the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[32,50],"class_list":["post-454","post","type-post","status-publish","format-standard","hentry","category-technology","tag-dvd","tag-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":0,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"wp:attachment":[{"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redrobe.com\/mike\/wp-json\/wp\/v2\/tags?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}