Linux - How to associate "Play disc" with the Blu-ray discs?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
teeedubb Offline
Donor
Posts: 2,546
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #61
Not sure as I havent installed it manually, but it looks as though its in the Ubuntu repos. Looking at the manual it says its automated so maybe you just need to install. Googling udevil will bring up the manual.

Also check this out, looks very interesting http://forum.xbmc.org/showthread.php?tid=173474

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
RusNeuroMancer Offline
Junior Member
Posts: 7
Joined: May 2011
Reputation: 0
Post: #62
(2012-12-13 23:16)shadow Wrote:  After trying this out I find the "Play disc" to work for Blu-Ray but only if the disk is actually mounted. Which doesn't seem to work automatically.
After inserting the disc XBMC sees it but doesn't actually mount it. I know this because going to "videos > files" I can see the disc label but opening it takes me to the root filesystem.
In addition ssh'ing in and running the mount command doesn't show it as mounted.
If I manually mount it OR restart the lightdm service it does mount it properly and then the "Play disc" work perfect and the movie starts.
I observe exactly same behaviour with Ubuntu 13.10 and XBMC 13. Also "/usr/bin/udisks --mount /dev/sr0" mount disk (into /media/FOLDER; where FOLDER is same as disk label) but for some reason that doesn't happen automatically. I tried multiple methods from this thread but no one method help get Blu-ray automatically mounted.
Before Ubuntu 13.10 I used udisks-glue method witch works, but since Ubuntu 13.10 this method stop working (since udisks-glue not available anymore).

Judging from this thread seems like many users have same problem, but I can't find bugreport in XBMC Trac. There is really no bugreport about this?
How Blu-ray mounting implemented in OpenELEC?
(This post was last modified: 2014-01-03 06:42 by RusNeuroMancer.)
find quote
teeedubb Offline
Donor
Posts: 2,546
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #63
OE now uses udevil (well last time I checked it did), and it works well for me with 13.10.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
find quote
spontex Offline
Member
Posts: 95
Joined: Jan 2012
Reputation: 0
Post: #64
Thank you for this information.
Then I will try with the new version of XBMCbuntu when it is out, and if it still does not work, I will switch to OpenElec.
But I assume that there is no miracle, The Keys database has not been updated for a long time and the new Blu-ray discs do not work anymore with the libaacs method on my setup.
find quote
teeedubb Offline
Donor
Posts: 2,546
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #65
I have upgraded to ubuntu 14.04 with udevil, xbmc 13beta + makemkv and while bd discs mount automatically to /media/DISC_ID with udevil, the "play disc" option is not working Sad
It seems as the xbmc function PlayDVD does not work with bd's, although HasMediaDVD detects that there is a disc inserted. Ive tried something different this time - editing skin files to launch a custom script instead of PlayDVD and "play disc" is working well, and hopefully it will stay that way now. Two scripts are needed, as SystemExec caused probems - both need to be made executable and some changes will need to be made to suit your system.

xbmc-play-disc.py
Code:
import os

os.system('/home/xbmc/.scripts/xbmc-play-disc.sh &')

xbmc-play-disc.sh
Code:
#!/bin/bash
#script to play dvd/cd/bluray with xbmc
udevil mount -o ro,noatime /dev/sr0

BD_DISC=$(ls  /media/*/BDMV/index.bdmv 2> /dev/null)

if [[ "$BD_DISC" ]]; then
  xbmc-send --host=192.168.1.32 --port=9777 --action="PlayMedia("$BD_DISC")"
else
  xbmc-send --host=192.168.1.32 --port=9777 --action="PlayDVD"
fi

A skin file needs to be editied and the following is for aeon nox 5, but should be similar for different skins.
~/.xbmc/addons/skin.aeon.nox.5/1080i/Home.xml
Replace:
Code:
<onclick>PlayDVD</onclick>
with:
Code:
<onclick>RunScript(/home/xbmc/.scripts/xbmc-play-disc.py)</onclick>

The following sed command automatically does the above:
Code:
sed -i 's$<onclick>PlayDVD</onclick>$<onclick>RunScript(/home/xbmc/.scripts/xbmc-play-disc.py)</onclick>$g' ~/.xbmc/addons/skin.aeon.nox.5/1080i/Home.xml

Ive tested with cd, dvd + bd and all three start via play disc.

On a side note using makemkv + libaacs/libbdplus has worked great for every bd I have used with it.

A debug log of no bd being played via PlayDVD, for completeness sake.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2014-03-21 08:27 by teeedubb.)
find quote
spontex Offline
Member
Posts: 95
Joined: Jan 2012
Reputation: 0
Post: #66
Hi,
Thank you for your message. Do you now use the libmmbd method (instead of open source libaacs) to play Blu-ray discs?
I have tried to follow these steps, but do not have any <onclick>PlayDVD</onclick> in the file ~/.xbmc/addons/skin.aeon.nox/1080i/Home.xml.
Thanks
find quote
teeedubb Offline
Donor
Posts: 2,546
Joined: Mar 2010
Reputation: 62
Location: Down Under
Post: #67
Yep, Ive been using libmmbd instead of the vlc way and it works well - although the newest disc I have is Dark Knight Rises. It does seem to take longer to start a disc(edit: disc that arent playable the vlc way take longer, discs that are playable the vlc way start in the same time with makemkv - probably extra encryption), and also Avatar played only with sound and 300 plays as audio media with no audio (both windows + linux for 300) - but I havent looked into it and not sure where the problem lies.

skin.aeon.nox/ - thats AN4 right? That had the 'play disc' option in the bottom bar of the home screen, so its probably in a different file - try searching all files in that directory for PlayDVD

With windows 7 x64 + gotham on the same pc does not even detect when a bd in inserted and with OE3.99.1 play disc doesnt work either. I updated the firmware of the bd drive to no avail. On a seperate machine running kubuntu x64, as soon as the disc was mounted by the user 'play disc' worked.

My Add-ons, only available for XBMC:
Steam Launcher|Music Party Mode|Reboot2oOS|Triple J Radio
(This post was last modified: 2014-03-24 12:49 by teeedubb.)
find quote
spontex Offline
Member
Posts: 95
Joined: Jan 2012
Reputation: 0
Post: #68
Hi,
* I have been using libmmbd with the same success. All the Blu-ray movies I have tried work fine. I had some problemes with a series Blu-ray (Bates Motel), with several big titles instead of one main title.
* With AN4 I had to edit the file ~/.xbmc/addons/skin.aeon.nox/1080i/Includes_MainMenu.xml and to replace PlayDVD() with RunScript(/path/to/xbmc-play-disc.py)
* However, since Gotham beta, the "Play disc" option does not appear anymore in the main menu on my setup with Aeon Nox 4. I am still under XBMCbuntu Frodo (manually upgraded to Gotham beta).
* I tried to run manually the script you provided. I don't have the "udevil" command nor the "xbmc-send" command on my setup

Thanks
(This post was last modified: 2014-04-06 16:45 by spontex.)
find quote
spontex Offline
Member
Posts: 95
Joined: Jan 2012
Reputation: 0
Post: #69
I installed udevil using this page and xbmc-send with the package: xbmc-eventclients-xbmc-send.
While trying to get everything work, I noticed that now it works better and better: whenever I insert a Blu-ray, I get a menu "Browse videos, browse files" appearing. I just press "browse videos" and "BDMV" and it's Ok. I am not sure if this is related to Beta 3 or to udevil...
find quote
spontex Offline
Member
Posts: 95
Joined: Jan 2012
Reputation: 0
Post: #70
When I insert a Blu-ray, it gets mounted in: /media/$USER/<LABEL>/BDMV/index.bdmv
I do not know why, perhaps a wrong rule on my setup?

Anyway, to make the script work, I had:
* to replace /media/*/BDMV with /media/*/*/BDMV
* to replace "PlayMedia("$BD_DISC")" with "PlayMedia(\"$BD_DISC\")" (I think it's a fix - now takes care of Blu-ray volumes with space characters)
* to remove the IP address (single-seat setup) :-)

I also found a nicer way to do what we want:
* In the Aeon Nox setup inside XBMC, I added a "Custom" main menu function named "Read disc", calling the custom script RunScript(/path/to/xbmc-play-disc.py).

Now it just works! Thank you so much!

Next step: when XBMC detects a new disc, it could just call this script. How to do that?
In the meantime I will just disable the "Autoplay DVD" feature, which causes this popup to appear for Blu-ray discs.
(This post was last modified: 2014-04-06 17:48 by spontex.)
find quote
spontex Offline
Member
Posts: 95
Joined: Jan 2012
Reputation: 0
Post: #71
Ok, just found the way thanks to this post:
I just had to edit /etc/udev/rules.d/82-cdrom.rules and to update it this way:
Code:
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom cdrw dvd dvdrw" RUN+="/path/to/xbmc-play-disc.sh"

Now:
* When I insert a DVD or a Blu-ray, it autoplays in XBMC
* I added a custom "Read disc" main menu action in Aeon Nox, which will both read DVD and Blu-rays
* The Disc icon in the Aeon Nox sub-menu also works, both for DVD and Blu-rays

Cool ^_^

How to integrate this feature in XBMCBuntu trunk, so that everybody can use it? Is that included in OpenElec?

Thanks again
find quote
Post Reply