Solution for libbluray+java BD-J bluray menus troubleshooting on win10
Posted: 07 Aug 2022 20:55
Disclaimer. English is not my native language, so pardon me for possible grammatic mistakes
Part 1.
I got stuck with being unable to use bluray menus in vlc on fresh windows 10.
Here i will describe steps i took to debug and fix libbluray and java compatibility issues.
By reading this thread you will learn:
- how to get debug messages from libbluray
- how to spot compatibility issues
- how to spot and fix dependency issues for dll's
I hope that you will find this guide useful for fixing your problems with vlc.
=============
Currently i found out that combination of:
- vlc 3.0.16 Vetinari (jenkins@acd0bd199cbd Jun 18 2021 16:21:52)
- java jre-8u321-win64
works fine for playing bluray with menus.
You can install this combination and look at part1 and stuff described in part 3.3 of this guide for fixing missing dependencies, in case you've got a fresh install of windows
=============
0. Basic knowledge
libbluray - part of vlc(library) used to play bluray disks, If you have issues with bluray playback, chances are libbluray is at play here.
java\jvm - java is a programming language which requires jvm (java virtual machine) to run programs written on it. In context of this post it is used to display menus of bluray disks (other thing don't concern topic of this post)
jre - package which contains java+jvm and can be installed on your machine
BD-J - standart which describes how to use java for menus on bluray disks
1. Symptoms of the problem
1.1. First error
When opening bluray disc Media->Open Disk->Blu-ray with unchecked button "No disc menus" i've got popup message
1.2. Looking at logs
Open debug messages window Tools->Messages and set "Verbosity=2 (debug)" at the bottom of the Messages window.
Then try to open bluray disck as described above. Error message described above will appear.
Now look at the messages window, here you would find error from libbluray looking like this
2. Debugging libbluray
At this point i found out that the problem lies within libbluray, so the next step will be to get logs directly from libbluray.
Here i did some source code digging to found all the info i need. (i just downloaded sources to my pc, opened them with vscode and started searching for things)
You can get sources from main page https://www.videolan.org/developers/libbluray.html
or look at the git directly https://code.videolan.org/videolan/libbluray
So to get logs i launch vlc from command promt with environment variables, here is how to do it:
2.1. open CMD (just search "cmd" in windows, no admin rights required)
2.2. in cmd navigate to vlc directory, i used following command:
*depends on your install path
2.3. set environment variables by typing:
This code will set variables for this cmd window only. It means that you should launch vlc from this command promt (as described in p.2.4) otherwise vlc will ignore environment variables.
BD_DEBUG_FILE points to file where libbluray will write logs. I created directory "C:\temp" beforehand, also make sure that diractory doesn't require admin rights to create\write to files.
BD_DEBUG_MASK sets the mask for filtering debug messages. You can find supported values here https://code.videolan.org/videolan/libb ... trol.h#L31
I've decided to don't think about it that much and used value 4294967295 = 2^32-1 so that mask consists of all 1 in binary form and it will pass every message (it uses uint32 type). (i may be a bit wrong here, but it worked in my case)
2.4. launch vlc from cmd with command
-vvv sets the verbose=2 automaticaly
2.5. Repeat steps for launching bluray disk
2.6. open text file with debug log.
Here i used notepad++ program for opening file with logs, because it explicitly shows if file was changed and if i want to reload it.
Text file should be automatically created in the path from BD_DEBUG_FILE variable.
For some reason file size can be displayed as 0KB while vlc is running, but there still will be logs inside. Don't let zero file size discourage you from opening log file!
Great now you got logs from libbluray and can get some insights into what is going on.
!!!From this point on all logs that you see are from file specified in BD_DEBUG_FILE variable. (don't confuse it with stuff you can see in Messages window in vlc ui)
*some of the following logs are split between several messages, please treat them as single continious log. (there is hard limit on number of characters in a single message, so it has to be done)
Part 1.
I got stuck with being unable to use bluray menus in vlc on fresh windows 10.
Here i will describe steps i took to debug and fix libbluray and java compatibility issues.
By reading this thread you will learn:
- how to get debug messages from libbluray
- how to spot compatibility issues
- how to spot and fix dependency issues for dll's
I hope that you will find this guide useful for fixing your problems with vlc.
=============
Currently i found out that combination of:
- vlc 3.0.16 Vetinari (jenkins@acd0bd199cbd Jun 18 2021 16:21:52)
- java jre-8u321-win64
works fine for playing bluray with menus.
You can install this combination and look at part1 and stuff described in part 3.3 of this guide for fixing missing dependencies, in case you've got a fresh install of windows
=============
0. Basic knowledge
libbluray - part of vlc(library) used to play bluray disks, If you have issues with bluray playback, chances are libbluray is at play here.
java\jvm - java is a programming language which requires jvm (java virtual machine) to run programs written on it. In context of this post it is used to display menus of bluray disks (other thing don't concern topic of this post)
jre - package which contains java+jvm and can be installed on your machine
BD-J - standart which describes how to use java for menus on bluray disks
1. Symptoms of the problem
1.1. First error
When opening bluray disc Media->Open Disk->Blu-ray with unchecked button "No disc menus" i've got popup message
Code: Select all
Java required:
This Blu-ray disc requires Java for menus support.Java was not found on your system.
The disc will be played without menus.
Open debug messages window Tools->Messages and set "Verbosity=2 (debug)" at the bottom of the Messages window.
Then try to open bluray disck as described above. Error message described above will appear.
Now look at the messages window, here you would find error from libbluray looking like this
Code: Select all
libbluray error: BD-J menus not supported. Playing without menus. BD-J support: 1, JVM found: 0, JVM usable: 0
2. Debugging libbluray
At this point i found out that the problem lies within libbluray, so the next step will be to get logs directly from libbluray.
Here i did some source code digging to found all the info i need. (i just downloaded sources to my pc, opened them with vscode and started searching for things)
You can get sources from main page https://www.videolan.org/developers/libbluray.html
or look at the git directly https://code.videolan.org/videolan/libbluray
So to get logs i launch vlc from command promt with environment variables, here is how to do it:
2.1. open CMD (just search "cmd" in windows, no admin rights required)
2.2. in cmd navigate to vlc directory, i used following command:
Code: Select all
cd "C:\Program Files\VideoLAN\VLC"
2.3. set environment variables by typing:
Code: Select all
set BD_DEBUG_MASK=4294967295
set BD_DEBUG_FILE=c:\temp\debuglog_libbluray.txt
BD_DEBUG_FILE points to file where libbluray will write logs. I created directory "C:\temp" beforehand, also make sure that diractory doesn't require admin rights to create\write to files.
BD_DEBUG_MASK sets the mask for filtering debug messages. You can find supported values here https://code.videolan.org/videolan/libb ... trol.h#L31
I've decided to don't think about it that much and used value 4294967295 = 2^32-1 so that mask consists of all 1 in binary form and it will pass every message (it uses uint32 type). (i may be a bit wrong here, but it worked in my case)
2.4. launch vlc from cmd with command
Code: Select all
vlc.exe -vvv
2.5. Repeat steps for launching bluray disk
2.6. open text file with debug log.
Here i used notepad++ program for opening file with logs, because it explicitly shows if file was changed and if i want to reload it.
Text file should be automatically created in the path from BD_DEBUG_FILE variable.
For some reason file size can be displayed as 0KB while vlc is running, but there still will be logs inside. Don't let zero file size discourage you from opening log file!
Great now you got logs from libbluray and can get some insights into what is going on.
!!!From this point on all logs that you see are from file specified in BD_DEBUG_FILE variable. (don't confuse it with stuff you can see in Messages window in vlc ui)
*some of the following logs are split between several messages, please treat them as single continious log. (there is hard limit on number of characters in a single message, so it has to be done)