Kodi Community Forum
Release Full bluray and 4k uhd bluray menu support for Android - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164)
+---- Thread: Release Full bluray and 4k uhd bluray menu support for Android (/showthread.php?tid=360250)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


Full bluray and 4k uhd bluray menu support for Android - fandangos - 2021-02-01

Kodi Omega build with Bluray and 4K UHD Bluray menu playback
This build requires the use of Java to display BDJ menus, so you will need to install the Java Runtime Enviroment for Android addon and leave it on. 

 
FEATURES
 
  • Add support for BD-J menus on Blurays and 4K Blurays using Android devices.
  • Installs the keyboard profile to allow for remotes with fewer keys to control the discs.
  • Install the decoder profile to allow for background videos to be played during menus.
  • Different package name, can be installed without overwriting Kodi main installation or your settings.
 
Q&A

 
Q: The shield has only a few buttons how do you control the menu and the kodi OSD?
A: Use the provided keyboard.xml from the addon or from bellow to allow for better control of the disks.


Q: How do I open the popup menu?
A: Use the provided keyboard.xml and hold the main (enter) button.

Q: This way of controlling is terrible, I don't like it.
A: You can try changing the inputs assigned or you can try using a bluetooth remote control, or a usb one with a receiver. 

Q: Will this be merged into main Kodi?
A: No.

Q: my disk X doesn't work
A: yes, this isn't perfect.

Q: Does Dolby Vision works when playing full discs?
A: No.
At least not possible with m2ts files with 2 video streams (i.e. FEL Dolby Vision discs) as it requires 2 HEVC decoders.
 
Keyboard mappings for remotes with few buttons
 
Code:
<keymap>
  <FullscreenVideo>
    <keyboard>
      <return mod="longpress">PlayerControl(ShowVideoMenu)</return>
    </keyboard>
  </FullscreenVideo>
  <VideoMenu>
    <keyboard>
      <return mod="longpress">PlayerControl(ShowVideoMenu)</return>
      <play_pause mod="longpress">OSD</play_pause>
      <backspace mod="longpress">Stop</backspace>
      <browser_back mod="longpress">Stop</browser_back>
    </keyboard>
  </VideoMenu>
</keymap>

Use the above as keyboard.xml on your user profile keymaps folder.
Using the Nvidia Shield as an example:
 
  • Holding the main button brings the disc pop up menu and holding while the menu is up will remove the disc menu.
  • Holding play/pause button brings the Kodi OSD menu.
  • Holding back will stop playing the disc.
Know problems
 
1. The menu, on 4k discs with HDR/Dolby Vision (when HDR is enabled in the display), is rendered in SDR and the colors will look dessaturated. 
I tried to solve this but I have no idea how to. 
If you want to see colors as they should, disable mediacodec surface and media codec hardware acceleration but on 4k discs the menu will run really slow.
We need hardware acceleration for the menus in 4k.

Download links:
ARM (32bits):
https://github.com/fandangos/Kodi-HDR-Edition/releases/download/1.22/kodiapp-armeabi-v7a-release-v1.22.apk

ARM64/Aarch64 (64 bits)
https://github.com/fandangos/Kodi-HDR-Edition/releases/download/1.22/kodiapp-arm64-v8a-release-v1.22.apk


You will need this addon:
ARM (32bits) addon:
https://github.com/fandangos/JRE-Kodi-Android/releases/download/1.2/script.service.jre-arm-v1.2.zip

ARM64/Aarch64 (64bits) addon:
https://github.com/fandangos/JRE-Kodi-Android/releases/download/1.2-aarch64/script.service.jre-aarch64-v1.2.zip


Source code:
https://github.com/fandangos/Kodi-HDR-Edition/tree/Android-Bluray-Menu-2023

This requires changes in libbluray, source here:
https://github.com/Fandangos/libbluray/

No more changes needed.
 
