Finally, I got this working on a Raspberry Pi 4B, i.e. I can play Blurays with Kodi + makemkv, flawlessly so far. 3D Blurays (h.264/MVC) also work. And I have no makemkvcon processes hanging so far. I hope that it stays that way and that I did not miss anything in my excitement.
My procedure:
1. Installed libfdk (needed for building ffmpeg). As it does not seem to be available in the curated Raspbian repository, I downloaded and installed the pre-built .deb packages for armhf from
http://ftp.de.debian.org/debian/pool/no ... f/fdk-aac/
2. Downloaded the source of the latest ffmpeg release and build it:
Code: Select all
./configure --prefix=/tmp/ffmpeg --enable-static --disable-shared --enable-pic --enable-libfdk-aac
make install # takes more than an hour
3. Installed the prerequisites for building makemkv-oss:
Code: Select all
sudo apt update && sudo apt-get install build-essential pkg-config libc6-dev libssl-dev libexpat1-dev libavcodec-dev libgl1-mesa-dev qtbase5-dev zlib1g-dev
4. Downloaded the makemkv-oss source, unpacked it and patched it with the patch file from this forum.
Code: Select all
wget https://www.makemkv.com/download/makemkv-oss-1.16.1.tar.gz
tar -xvf makemkv-oss-1.16.1
cd makemkv-oss-1.16.1
wget https://forum.makemkv.com/forum/download/file.php?id=1356 -O kodi_mmbd-v3_patch.txt
patch -p1 < kodi_mmbd-v3_patch.txt
5. Then I had to patch the patch as there were duplicate methods
bdplus_set_fopen in the files
bdplus.cpp and
bdplus.h. To resolve this, I commented out the old version of the method and left only the new one with the
*bd_disc_structure_pointer in the signature.
6. Then I could build makemkv-oss:
Code: Select all
PKG_CONFIG_PATH=/tmp/ffmpeg/lib/pkgconfig ./configure
make --always-make
sudo make install
7. Downloading, building and installing makemkv-bin was the straight-forward:
Code: Select all
get https://www.makemkv.com/download/makemkv-bin-1.16.1.tar.gz
tar -xvf makemkv-bin-1.16.1.tar.gz
cd makemkv-bin-1.16.1
make
sudo make install
8. Then I had to link the libmmbd libray built with makemkv to the libaacs and libbdplus libraries:
Code: Select all
cd /usr/lib
sudo unlink libaacs.so.0
sudo unlink libbdplus.so.0
sudo ln -s /usr/lib/libmmbd.so.0 ./libaacs.so.0
sudo ln -s /usr/lib/libmmbd.so.0 ./libbdplus.so.0
9. At this point, I was not really able to play Blurays in Kodi. However, it was better than in my previous attempts when Kodi crashed and restarted. Now Kodi started reading the Bluray at least and presented a menu for Bluray playback options. But when choosing "Play main movie" nothing happened. Next, I enabled Java menus:
Code: Select all
sudo apt update && sudo apt install default-jdk
# retrieve installation path
JAVA_BIN_ABSPATH=$( sudo update-alternatives --config java | grep -oP '/usr/lib\S+' )
sudo cp /etc/profile /etc/profile.orig
sudo cp /etc/environment /etc/environment.orig
cat << EOF | sudo tee -a /etc/environment
JAVA_HOME=${JAVA_BIN_ABSPATH%%/bin/java}
EOF
sudo sed -i 's/PATH="\([^"]\+\)"/PATH="\1:\$JAVA_HOME\/bin"/g' /etc/profile
sudo apt-get install libbluray-bdj libbluray-bin
10. Last but not least I created a
~/.MakeMKV/settings.conf file for the user running Kodi. It contains some basic settings and the license key, e.g.
Code: Select all
app_DefaultSelectionString = "-sel:all,+sel:(favlang|nolang),+sel:mvcvideo,=100:all,-10:favlang"
app_DestinationDir = "/media/Videos"
app_DestinationType = "3"
app_ExpertMode = "1"
app_Java = ""
app_Key = "9834nfdkj4023fe~fk3rjkfwe"
app_PreferredLanguage = "ger"
app_Proxy = ""
app_ccextractor = ""
sdf_Stop = ""
speed_HL-DT-ST_BD-RE_BU50N = ""
11. After restarting the system and Kodi I was able to play Bluerays including the disc menu in Kodi. Please note that the Bluray drive must be mounted beforehand, which is different from playing DVDs which do not need to be mounted beforehand.
If anything breaks in the next couple of weeks, I will report it here. But for now it works. Enjoy!