Linux - HOW-TO playback Blu-ray Disc in XBMC for Linux with MakeMKV (Plugin Addon)

  Thread Rating:
  • 13 Votes - 4.23 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
magnetism Offline
Senior Member
Posts: 135
Joined: Dec 2008
Reputation: 0
Post: #31
Ok, a new version is now available which has some support for browsing.

Changelog:
  • Fixed makemkvcon not being killed
  • makemkvcon now also killed in windows (probably)
  • Added settings for host/portname
  • Added remote/local option
  • Added support for browsing

The script now has a settings section with the following options:
"Autoplay main feature" -> Turn this off to enable selecting the stream from the BR
"Use local or remote MakeMKV" -> If set to remote, the script will simply wait for a stream to become available on the configured IP and Port. It will not try to load MakeMKV itself (means no MakeMKV required on XBMC machine)
"MakeMKV location" -> Point this to the makemkvcon executable. If it's on your path you should not need to change. On windows, you will probably need to browse to the location
"IP address" -> The IP of the machine with MakeMKV. When in localmode, you cannot change this
"Port number" -> The portnumber to listen to.

When starting the script it will ask if you want to play a disc or browse. When you select play a disc it will simply take the BR in your player and load it. When you select browse a browse window with your video share should come up. Simply select an ISO or and index.bdmv file (note, only select index.bdmv if you want to run directory structure BR's, other files like MediaObject.bdmv won't work for now.)
If you've deselected the autoplay main option a select should come up which lets you select which chapter to play.

I'll admit to it being ugly as hell, but it seems to work for now. Let me know how you get on when trying this.

Note As mentioned earlier iso's and dirs on SMB shares won't work on linux at the moment if they've been added to the source of XBMC as such.

I'll update the first post of this thread sometime later this week.
find quote
idioteque Offline
Fan
Posts: 407
Joined: Aug 2008
Reputation: 0
Post: #32
is it possible to make it work with Mac OS X ?

I tried bur nothing happens. it goes to 100% and than nothing.

playing the mts files is fine

MBP late 2009 - TimeCapsule 2TB - Harmony One+ - Readynas NV+ 8TB RAID5 - Mac Mini late 2009 with 10.9.0 and VDA - Panasonic TX-PG420ES -
find quote
glenner05 Offline
Junior Member
Posts: 18
Joined: Aug 2009
Reputation: 0
Post: #33
do i have to make the changes in the settings.xml file in the scripts directory? or can is make this settings from within xbmc somewhere? i don't have any experience with scripts. i can open the settings.xml file and make changes, but don't know excactly what to edit. i want to launch makeMKV on a windows pc, stream it from there with ip 192.168.2.3:51000.
so i should set settings to remote i think, ip 192.168.2.3 and port 51000. how should my settings.xml look like then?

edit: ok, i'm an idiot :-) just found out when connecting a mouse to my xbmc machine that i can rightclick on the script, and edit settings.... it works like a charm!
@magnetism: this is genius! very very nice work. Just as simple as launching a script. I'm using a selfbuild ION mediacenter with xbmc live 9.11 karmic updated with latest SVN. Since i don't installed a blue ray drive in it, i'm using the blu ray drive on my windows PC to play the disc. Installing Makemkv for windows and then stream the blu ray disc is really all you have to do. Plays very smooth through my gigabit network. Can select all audio tracks, subtitles, everything!
Next thing i'm gonna buy me a nice slimline blu ray drive for my ion machine, so i can play the disc directly from there, no need for running two computers then. Any way, this completes the xbmc live experience! can really play everything now! including blu ray discs! THANKS!
(This post was last modified: 2010-01-28 19:13 by glenner05.)
find quote
magnetism Offline
Senior Member
Posts: 135
Joined: Dec 2008
Reputation: 0
Post: #34
Just a quick update that I've uploaded a new version. Nothing new in this one, but it solves a major issues I've experienced on my linux machine: Chapter Browsing wouldn't work.

Download at the same place.
find quote
magnetism Offline
Senior Member
Posts: 135
Joined: Dec 2008
Reputation: 0
Post: #35
idioteque Wrote:is it possible to make it work with Mac OS X ?

I tried bur nothing happens. it goes to 100% and than nothing.

playing the mts files is fine

I don't have a mac, so there is no way to test this for me. I'll add proper logging in the next release so I can experiment some to see where it goes wrong.

Just to check: You do have MakeMKV installed yes? Also, make sure you use the settings to point to the proper makemkvcon file.
find quote
olafvs Offline
Member
Posts: 59
Joined: Jan 2010
Reputation: 0
Post: #36
3choTh1s Wrote:I just have a small problem that when I try to play a bluray my audio craps out with a "Failed to initialize audio device." Which actually makes all the sound from linux stop not just xbmc. But I'm pretty sure that's the fault of xbmc(or linux configuration?) not this script or Makemkv. So I'll put that as a question in another thread.

Anyways thanks again!

I had the same problem. What I did to get it working:

I don't know all of the steps are necessary so just try. Maybe it already works after step 2.

1. Install the new script.
2. Start a movie.
3. If no sound select the sound settings of the movie and select analog.
4. If no sound go to this page(registration required) and update alsa by following the steps.

http://ubuntuforums.org/showthread.php?t=1046137

After the last step don't forget to unmute your alsamixer channels.

I have a AsRock Ion 330 and it worked for me.
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #37
Hey All.

Is anyone using the Lite-On 4X Blu reader with this stuff. I have tried this on every machine in my house from ION to C2D 8400 with up to 8MBs of ram and the only disc I can play is Gone in Sixty seconds. I have tried 15 movie minimum and actually patriot games plated a little last night on my Asrock ION330 with the lite-on in a USB chassis but the audio kept going away.

I am checking out the latest SVN and will build that and try. I am GLX 195 on every machine with .17 kernel and all Karmic. I think I recall testing on Intrepid and it worked the same way.

I am currently on XBMC 9.11 SVN.

rgds,

Dave
find quote
3choTh1s Offline
Junior Member
Posts: 4
Joined: Oct 2009
Reputation: 0
Big Grin  updating alsa
Post: #38
olafvs Wrote:I had the same problem. What I did to get it working:

I don't know all of the steps are necessary so just try. Maybe it already works after step 2.

1. Install the new script.
2. Start a movie.
3. If no sound select the sound settings of the movie and select analog.
4. If no sound go to this page(registration required) and update alsa by following the steps.

http://ubuntuforums.org/showthread.php?t=1046137

After the last step don't forget to unmute your alsamixer channels.

I have a AsRock Ion 330 and it worked for me.

You are the man! Didn't realize that alsa wasn't updated. Watching BluRays works great now. Seriously thanks for pointing that out. I've been ripping out my hair trying to figure it out.
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #39
I updated to the latest SVN from Camelot 9.11 SVN and voila we have playback. Although now I am getting very large block frame drops/tearing, if they can be described as that. I think it has to do with switching resolution to 24fps. seems to play fine at 60h.

dave
find quote
batrad Offline
Member
Posts: 95
Joined: Jun 2007
Reputation: 0
Post: #40
I have the exact same burner and have tried a few movies (Superman, Snow White..), but none of them play on my ION Build. I'm using erhnam's Live CD V10.. Have tried the older builds as well .. no luck ..



rodercot Wrote:Hey All.

Is anyone using the Lite-On 4X Blu reader with this stuff. I have tried this on every machine in my house from ION to C2D 8400 with up to 8MBs of ram and the only disc I can play is Gone in Sixty seconds. I have tried 15 movie minimum and actually patriot games plated a little last night on my Asrock ION330 with the lite-on in a USB chassis but the audio kept going away.

I am checking out the latest SVN and will build that and try. I am GLX 195 on every machine with .17 kernel and all Karmic. I think I recall testing on Intrepid and it worked the same way.

I am currently on XBMC 9.11 SVN.

rgds,

Dave
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #41
So I spent about 6 hours between last night and this morning and fixed a bunch of things.

downgrade to nvidia glx 185 drivers for enabling of LPCM hdmi passthrough. Note had to force nvidia-185-libvdpau to install via dpkg as it again conflicted with the installed libvdpau.so file.

I updated to Alsa 1.0.22.1 for MC LPCM playback as well as DDTRUHD and DTS-HD (stripped to core right now)

