Skip to content

Instantly share code, notes, and snippets.

@mrintrepide
Last active August 14, 2023 16:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrintrepide/db2325553d1ee3cced95403904968110 to your computer and use it in GitHub Desktop.
Save mrintrepide/db2325553d1ee3cced95403904968110 to your computer and use it in GitHub Desktop.
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

No longer useful

In MakeMKV, in "View", "Preferences" and Integration you can enable builtin system dll integration.
If apps are not listed, just enable System32 (and SysWOW64 for 32bit app on 64bit system) it work.

@Prodeguerriero
Copy link

Hi!

Just wanted to let you know that the operation of copying (or linking to) the libmmbd64.dll file inside the Handbrake folder does not seem to work anymore.

This is my first time trying to set it up, so I might be missing something. I thought I would flag it.

Cheers

@mrintrepide
Copy link
Author

mrintrepide commented Nov 21, 2022

@Prodeguerriero

It's a very old script, 6 or 7 years. Since, I no more use Windows for personal use.
It use mklink windows command for add link instead of copy dll to some libbdplus/aacs compatible app. With this, like symlink in *nix system, you can update makemkv without copy new dll to any app folder.

EDIT @Prodeguerriero
In MakeMKV, in "View", "Preferences" and Integration you can enable builtin system dll integration. Handbrake not listed but just enable System32 (and SysWOW64 for 32bit app on 64bit system) it work, I tested.

@Prodeguerriero
Copy link

Nice, I will give it a go then :)

@PatreonOfficial
Copy link

Just coping it works for me, but you might need libacss.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment