NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.17k stars 13.44k forks source link

BD+ decoding library does not work #75646

Open jluttine opened 4 years ago

jluttine commented 4 years ago

Describe the bug

Commercial movie blu-ray disc doesn't play on VLC. I have previously watched it successfully (maybe not under NixOS though) and I haven't used other commercial blu-ray discs after that.

To Reproduce Steps to reproduce the behavior:

  1. Enable bdplus and AACS by adding to configuration.nix:
    nixpkgs.overlays = [
      (
        self: super: {
          libbluray = super.libbluray.override {
            withAACS = true;
            withBDplus = true;
          };
        }
      )
    ];
    environment.systemPackages = with pkgs; [
      vlc
    ];
  2. Run sudo nixos-rebuild boot and reboot.
  3. Put the blu-ray disc to the disc drive and open VLC. The disc is mounted and I can see the disc name on the left panel. Click Discs and double-click on the disc name to play.

An error pop-up appears:

Blu-ray error:
Your system BD+ decoding library does not work. Missing configuration?
Your input can't be opened:
VLC is unable to open the MRL 'bluray:///dev/sr0'. Check the log for details.

Looking at the console, I can see a bit more details:

$ vlc
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[000000000187d5d0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00000000018805b0] main playlist: playlist is empty
aacs.c:170: ignoring empty drl
bdplus_config.c:255: VM configuration not found
bdplus.c:240: bdplus_init() failed! (0x1919350)
dec.c:223: bdplus_init() failed
bdj.c:746: BD-J check: Failed to load JVM library
disc.c:424: error opening file CERTIFICATE/id.bdmv
disc.c:424: error opening file CERTIFICATE/BACKUP/id.bdmv
bdj.c:746: BD-J check: Failed to load JVM library

Expected behavior

I expected the blu-ray movie to play successfully.

Additional context

The disc is at least 5 years old (movie from 1988, disc copyright info says 2009), so it's not a very recent disc. Indeed, I have watched it previously with VLC. I think it has been even NixOS when I've been testing this configuration when I first wrote it maybe 1-2 years back, but I'm not sure.

Metadata

$ nix run nixpkgs.nix-info -c nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.87, NixOS, 20.03.git.ef4ce9e (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.1`
 - nixpkgs: `/etc/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
jluttine commented 4 years ago

One other disc played fine, showing only the following errors in the console:

$ vlc
VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[00000000015bc5d0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00000000015bf5b0] main playlist: playlist is empty
bdj.c:746: BD-J check: Failed to load JVM library
bdj.c:746: BD-J check: Failed to load JVM library

And opening a pop-up window saying that VLC cannot show the menu because of missing Java. But the movie played fine anyway.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
jluttine commented 4 years ago

Still important to me.

rjpcasalino commented 1 year ago

@jluttine ever figure this one out? I have some discs that do the same thing, but curious if you found out two years later? Might want to close this otherwise

asininemonkey commented 9 months ago

Still an issue using the latest 23.11 beta and the following configuration:

{ config, pkgs, ... }:

let
  libbluray = pkgs.libbluray.override {
    withAACS = true;
    withBDplus = true;
    withJava = true;
  };

  vlc = pkgs.vlc.override { inherit libbluray; };
in

{ environment.systemPackages = [ vlc ] }

I get the following similar errors:

bdj.c:795: BD-J check: Failed to load JVM library
bdj.c:795: BD-J check: Failed to load JVM library
[00007face4001190] libbluray demux: First play: 1, Top menu: 0
HDMV Titles: 0, BD-J Titles: 4, Other: 4
[00007face4001190] libbluray demux error: BD-J menus not supported. Playing without menus. BD-J support: 1, JVM found: 0, JVM usable: 0
langfingaz commented 7 months ago

In addition to AACS and BD+ you might need some databases. One can find these on the Internet. Here is an example script: https://github.com/puppylinux-woof-CE/woof-CE/blob/849a9faa7ea8cac74e04d04e4f99f4425652c26b/woof-code/rootfs-skeleton/usr/local/bin/bdplayback_aacs

alisonjenkins commented 2 months ago

In addition to AACS and BD+ you might need some databases. One can find these on the Internet. Here is an example script: https://github.com/puppylinux-woof-CE/woof-CE/blob/849a9faa7ea8cac74e04d04e4f99f4425652c26b/woof-code/rootfs-skeleton/usr/local/bin/bdplayback_aacs

Right so I just figured out what my problem was thanks to looking at the script. It turns out that the capitalization of the keydb matters (makes sense due to case sensitive file names on Linux).

The file has to be called ~/.config/aacs/KEYDB.cfg or else it will not work (I was previously trying with ~/.config/aacs/KEYDB.cfg.