Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MakeMKV (libmmbd) for VLC, HandBrake and Kodi - Windows 32/64 bit - bluray playback
@echo off
title MakeMKV libmmbd installer
net session >nul 2>&1
if not %ERRORLEVEL% == 0 (
if exist %SystemRoot%"\System32\WindowsPowerShell\v1.0\powershell.exe" (
powershell Start-Process cmd -ArgumentList '/k "\"%0\""' -Verb runAs
) else (
echo Start this script with Administrator rights!
pause
)
exit
)
set makemkv="%ProgramFiles%\MakeMKV\makemkv.exe"
set makemkv32="%ProgramFiles(x86)%\MakeMKV\makemkv.exe"
set libmmbd="%ProgramFiles%\MakeMKV\libmmbd.dll"
set libmmbd32="%ProgramFiles(x86)%\MakeMKV\libmmbd.dll"
set libmmbd64="%ProgramFiles(x86)%\MakeMKV\libmmbd64.dll"
set vlc="%ProgramFiles%\VideoLAN\VLC"
set vlc32="%ProgramFiles(x86)%\VideoLAN\VLC"
set handbrake="%ProgramFiles%\HandBrake"
set handbrake32="%ProgramFiles(x86)%\HandBrake"
set kodi="%ProgramFiles%\Kodi"
set kodi32="%ProgramFiles(x86)%\Kodi"
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
echo 64-bit Windows System
if not exist %makemkv32% (
echo Install MakeMKV first!
pause
start http://www.makemkv.com/download/
exit
)
if exist %vlc%"\vlc.exe" (
echo 64-bit VLC
del %vlc%"\libaacs.dll"
del %vlc%"\libbdplus.dll"
mklink %vlc%"\libaacs.dll" %libmmbd64%
mklink %vlc%"\libbdplus.dll" %libmmbd64%
)
if exist %vlc32%"\vlc.exe" (
echo 32-bit VLC
del %vlc32%"\libaacs.dll"
del %vlc32%"\libbdplus.dll"
mklink %vlc32%"\libaacs.dll" %libmmbd32%
mklink %vlc32%"\libbdplus.dll" %libmmbd32%
)
if exist %handbrake%"\HandBrake.exe" (
echo 64-bit HandBrake
del %handbrake%"\libaacs.dll"
del %handbrake%"\libbdplus.dll"
mklink %handbrake%"\libaacs.dll" %libmmbd64%
mklink %handbrake%"\libbdplus.dll" %libmmbd64%
)
if exist %handbrake32%"\HandBrake.exe" (
echo 32-bit HandBrake
del %handbrake32%"\libaacs.dll"
del %handbrake32%"\libbdplus.dll"
mklink %handbrake32%"\libaacs.dll" %libmmbd32%
mklink %handbrake32%"\libbdplus.dll" %libmmbd32%
)
if exist %kodi32%"\kodi.exe" (
if exist %kodi32%"\libbluray.dll" (
echo Kodi 17
del %kodi32%"\libaacs.dll"
del %kodi32%"\libbdplus.dll"
mklink %kodi32%"\libaacs.dll" %libmmbd32%
mklink %kodi32%"\libbdplus.dll" %libmmbd32%
) else (
echo Kodi 16
del %kodi32%"\system\players\dvdplayer\libaacs.dll"
del %kodi32%"\system\players\dvdplayer\libbdplus.dll"
mklink %kodi32%"\system\players\dvdplayer\libaacs.dll" %libmmbd32%
mklink %kodi32%"\system\players\dvdplayer\libbdplus.dll" %libmmbd32%
)
)
) else (
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
echo 32-bit Windows system
if not exist %makemkv% (
echo Install MakeMKV first!
pause
start http://www.makemkv.com/download/
exit
)
if exist %vlc%"\vlc.exe" (
echo 32-bit VLC
del %vlc%"\libaacs.dll"
del %vlc%"\libbdplus.dll"
mklink %vlc%"\libaacs.dll" %libmmbd%
mklink %vlc%"\libbdplus.dll" %libmmbd%
)
if exist %handbrake%"\HandBrake.exe" (
echo 32-bit HandBrake
del %handbrake%"\libaacs.dll"
del %handbrake%"\libbdplus.dll"
mklink %handbrake%"\libaacs.dll" %libmmbd%
mklink %handbrake%"\libbdplus.dll" %libmmbd%
)
if exist %kodi%"\kodi.exe" (
if exist %kodi%"\libbluray.dll" (
echo Kodi 17
del %kodi%"\libaacs.dll"
del %kodi%"\libbdplus.dll"
mklink %kodi%"\libaacs.dll" %libmmbd%
mklink %kodi%"\libbdplus.dll" %libmmbd%
) else (
echo Kodi 16
del %kodi%"\system\players\dvdplayer\libaacs.dll"
del %kodi%"\system\players\dvdplayer\libbdplus.dll"
mklink %kodi%"\system\players\dvdplayer\libaacs.dll" %libmmbd%
mklink %kodi%"\system\players\dvdplayer\libbdplus.dll" %libmmbd%
)
)
)
)
echo MakeMKV BD+ and AACS libraries are installed!
pause
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment