Page 1 of 2
Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Sun Jan 01, 2017 8:48 pm
by hmsintrepide
I create a universal (Windows 32 and 64 bit) batch script to symlink BD+ and AACS libraries for some apps.
Download:
https://gist.github.com/hmsintrepide/d8 ... a8f7376166
Report bug:
https://github.com/hmsintrepide/libmmbd ... ler/issues
Version 3
Auto Admin rights (with powershell, win7+)
Version 2
HandBrake 32/64-bit (1.0.1 tested)
Kodi (16.1 and 17.0 tested)
Use mklink instead of copy
Version 1
VLC 32/64 (2.2.4 tested)
Re: Simple batch for bluray playback with VLC for Windows
Posted: Wed Jan 04, 2017 10:09 pm
by ndjamena
Since you need administrator privileges anyway, you might as well just put symbolic links to the libraries in the VLC directory.
That way you don't have to copy the libraries every time MakeMKV updates to make sure you have the latest versions and you don't need three copies of each dll on your system.
MKLINK %vlc64%"\libaacs.dll" %libmmbd64%
It works for Handbrake and Kodi too.
Re: Simple batch for bluray playback with VLC for Windows
Posted: Sun Jan 08, 2017 1:42 pm
by hmsintrepide
ndjamena wrote:Since you need administrator privileges anyway, you might as well just put symbolic links to the libraries in the VLC directory.
That way you don't have to copy the libraries every time MakeMKV updates to make sure you have the latest versions and you don't need three copies of each dll on your system.
MKLINK %vlc64%"\libaacs.dll" %libmmbd64%
It works for Handbrake and Kodi too.
Thanks,
I make version 2 with mklink and add handbrake/kodi apps.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Sun Jan 08, 2017 2:22 pm
by ndjamena
Just a nitpick, but it's generally called "Administrator Rights" (plural). It looks kind of odd the way you've written it.
If anyone is interested this a batch that will call administrator rights automatically.
http://forum.videohelp.com/threads/3759 ... ost2471615
It's set to put a vbs script in the %temp% folder.
Essentially just put the batch in a path folder and call it like:
CALL BatchName.bat "%~f0" %*
From within any other batch and it should just work.
MKLink can't be called from vbs scripts.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Mon Jan 09, 2017 11:43 am
by hmsintrepide
ndjamena wrote:Just a nitpick, but it's generally called "Administrator Rights" (plural). It looks kind of odd the way you've written it.
If anyone is interested this a batch that will call administrator rights automatically.
http://forum.videohelp.com/threads/3759 ... ost2471615
It's set to put a vbs script in the %temp% folder.
Essentially just put the batch in a path folder and call it like:
CALL BatchName.bat "%~f0" %*
From within any other batch and it should just work.
MKLink can't be called from vbs scripts.
I use powershell for privilege elevation. This is the smallest method, I think.
Code: Select all
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
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Mon Jan 09, 2017 1:05 pm
by ndjamena
Should I report bugs here or there?
Your elevation code doesn't work if the batch has a path with a space in it.
If there's a way to call cmd from powershell from cmd and pass arguments with spaces I haven't found it yet.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Tue Jun 06, 2017 3:21 pm
by GHender3
Just wanted to let everyone know that while this method works fine for VLC 2.2.4 (Windows, 64-bit), it's not working with VLC 2.2.6, Windows 64-bit. Libmmbd64.dll renamed libaacs.dll or sitting in the VLC folder as a symbolic link named libaacs.dll leads to VLC saying it can't find a usable libaacs.dll for decryption. I haven't tried a BD-Plus title to check on that.
Downgrading from VLC 2.2.6 to VLC 2.2.4 immediately brought back direct BluRay playback. Handbrake is currently unaffected.
I am also using MakeMKV and VLC 2.2.4 (both 64-bit) under Mac OS X. I haven't yet tried to see what updating VLC to 2.2.5.1 does in that environment. I fear it isn't good. Hope this helps someone.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Thu Aug 03, 2017 5:46 pm
by meesterexx
GHender3 wrote:Just wanted to let everyone know that while this method works fine for VLC 2.2.4 (Windows, 64-bit), it's not working with VLC 2.2.6, Windows 64-bit. Libmmbd64.dll renamed libaacs.dll or sitting in the VLC folder as a symbolic link named libaacs.dll leads to VLC saying it can't find a usable libaacs.dll for decryption. I haven't tried a BD-Plus title to check on that.
Downgrading from VLC 2.2.6 to VLC 2.2.4 immediately brought back direct BluRay playback. Handbrake is currently unaffected.
I am also using MakeMKV and VLC 2.2.4 (both 64-bit) under Mac OS X. I haven't yet tried to see what updating VLC to 2.2.5.1 does in that environment. I fear it isn't good. Hope this helps someone.
Thank you, this did help.
Can confirm, 2.2.5.1 does not work. Had to drop back to 2.2.4.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Thu Aug 03, 2017 7:57 pm
by GHender3
meesterexx wrote:GHender3 wrote:Just wanted to let everyone know that while this method works fine for VLC 2.2.4 (Windows, 64-bit), it's not working with VLC 2.2.6, Windows 64-bit. Libmmbd64.dll renamed libaacs.dll or sitting in the VLC folder as a symbolic link named libaacs.dll leads to VLC saying it can't find a usable libaacs.dll for decryption. I haven't tried a BD-Plus title to check on that.
Downgrading from VLC 2.2.6 to VLC 2.2.4 immediately brought back direct BluRay playback. Handbrake is currently unaffected.
I am also using MakeMKV and VLC 2.2.4 (both 64-bit) under Mac OS X. I haven't yet tried to see what updating VLC to 2.2.5.1 does in that environment. I fear it isn't good. Hope this helps someone.
Thank you, this did help.
Can confirm, 2.2.5.1 does not work. Had to drop back to 2.2.4.
For what it's worth, VLC 2.2.5.1 works just as well as 2.2.4 using Makemkv under Mac OS X. An official release of 2.2.6 isn't yet available for Mac. So I didn't have to revert there. I have no explanation for Handbrake working fine but not VLC, or why this is only happening in Windows. Glad to see that I was able to help someone.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Sun Sep 10, 2017 5:17 pm
by CryptMan
Hi,
looks like Kodi 18 has also problems with this. In Kodi 17 it was working but in Kodi 18 it crashes if the files are in the Kodi folder and a BD is in the drive.
Code: Select all
Thread 1248 (process 12108)
# 0 strlen
# 1 aacs_open_device
# 2 bd_stop_bdj
# 3 bd_stop_bdj
# 4 bd_stop_bdj
# 5 bd_stop_bdj
# 6 bd_stop_bdj
# 7 bd_stop_bdj
# 8 process_jpeg
# 9 process_jpeg
#10
#11
#12 process_jpeg
#13
#14
#15
#16 set_app_type
#17 BaseThreadInitThunk
#18 RtlGetAppContainerNamedObjectPath
#19 RtlGetAppContainerNamedObjectPath
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Fri Dec 08, 2017 7:40 am
by joniw
Hello,
this problem is discussed over
here.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Sat Dec 09, 2017 10:04 am
by joniw
Hello,
it looks like this is a problem in libmmbd. At some point it does a string length check where a NULL value is allowed in libaacs. This leads to the exception shown
here.
This problem affects VLC because it also uses libbluray.
Do we have chance that this is addressed in libmmbd?
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Mon Dec 18, 2017 9:49 am
by CryptMan
Thank you joniw to pointing this out. It's great to see that I'm not alone with this problem.
I hope that Mike reads here and can find a solution for this.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Thu Dec 21, 2017 7:28 am
by CryptMan
joniw wrote:Hello,
it looks like this is a problem in libmmbd.
Are sure that the problem is really in that lib an not in the underlying makemkv?
I ask because mike said here
http://makemkv.com/forum2/viewtopic.php?f=10&t=7008 that this part of MakeMKV is OpenSource.
And that would mean that anybody could fix it.
Just an idea.
Re: Bluray playback script for VLC/HandBrake/Kodi on Windows
Posted: Thu Dec 21, 2017 3:51 pm
by joniw
CryptMan wrote:And that would mean that anybody could fix it.
That is right, i can insert a fix there. My problem is i am using windows and i do not have a proper build chain for windows. For me it seems to be an easy fix but i do not how many changes in makemkv are needed to support this.