Then I downgraded to SVN 27017 from the 27292 as I was getting crashing issues when trying to play SD DTS encoded files.

This I grabbed the latest asound.conf from the svn trunk and placed it in
/usr/share/xbmc/system after backing up the current file in the directory.

Then I created a new custom xorg.conf file for my Denon rcvr for 24/60p switching.

Now I can play most all of my blu rays with the lite-on 4x reader. I am on Karmic (myth 9.10 FE) with a zotac itx-F-E oc'd to 2.1Ghz and 4Gb of OCZ.

The only discs I am having issues with are Big Trouble in Little China, the script counts to 100 and then exits, it does not crash if I run makemkv it will read the disc and allow me to stream it but it does take some time, I have to time it to see if it is more than two minutes.

The other disc is Risky Business (digital copy) actually if I pop this disc in XBMC gui goes completely haywire with red,green and blue squares all over the screen, makemkv cannot even read that disc which I think is to do with the digital copy but I will post over there and see what they have to say.

Where in the script can we modify to make it wait a little longer for the stream to become available.

Thanks for this it is awesome,

Dave
find quote
magnetism Offline
Senior Member
Posts: 135
Joined: Dec 2008
Reputation: 0
Post: #42
rodercot Wrote:Where in the script can we modify to make it wait a little longer for the stream to become available.
Nothing in the settings yet, I'll incorporate it in the settings in the next version.
find quote
hippojay Offline
Fan
Posts: 300
Joined: Mar 2008
Reputation: 14
Location: Sheffield, UK
Post: #43
Hi,

Nice work, but I'd been having problems getting this to work with ripped BD file structures. It looks like the problem is file name and spaces. I've fixed it by popping a couple of double quotes around the filename:

mkvStart = '"%s" stream file:\"%s\"' %(self.settings.mkvLocation, choice[:-15])

This works a treat now (on filesname with and without spaces).

There is also another problem in that sometimes makemkvcon is using the next available port (51001) rather than 51000. This might account for any "hangs" awaiting a stream. Some sort of port detection might help (perhaps utilising the PID of the makemkvcon process - sorry I can't help with any actual code, but I've never looked a python before - so i'd be doing all this through shell commands..)..

EDIT: something like this, but it's real hacky:
PPID = subprocess.Popen('makemkvcon stream file:\"/home/xbmc/data/BluRay/\"', shell=True)
PID = subprocess.Popen('ps --ppid %s' %(PPID.pid) + ' | grep makemkvcon | awk \'{print $1}\'' ,shell=True )
PORT = subprocess.Popen('netstat -alpt | grep %s ' %(PID) + ' | awk \'{print $4}\' | cut -f2 -d:' ,shell=True)
print PORT

as you can see, this is my first python script Smile
(This post was last modified: 2010-01-31 01:58 by hippojay.)
find quote
rodercot Offline
Donor
Posts: 796
Joined: Feb 2008
Reputation: 25
Location: Ottawa, Canada
Post: #44
OK! I fixed the Risky Business Blu Ray problem using the actual Blu Ray disc and not the digital copy disc - DOH! Yes I am an idiot - LOL.

They actually had the Blu Ray disc hidden under the paper inserts that slide under those clips in the sheave so when I picked it up and the paper fell out voila there be a second disc in them there hills.

Regards,

Dave
find quote
mross22 Offline
Junior Member
Posts: 27
Joined: Feb 2009
Reputation: 0
Question  [LINUX] Possible Blu-ray Disc playback from a external drive shared over the network?
Post: #45
I recently installed the NVIDIA-ION optimized XBMC Live 9.11 Live version on my new Asrock ion XBMC live. This build has MakeMKV script for decoding bluray disks.

My Asrock does not contain a bluray drive (ASROCK 330 Pro), but I have a bluray drive on another computer in my office (win 7). I have 10/100 wired cables connecting everything, through a large central switch.

Can I play bluray content and stream to the asrock from the bluray drive on the office computer via the script?

Is it as simple as:
-Sharing the external drive on the bluray machine (windows warns me I should not do this)
-add that shared external bluray drive to XBMC
-inserting a bluray disk into the player
-running the script, and selecting the external bluray drive as the source?
-watching a movie?

thank you -

Michael
find quote
Post Reply