Java runtime enviroment source code is here:
aarch32:
https://github.com/fandangos/openjdk-aarch32-jdk8u
aarch64:
https://github.com/fandangos/openjdk-multiarch-jdk8u

Thanks a lot to Petri Hintukainen (the creator of libbluray), he helped from the start to make this a reality, compiled the java image you are seeing here, helped solve most of the problems.
Thanks to Shaya Potter that helped during the development.
Thanks to the devs over at PojavLauncherTeam (https://github.com/PojavLauncherTeam).



RE: Full bluray and 4k uhd bluray menu support for Android - udobroemme - 2021-02-01

A first try with a few UHDs worked very well, thank you very much!

I had to enable the app access to external storage in the developer settings of the shield to make your jre installation addon work. After doing this, everything works like a charm. The java menus on my shield pro are almost as fast as on my former Ryzen HTPC.


RE: Full bluray and 4k uhd bluray menu support for Android - MrMagic - 2021-02-01

The JRE addon doesn't work for me. The following error is shown in kodi.log:
Code:
2021-02-01 19:33:43.626 T:9773    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'FileNotFoundError'>
                                                   Error Contents: [Errno 2] No such file or directory: '/mnt/expand/d0a15c2d-0009-4bca-a4b9-cafbaae79a1f/user/0/org.xbmc.kodi19DV/cache/apk/assets/j2re-image.zip'
                                                   Traceback (most recent call last):
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi19DV/files/.kodi/addons/script.service.jre/main.py", line 18, in <module>
                                                       zip = ZipFile(loc)
                                                     File "/mnt/expand/d0a15c2d-0009-4bca-a4b9-cafbaae79a1f/user/0/org.xbmc.kodi19DV/cache/apk/assets/python3.8/lib/python3.8/zipfile.py", line 1251, in __init__
                                                       self.fp = io.open(file, filemode)
                                                   FileNotFoundError: [Errno 2] No such file or directory: '/mnt/expand/d0a15c2d-0009-4bca-a4b9-cafbaae79a1f/user/0/org.xbmc.kodi19DV/cache/apk/assets/j2re-image.zip'
                                                   -->End of Python script error report<--

@udobroemme Do you mean the option "Force allow apps on external" in Developer options? Because that did not work for me.


RE: Full bluray and 4k uhd bluray menu support for Android - fandangos - 2021-02-01

(2021-02-01, 20:39)MrMagic Wrote: The JRE addon doesn't work for me. The following error is shown in kodi.log:
Code:
2021-02-01 19:33:43.626 T:9773    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'FileNotFoundError'>
                                                   Error Contents: [Errno 2] No such file or directory: '/mnt/expand/d0a15c2d-0009-4bca-a4b9-cafbaae79a1f/user/0/org.xbmc.kodi19DV/cache/apk/assets/j2re-image.zip'
                                                   Traceback (most recent call last):
                                                     File "/storage/emulated/0/Android/data/org.xbmc.kodi19DV/files/.kodi/addons/script.service.jre/main.py", line 18, in <module>
                                                       zip = ZipFile(loc)
                                                     File "/mnt/expand/d0a15c2d-0009-4bca-a4b9-cafbaae79a1f/user/0/org.xbmc.kodi19DV/cache/apk/assets/python3.8/lib/python3.8/zipfile.py", line 1251, in __init__
                                                       self.fp = io.open(file, filemode)
                                                   FileNotFoundError: [Errno 2] No such file or directory: '/mnt/expand/d0a15c2d-0009-4bca-a4b9-cafbaae79a1f/user/0/org.xbmc.kodi19DV/cache/apk/assets/j2re-image.zip'
                                                   -->End of Python script error report<--

@udobroemme Do you mean the option "Force allow apps on external" in Developer options? Because that did not work for me.

Just fixed. 

I had no idea when Kodi is installing a addon from a zip file, and this addon has a zip file inside, that it would try to extract the file. 

Please, redownload the addon zip and try it. 
Before trying again, uninstall the addon, if it shows up on your addon folder, close kodi and open again and try to install. 

Also check the main.py matches the one in github to be sure you got the updated version. 
The j2re-image file must be inside resources/lib/


RE: Full bluray and 4k uhd bluray menu support for Android - udobroemme - 2021-02-01

Oops, sorry for the misleading comment. I thought,  the developer setting was responsible. I also checked out the addon repo and and copied the files manually when I tried to fix the issue and came to the wrong conclusion.


RE: Full bluray and 4k uhd bluray menu support for Android - fandangos - 2021-02-01

(2021-02-01, 21:04)udobroemme Wrote: Oops, sorry for the misleading comment. I thought,  the developer setting was responsible. I also checked out the addon repo and and copied the files manually when I tried to fix the issue and came to the wrong conclusion.

No problem. 

Yes, the shield has a smb share of it's files that is very helpful.


RE: Full bluray and 4k uhd bluray menu support for Android - spotter - 2021-02-01

I'm really impressed by all the work you put into getting this done, especially as someone whose background isn't in CS.  Sadly, I don't have a 64 bit android device so can't use it right now Smile


RE: Full bluray and 4k uhd bluray menu support for Android - MrMagic - 2021-02-01

@fandangos Thanks, the updated JRE addon works as it should.

Still trying to get to grips with the button navigation though Smile

Thanks for all your hard work!


RE: Full bluray and 4k uhd bluray menu support for Android - nino33 - 2021-02-11

me or a 32-bit system (sony bravia android) i have installed ire java support but i can't find any difference. can i use anything for my sony?


RE: Full bluray and 4k uhd bluray menu support for Android - fandangos - 2021-02-12

This only works with 64 bits android system like the Nvidia Shield.


RE: Full bluray and 4k uhd bluray menu support for Android - spotter - 2021-02-16

(2021-02-12, 02:05)fandangos Wrote: This only works with 64 bits android system like the Nvidia Shield.

are there many (any?) other 64 bit android tv oriented systems besides the shield (and not even all shields, the tube is 32 bit).


RE: Full bluray and 4k uhd bluray menu support for Android - fandangos - 2021-02-17

(2021-02-16, 15:27)spotter Wrote:
(2021-02-12, 02:05)fandangos Wrote: This only works with 64 bits android system like the Nvidia Shield.

are there many (any?) other 64 bit android tv oriented systems besides the shield (and not even all shields, the tube is 32 bit).

Not sure to be honest.
I guess the new amlogic boxes are 64bits.

The shield pro is what I used to work on this that's why there's only a 64bit version.
I don't have much time to work on a 32bits version right now.

Said that, all the code is available.
All that is needed is someone to compile the JRE as 32bits, download the modified libbluray and compile Kodi with those.

And replace the j2re-image.zip from the addon when installing.


RE: Full bluray and 4k uhd bluray menu support for Android - dyamant - 2021-02-22

Ist this fix implemented in the Final Kodi Matrix 19? Thnx


RE: Full bluray and 4k uhd bluray menu support for Android - MrMagic - 2021-02-22

(2021-02-22, 11:08)dyamant Wrote: Ist this fix implemented in the Final Kodi Matrix 19? Thnx
Not in the official release of Kodi 19 Matrix, but @fandangos has created new builds based on Kodi 19 Final with Dolby Vision for MKVs + full blu-ray menu support here:

https://forum.kodi.tv/showthread.php?tid=360018&pid=3015403#pid3015403


RE: Full bluray and 4k uhd bluray menu support for Android - dyamant - 2021-02-22

(2021-02-22, 16:02)MrMagic Wrote:
(2021-02-22, 11:08)dyamant Wrote: Ist this fix implemented in the Final Kodi Matrix 19? Thnx
Not in the official release of Kodi 19 Matrix, but @fandangos has created new builds based on Kodi 19 Final with Dolby Vision for MKVs + full blu-ray menu support here:

https://forum.kodi.tv/showthread.php?tid=360018&pid=3015403#pid3015403

Thnx a lot...