Page 1 of 2

libmmbd integration with mpv

Posted: Wed May 20, 2026 9:34 am
by artim
Hey, has anybody managed to successfully integrate mpv with libmmbd (on Linux)? I've compiled v1.18.3 from source and installed it (and activated it). But trying to get mpv to load it fails. I've enabled debug logs in the MakeMKV GUI and they do show entries when trying to access a UHD BD via mpv, but the content isn't too helpful:

Code: Select all

Debug log started at Sat May 16 18:40:32 2026 , written by MakeMKV v1.18.3 linux(x64-release)
001005:0000 MakeMKV v1.18.3 linux(x64-release) started
001004:0000 Debug logging enabled, log will be saved as file:///home/user/MakeMKV_log.txt
Using 768KB for read cache.
Network access is ENABLED, CURL version 8.20.0/OpenSSL/3.6.2/1.69.0 (x86_64-pc-linux-gnu) , proxy server not set.
001003:0020 DEBUG: Code 0 at `BLLaJX7%0; ?J)zOB:`KC:29393631
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
001011:0000 Using LibreDrive mode (v06.3 id=866A98CB9C4E)
003007:0000 Using direct disc access mode
DEBUG: Code 2147483648 at S{\1-j6N>Jamw4_#:121265499
DISCID=EF417B6B88914B8EE91D49A4249D0E52B7007FC6
005011:0000 Operation successfully completed
001003:0020 DEBUG: Code 0 at s=7}dcV.P\=%4H*o:213141852
001003:0020 DEBUG: Code 0 at s=7}dcV.P\=%4H*o:213141852
Application exited at Sat May 16 18:40:42 2026 
So accessing the drive isn't an issue, and MakeMKV can also access it and copy the content without any issues whatsoever. Also, VLC doesn't seem to have any issues with the integration.

This is how I try to integrate mpv with libmmbd (as there is no option to add entries in the integration settings of MakeMKV) and what mpv logs say:

Code: Select all

LIBAACS_PATH=/usr/lib/libmmbd LIBBDPLUS_PATH=/usr/lib/libmmbd mpv --bluray-device=/dev/sr0 bd://
[bd] List of available titles:
[bd] idx:   0 duration: 00:00:25 angles:  1 (playlist: 00000.mpls)
[bd] idx:   1 duration: 00:00:14 angles:  1 (playlist: 00004.mpls)
[bd] idx:   2 duration: 01:28:10 angles:  1 (playlist: 00002.mpls)
[bd] idx:   3 duration: 00:00:06 angles:  1 (playlist: 00001.mpls)
aacs.c:255: Unable decrypt unit (AACS)!
bluray.c:786: Skipping broken unit at 0
aacs.c:255: Unable decrypt unit (AACS)!
bluray.c:786: Skipping broken unit at 6144
Failed to recognize file format.
Exiting... (Errors when loading file)
And for reference, this is a MakeMKV log of a successful copying of a track from that same UHD BD:

Code: Select all

Debug log started at Mon May 18 14:56:56 2026 , written by MakeMKV v1.18.3 linux(x64-release)
001005:0000 MakeMKV v1.18.3 linux(x64-release) started
001004:0000 Debug logging enabled, log will be saved as file:///home/user/MakeMKV_log.txt
Using 262272KB for read cache.
Network access is ENABLED, CURL version 8.20.0/OpenSSL/3.6.2/1.69.0 (x86_64-pc-linux-gnu) , proxy server not set.
001003:0020 DEBUG: Code 0 at `BLLaJX7%0; ?J)zOB:`KC:29393631
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
001003:0020 DEBUG: Code 0 at `BLLaJX7%0; ?J)zOB:`KC:29393631
001003:0020 DEBUG: Code 100941312 at Gj,<<FB's&zxt`JC:121271617
001003:0020 DEBUG: Code 100941312 at SG^),l1LQ6MK6L>m:213130559
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
001011:0000 Using LibreDrive mode (v06.3 id=866A98CB9C4E)
003007:0000 Using direct disc access mode
005085:0000 Loaded content hash table, will verify integrity of M2TS files.
DEBUG: Code 2147483648 at S{\1-j6N>Jamw4_#:121265499
DISCID=EF417B6B88914B8EE91D49A4249D0E52B7007FC6
003307:0000 File 00003.mpls was added as title #0
003307:0000 File 00002.mpls was added as title #1
003307:0000 File 00001.m2ts was added as title #2
003307:0000 File 00000.m2ts was added as title #3
003307:0000 File 00005.m2ts was added as title #4
005011:0000 Operation successfully completed
005014:0000 Saving 1 titles into directory file:///home/user/Videos
AV sync issues in /home/user/Videos/title_t00.mkv
AV sync in 1,2 at 0:00:39 (8ms) : encountered overlapping frame, audio skew is +8ms
004047:0010 AV sync issue in stream 4 at 0:00:00 : Forced subtitles track #4 turned out to be empty and was removed from output file
004047:0010 AV sync issue in stream 6 at 0:00:00 : Forced subtitles track #6 turned out to be empty and was removed from output file
005005:0080 1 titles saved
005036:0104 Copy complete. 1 titles saved.

Re: libmmbd integration with mpv

Posted: Wed May 20, 2026 4:06 pm
by MrPenguin
artim wrote:
Wed May 20, 2026 9:34 am
Hey, has anybody managed to successfully integrate mpv with libmmbd (on Linux)? I've compiled v1.18.3 from source and installed it (and activated it). But trying to get mpv to load it fails. I've enabled debug logs in the MakeMKV GUI and they do show entries when trying to access a UHD BD via mpv, but the content isn't too helpful:
IIRC, libbluray should find and load libmmbd.so automatically. Have you installed libmmbd.so.0 in /usr/lib64, and can your user-id "see" it? E.g. check libmmbd.so.0 file ownership and permissions?

Re: libmmbd integration with mpv

Posted: Thu May 21, 2026 9:26 am
by artim
libmmbd.so.0 is located in /usr/lib, not /usr/lib64. The only thing located in lib64 is a ld-linux-x86-64.so.2 symlink to ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2. libmmbd.so.0 is owned by root with 644 permissions, like every library in that directory.

Re: libmmbd integration with mpv

Posted: Fri May 22, 2026 10:38 am
by MrPenguin
artim wrote:
Thu May 21, 2026 9:26 am
libmmbd.so.0 is located in /usr/lib, not /usr/lib64. The only thing located in lib64 is a ld-linux-x86-64.so.2 symlink to ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2. libmmbd.so.0 is owned by root with 644 permissions, like every library in that directory.
I think you are probably over-thinking this. FWIW, my own MakeMKV installation copies libmmd.so.0 into /usr/lib64, and IIRC libbluray would load it in preference to libaacs.so.0 from there without any further help from me. However:

Code: Select all

LIBAACS_PATH=/usr/lib64/libmmbd mpv --bluray-device=/path/to/backup/DOGMA/ bd://0
is correctly using libmmbd instead of libaacs.

Note that I am playing a disk backup here. I don't recommend trying to play a UHD disk directly, if only to save wear and tear on your UHD drive.

Re: libmmbd integration with mpv

Posted: Fri May 22, 2026 1:40 pm
by artim
As expected, even after copying libmmbd.so.0 to /usr/lib64/ I get exactly the same results. I would have been very surprised if that worked, as make install most likely knows where libbluray expects libmmbd to be located.

FYIW, that's what MakeMKV has to say about the disk:

Code: Select all

Drive Information
OS device name: /dev/sr0
Current profile: BD-ROM
Manufacturer: HL-DT-ST
Product: BD-RE BU40N
Revision: 1.03
Serial number: MOBP9KB3601
Firmware date: 2118-10-24 19:34
Bus encryption flags: 17
Highest AACS version: 82

LibreDrive Information
Status: Enabled
Drive platform: MT1959
Firmware type: Patched (microcode access re-enabled)
Firmware version: 1.03
DVD all regions: Yes
BD raw data read: Yes
BD raw metadata read: Yes
Unrestricted read speed: Yes

Disc Information
Label: UHD_KANU
Timestamp: 2025-11-21 19:49:46
Protection: AACS2.0/C v82
Data capacity: 59.41 Gb
Disc type: BD-ROM UHD
Number of layers: 2
Bus encryption flags: 80

Re: libmmbd integration with mpv

Posted: Fri May 22, 2026 7:31 pm
by MrPenguin
artim wrote:
Fri May 22, 2026 1:40 pm
As expected, even after copying libmmbd.so.0 to /usr/lib64/ I get exactly the same results. I would have been very surprised if that worked, as make install most likely knows where libbluray expects libmmbd to be located.
Curiously, MakeMKV chose to install libmmbd.so.0 in /usr/lib64 on my system:

Code: Select all

...
prefix=/usr
exec_prefix=${prefix}
datarootdir=${prefix}/share
libdir=${exec_prefix}/lib64
bindir=${exec_prefix}/bin
...
But regardless, I also successfully used the LIBAACS_PATH variable to tell mpv and libbluray to use libmmbd.so.0, which makes its actual installation directory moot.

Why are you including

Code: Select all

LIBBDPLUS_PATH=/usr/lib/libmmbd
for a UHD disk? BD+ is only used by a small number of standard BDs, and there hasn't been a new BD+ disk for years. No UHD disk uses BD+.

Re: libmmbd integration with mpv

Posted: Sat May 23, 2026 8:30 am
by artim
MrPenguin wrote:
Fri May 22, 2026 7:31 pm
artim wrote:
Fri May 22, 2026 1:40 pm
As expected, even after copying libmmbd.so.0 to /usr/lib64/ I get exactly the same results. I would have been very surprised if that worked, as make install most likely knows where libbluray expects libmmbd to be located.
Curiously, MakeMKV chose to install libmmbd.so.0 in /usr/lib64 on my system:

Code: Select all

...
prefix=/usr
exec_prefix=${prefix}
datarootdir=${prefix}/share
libdir=${exec_prefix}/lib64
bindir=${exec_prefix}/bin
...
The Makefile is being created by configure. So for me it creates it with

Code: Select all

prefix=/usr
exec_prefix=${prefix}
datarootdir=${prefix}/share
libdir=${exec_prefix}/lib
bindir=${exec_prefix}/bin
datadir=${datarootdir}
But regardless, I also successfully used the LIBAACS_PATH variable to tell mpv and libbluray to use libmmbd.so.0, which makes its actual installation directory moot.
Exactly why I said that this doesn't make much sense to even try. Again, it does work when using VLC, which should just use the same architecture as mpv for this. I'll look into compiling mpv from scratch, maybe Debian did some configuration error that somehow prevents this from working.
Why are you including

Code: Select all

LIBBDPLUS_PATH=/usr/lib/libmmbd
for a UHD disk? BD+ is only used by a small number of standard BDs, and there hasn't been a new BD+ disk for years. No UHD disk uses BD+.
Because the LIBAACS_PATH variable didn't work on its own so I thought trying it together with the LIBBDPLUS_PATH variable can't hurt.

EDIT: also no success with self-compiled mpv (with -Dlibbluray=enabled set). What mpv version do you use? I have this:

Code: Select all

mpv --version
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.360.1
FFmpeg version: 8.0.1-3+b1 (runtime 8.1.1-3)
FFmpeg library versions:
   libavcodec      62.11.100 (runtime 62.28.101)
   libavdevice     62.1.100 (runtime 62.3.101)
   libavfilter     11.4.100 (runtime 11.14.101)
   libavformat     62.3.100 (runtime 62.12.101)
   libavutil       60.8.100 (runtime 60.26.101)
   libswresample   6.1.100 (runtime 6.3.101)
   libswscale      9.1.100 (runtime 9.5.101)

Re: libmmbd integration with mpv

Posted: Sat May 23, 2026 9:43 am
by MrPenguin
artim wrote:
Sat May 23, 2026 8:30 am
What mpv version do you use? I have this:

Code: Select all

mpv --version
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.360.1
FFmpeg version: 8.0.1-3+b1 (runtime 8.1.1-3)
FFmpeg library versions:
   libavcodec      62.11.100 (runtime 62.28.101)
   libavdevice     62.1.100 (runtime 62.3.101)
   libavfilter     11.4.100 (runtime 11.14.101)
   libavformat     62.3.100 (runtime 62.12.101)
   libavutil       60.8.100 (runtime 60.26.101)
   libswresample   6.1.100 (runtime 6.3.101)
   libswscale      9.1.100 (runtime 9.5.101)

Code: Select all

$ mpv --version
mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.351.0
FFmpeg version: 7.1.1 (runtime 7.1.4)
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100 (runtime 10.5.100)
   libavformat     61.7.100 (runtime 61.7.102)
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Re: libmmbd integration with mpv

Posted: Sat May 23, 2026 10:01 am
by artim
Ok, that wasn't the solution. Could you by any chance check your debug logs when playing back your encrypted UHD copy? I'm seeing these lines:

Code: Select all

[bd] Opening bd://0
[bd] Blu-ray successfully opened.
[bd] resize stream to 131072 bytes, drop 0 bytes
[bd] Stream opened successfully.
[demux] Trying demuxers for level=force.
[demux] Trying demuxer: disc (force-level: force)
aacs.c:255: Unable decrypt unit (AACS)!
bluray.c:786: Skipping broken unit at 0
[disc] reset to time: 0.000000
[demux] Trying demuxers for level=force.
[demux] Trying demuxer: lavf (force-level: force)
aacs.c:255: Unable decrypt unit (AACS)!
bluray.c:786: Skipping broken unit at 6144
[lavf] No format found, try lowering probescore or forcing the format.
[cplayer] Opening failed or was aborted: bd://0
[cplayer] finished playback, unrecognized file format (reason 4)
Failed to recognize file format
There's no mentioning of libmmbd in there at any point. Not even with log verbosity set to trace.
Also, does the more verbose version information from there show any significant differences?

Code: Select all

[cplayer] mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
[cplayer]  built on May 23 2026 11:45:47
[cplayer] libplacebo version: v7.360.1
[cplayer] FFmpeg version: 8.1.1-3
[cplayer] FFmpeg library versions:
[cplayer]    libavcodec      62.28.101
[cplayer]    libavdevice     62.3.101
[cplayer]    libavfilter     11.14.101
[cplayer]    libavformat     62.12.101
[cplayer]    libavutil       60.26.101
[cplayer]    libswresample   6.3.101
[cplayer]    libswscale      9.5.101
[cplayer] Configuration: -Ddmabuf-wayland=enabled -Ddvdnav=enabled -Dlibbluray=enabled -Dvaapi=enabled -Dvaapi-wayland=enabled
[cplayer] List of enabled features: alsa build-date cplugins debug dmabuf-interop-gl dmabuf-wayland dvbin dvdnav egl egl-wayland ffmpeg gl glibc-thread-name glob glob-posix gpl iconv jack jpeg lcms2 libarchive libass libavdevice libbluray libdl libplacebo linux-fstatfs lua52 memfd-create memrchr posix posix-shm ppoll pthread-condattr-setclock pulse vaapi vaapi-wayland vector vk-khr-display vt.h vulkan wayland wayland-protocols-1-32 wayland-protocols-1-38 wayland-protocols-1-39 wayland-protocols-1-41 wayland-protocols-1-44 wayland-protocols-1-47 x11-clipboard zimg zimg-st428 zlib

Re: libmmbd integration with mpv

Posted: Sun May 24, 2026 7:36 pm
by tomty89
I can't help but wonder, does it make any difference if you use bd://longest, or bd://2 for the disc with:

Code: Select all

[bd] idx:   2 duration: 01:28:10 angles:  1 (playlist: 00002.mpls)
Also, have you tested with any other disc? Does it fail with both regular BD and UHD BD?

Re: libmmbd integration with mpv

Posted: Mon May 25, 2026 6:46 am
by artim
tomty89 wrote:
Sun May 24, 2026 7:36 pm
I can't help but wonder, does it make any difference if you use bd://longest, or bd://2 for the disc with:
They all fail the exact same way.
Also, have you tested with any other disc? Does it fail with both regular BD and UHD BD?
I only own a single UHD BD. And as already mentioned, VLC can play it back without issue and MakeMKV can copy its content, so that shouldn't be the cause. And yes, the issue only exists with the UHD BD, a classical BD can be played back even through mpv, with and without setting LIBAACS_PATH:

Code: Select all

LIBAACS_PATH=/usr/lib/libmmbd mpv --msg-level=bd=debug bd://
[bd] Opening bd://
[bd] List of available titles:
[bd] idx:   0 duration: 00:00:25 angles:  1 (playlist: 00001.mpls)
[bd] idx:   1 duration: 01:28:10 angles:  1 (playlist: 00003.mpls)
[bd] idx:   2 duration: 00:04:21 angles:  1 (playlist: 00004.mpls)
[bd] idx:   3 duration: 00:00:08 angles:  1 (playlist: 00002.mpls)
[bd] idx:   4 duration: 00:07:42 angles:  1 (playlist: 00005.mpls)
[bd] idx:   5 duration: 00:00:14 angles:  1 (playlist: 00098.mpls)
[bd] idx:   6 duration: 00:04:23 angles:  1 (playlist: 00006.mpls)
[bd] idx:   7 duration: 00:04:49 angles:  1 (playlist: 00007.mpls)
[bd] idx:   8 duration: 00:01:35 angles:  1 (playlist: 00013.mpls)
[bd] idx:   9 duration: 00:01:27 angles:  1 (playlist: 00014.mpls)
[bd] idx:  10 duration: 00:01:42 angles:  1 (playlist: 00015.mpls)
[bd] idx:  11 duration: 00:01:23 angles:  1 (playlist: 00016.mpls)
[bd] idx:  12 duration: 00:05:54 angles:  1 (playlist: 00010.mpls)
[bd] idx:  13 duration: 00:01:49 angles:  1 (playlist: 00011.mpls)
[bd] idx:  14 duration: 00:03:18 angles:  1 (playlist: 00012.mpls)
[bd] idx:  15 duration: 00:09:34 angles:  1 (playlist: 00019.mpls)
[bd] idx:  16 duration: 00:01:43 angles:  1 (playlist: 00020.mpls)
[bd] idx:  17 duration: 00:01:41 angles:  1 (playlist: 00021.mpls)
[bd] idx:  18 duration: 00:01:34 angles:  1 (playlist: 00008.mpls)
[bd] idx:  19 duration: 00:06:06 angles:  1 (playlist: 00009.mpls)
[bd] idx:  20 duration: 00:01:05 angles:  1 (playlist: 00017.mpls)
[bd] idx:  21 duration: 00:47:16 angles:  1 (playlist: 00018.mpls)
[bd] idx:  22 duration: 00:02:45 angles:  1 (playlist: 00022.mpls)
[bd] idx:  23 duration: 00:04:48 angles:  1 (playlist: 00023.mpls)
[bd] idx:  24 duration: 00:01:16 angles:  1 (playlist: 00024.mpls)
[bd] idx:  25 duration: 00:01:57 angles:  1 (playlist: 00031.mpls)
[bd] idx:  26 duration: 00:01:29 angles:  1 (playlist: 00032.mpls)
[bd] idx:  27 duration: 00:01:34 angles:  1 (playlist: 00033.mpls)
[bd] Blu-ray successfully opened.
[bd] resize stream to 131072 bytes, drop 0 bytes
[bd] Stream opened successfully.
[ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
[ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[ffmpeg/demuxer] mpegts: Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
[ffmpeg/demuxer] Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
○ --edition=0 'title: 1 (00:00:25.417) (00001.mpls)'
● --edition=1 'title: 2 (01:28:10.625) (00003.mpls)'
○ --edition=2 'title: 3 (00:04:21.240) (00004.mpls)'
○ --edition=3 'title: 4 (00:00:08.000) (00002.mpls)'
○ --edition=4 'title: 5 (00:07:42.800) (00005.mpls)'
○ --edition=5 'title: 6 (00:00:14.000) (00098.mpls)'
○ --edition=6 'title: 7 (00:04:23.080) (00006.mpls)'
○ --edition=7 'title: 8 (00:04:49.800) (00007.mpls)'
○ --edition=8 'title: 9 (00:01:35.920) (00013.mpls)'
○ --edition=9 'title: 10 (00:01:27.640) (00014.mpls)'
○ --edition=10 'title: 11 (00:01:42.680) (00015.mpls)'
○ --edition=11 'title: 12 (00:01:23.400) (00016.mpls)'
○ --edition=12 'title: 13 (00:05:54.880) (00010.mpls)'
○ --edition=13 'title: 14 (00:01:49.320) (00011.mpls)'
○ --edition=14 'title: 15 (00:03:18.440) (00012.mpls)'
○ --edition=15 'title: 16 (00:09:34.040) (00019.mpls)'
○ --edition=16 'title: 17 (00:01:43.625) (00020.mpls)'
○ --edition=17 'title: 18 (00:01:41.000) (00021.mpls)'
○ --edition=18 'title: 19 (00:01:34.760) (00008.mpls)'
○ --edition=19 'title: 20 (00:06:06.920) (00009.mpls)'
○ --edition=20 'title: 21 (00:01:05.200) (00017.mpls)'
○ --edition=21 'title: 22 (00:47:16.080) (00018.mpls)'
○ --edition=22 'title: 23 (00:02:45.000) (00022.mpls)'
○ --edition=23 'title: 24 (00:04:48.520) (00023.mpls)'
○ --edition=24 'title: 25 (00:01:16.375) (00024.mpls)'
○ --edition=25 'title: 26 (00:01:57.040) (00031.mpls)'
○ --edition=26 'title: 27 (00:01:29.400) (00032.mpls)'
○ --edition=27 'title: 28 (00:01:34.845) (00033.mpls)'
● Video  --vid=1               (h264 1920x1080 24 fps)
● Audio  --aid=1  --alang=  (truehd 8ch 48000 Hz)
○ Audio  --aid=2  --alang=  (ac3 6ch 48000 Hz 640 kbps)
○ Audio  --aid=3  --alang=  (dts 2ch 48000 Hz 768 kbps)
○ Subs   --sid=1  --slang=  (hdmv_pgs_subtitle)
● Subs   --sid=2  --slang=  (hdmv_pgs_subtitle)
File tags:
 Title:
Using hardware decoding (vulkan).
AO: [pipewire] 48000Hz 7.1 8ch s32
VO: [gpu-next] 1920x1080 vulkan[nv12]
Track switched:
 ● Video  --vid=1               (h264 [High] 1920x1080 24 fps)
 ● Audio  --aid=1  --alang=  (truehd [Dolby TrueHD + Dolby Atmos] 8ch 48000 Hz)
 ○ Audio  --aid=2  --alang=  (ac3 6ch 48000 Hz 640 kbps)
 ○ Audio  --aid=3  --alang=  (dts 2ch 48000 Hz 768 kbps)
 ○ Subs   --sid=1  --slang=  (hdmv_pgs_subtitle)
 ○ Subs   --sid=2  --slang=  (hdmv_pgs_subtitle)
[autoselect_forced_sub] Not found only forced subtitles, try with --script-opts=afs-sub_forced_only=no
[osd/libass] fontselect: Using default font family: (mpv-osd-symbols, 400, 0) -> /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf, 0, NotoSans-Regular
AV: 00:00:03 / 01:28:10 (0%) A-V:  0.000
Exiting... (Quit)
And here the MakeMKV debug log from that attempt:

Code: Select all

Debug log started at Mon May 25 06:39:10 2026 , written by MakeMKV v1.18.3 linux(x64-release)
001005:0000 MakeMKV v1.18.3 linux(x64-release) started
001004:0000 Debug logging enabled, log will be saved as file:///home/user/MakeMKV_log.txt
Using 768KB for read cache.
Network access is ENABLED, CURL version 8.20.0/OpenSSL/3.6.2/1.69.0 (x86_64-pc-linux-gnu) , proxy server not set.
001003:0020 DEBUG: Code 0 at `BLLaJX7%0; ?J)zOB:`KC:29393631
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
001011:0000 Using LibreDrive mode (v06.3 id=866A98CB9C4E)
003007:0000 Using direct disc access mode
DEBUG: Code 2147483648 at S{\1-j6N>Jamw4_#:121265499
DISCID=
005011:0000 Operation successfully completed
Application exited at Mon May 25 06:39:36 2026

Re: libmmbd integration with mpv

Posted: Mon May 25, 2026 9:50 am
by MrPenguin
artim wrote:
Mon May 25, 2026 6:46 am
I only own a single UHD BD. And as already mentioned, VLC can play it back without issue and MakeMKV can copy its content, so that shouldn't be the cause. And yes, the issue only exists with the UHD BD, a classical BD can be played back even through mpv, with and without setting LIBAACS_PATH:
Only the files in BDMV/STREAM/ are encrypted. Are you sure that MakeMKV has a "hashed key" for this disk? I'm assuming your disk is this one:

Code: Select all

0xEF417B6B88914B8EE91D49A4249D0E52B7007FC6 = UHD_KANU | D | 2025-11-14 | ... 
The public KEYDB.cfg file has a Unit Key ("| U |" field) for this disk, which means that libaacs can decrypt it. It also has a Volume Unique Key ("| V |" field), which means that MakeMKV can use the KEYDB.cfg file to decrypt this disk too. However, I do not know whether libmmbd will also fall back on the public KEYDB.cfg file (assuming you have placed a copy in MakeMKV's data directory) if MakeMKV doesn't also have a native "hashed key"...

Does MakeMKV have a "hashed key" for your disk? I.e. can MakeMKV decrpyt it without having a KEYDB.cfg file in its data directory (i.e. the same directory with the _private_data.tar file where MakeMKV also writes its TGZ dump files)?

To be fair, my $HOME/.MakeMKV/ directory contains a soft-link to my $HOME/.config/aacs/KEYDB.cfg file, but I'm sure that all my disks have keys in both database anyway.

Re: libmmbd integration with mpv

Posted: Mon May 25, 2026 10:54 am
by artim
MrPenguin wrote:
Mon May 25, 2026 9:50 am
Are you sure that MakeMKV has a "hashed key" for this disk?
As MakeMKV is able to copy the content (while removing the encryption) and VLC can play back the movie, it's obvious that everything needed is present, that was never the question.
assuming you have placed a copy in MakeMKV's data directory
It's located in .config/aacs/KEYDB.cfg where it belongs, with a symlink into ~/.MakeMKV. Unless MakeMKV somewhere stored a different file that for whatever reason is only being used from VLC and not mpv, again, everything needed for playback and copying the content is present, the issue is only with the integration with mpv that succeeds for a normal BD but fails for a UHD BD. And if libaacs should be able to handle even the UHD BD doesn't really matter at this point as it clearly doesn't and throws even more errors than when trying to get it to use libmmbd.
Does MakeMKV have a "hashed key" for your disk? I.e. can MakeMKV decrpyt it without having a KEYDB.cfg file in its data directory (i.e. the same directory with the _private_data.tar file where MakeMKV also writes its TGZ dump files)?
Nope, it doesn't. If I remove the symlink for the KEYDB.cfg file into ~.MakeMKV it fails to open the disk:

Code: Select all

Debug log started at Mon May 25 10:44:03 2026 , written by MakeMKV v1.18.3 linux(x64-release)
001005:0000 MakeMKV v1.18.3 linux(x64-release) started
001004:0000 Debug logging enabled, log will be saved as file:///home/user/MakeMKV_log.txt
Using 262272KB for read cache.
Network access is ENABLED, CURL version 8.20.0/OpenSSL/3.6.2/1.69.0 (x86_64-pc-linux-gnu) , proxy server not set.
001003:0020 DEBUG: Code 0 at `BLLaJX7%0; ?J)zOB:`KC:29393631
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
SDF  v0a5: HL-DT-ST_BD-RE_BU40N_1.03_211810241934_MOBP9KB3601
005010:0000 Failed to open disc
005010:0000 Failed to open disc
To be fair, my $HOME/.MakeMKV/ directory contains a soft-link to my $HOME/.config/aacs/KEYDB.cfg file, but I'm sure that all my disks have keys in both database anyway.
If I knew how to check the .bin files I would search for it manually, but as MakeMKV can't read the disk without the symlink, it seemingly can't be present.

Re: libmmbd integration with mpv

Posted: Mon May 25, 2026 11:10 am
by MrPenguin
artim wrote:
Mon May 25, 2026 10:54 am
MrPenguin wrote:
Mon May 25, 2026 9:50 am
Does MakeMKV have a "hashed key" for your disk? I.e. can MakeMKV decrpyt it without having a KEYDB.cfg file in its data directory (i.e. the same directory with the _private_data.tar file where MakeMKV also writes its TGZ dump files)?
Nope, it doesn't. If I remove the symlink for the KEYDB.cfg file into ~.MakeMKV it fails to open the disk
I'm assuming MakeMKV has now generated a TGZ dump file for you disk? In which case, I would email that dump to svq@makemkv.com, and I suspect that mpv will then start decrypting your disk using libmmbd within a week or so... ;).

Re: libmmbd integration with mpv

Posted: Mon May 25, 2026 11:45 am
by artim
MrPenguin wrote:
Mon May 25, 2026 11:10 am
I'm assuming MakeMKV has now generated a TGZ dump file for you disk?
Not that I'm aware. These are the only files in ~/.MakeMKV:

Code: Select all

ls -la .MakeMKV/
total 4,3M
drwxr-xr-x 1 user user  122 25. Mai 12:49 .
drwxr-xr-x 1 user user 6,0K 25. Mai 11:00 ..
lrwxrwxrwx 1 user user   22 25. Mai 12:49 KEYDB.cfg -> .config/aacs/KEYDB.cfg
-rw-rw-rw- 1 user user 4,3M 22. Mai 15:29 _private_data.tar
-rw-rw-rw- 1 user user  489 25. Mai 13:20 screen.conf
-rw-rw-rw- 1 user user  515 16. Mai 20:33 settings.conf
-rw-rw-rw- 1 user user  194 25. Mai 08:35 update.conf
Also for refrence a log from vlc playing back the disk (only loading the menu screen, though without a menu, so just the background:

Code: Select all

vlc --verbose 2
VLC media player 3.0.23 Vetinari (revision 3.0.23-2-0-g79128878dd)
mmc.c:394: AACS not active or supported by the drive
aacs.c:255: Unable decrypt unit (AACS)!
m2ts_filter.c:211: missing sync byte. scrambled data ? Filtering aborted.
bluray.c:795: m2ts filter error
aacs.c:255: Unable decrypt unit (AACS)!
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
[VAAPI @ 0x7fb894594ec0] VAAPI driver: Mesa Gallium driver 26.0.6-1 for AMD Radeon 780M Graphics (radeonsi, phoenix, ACO, DRM 3.64, 7.0.9+deb14-amd64).
[VAAPI @ 0x7fb894594ec0] Driver not found in known nonstandard list, using standard behaviour.
[hevc @ 0x7fb8b80583c0] get_buffer() failed
[hevc @ 0x7fb8b80583c0] thread_get_buffer() failed
[hevc @ 0x7fb8b80583c0] Error parsing NAL unit #2.
[hevc @ 0x7fb89c08b7c0] get_buffer() failed
[hevc @ 0x7fb89c08b7c0] thread_get_buffer() failed
[hevc @ 0x7fb89c08b7c0] Error parsing NAL unit #2.
and what I get when I select "no disk menus" and thus it jumps right into the main movie:

Code: Select all

vlc --verbose 2
VLC media player 3.0.23 Vetinari (revision 3.0.23-2-0-g79128878dd)
mmc.c:394: AACS not active or supported by the drive
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
[VAAPI @ 0x7f9f18401080] VAAPI driver: Mesa Gallium driver 26.0.6-1 for AMD Radeon 780M Graphics (radeonsi, phoenix, ACO, DRM 3.64, 7.0.9+deb14-amd64).
[VAAPI @ 0x7f9f18401080] Driver not found in known nonstandard list, using standard behaviour.
Beyond vlc not being able to use vaapi because of its ancient ffmpeg version, nothing wirth mentioning. It also throws a couple thousand "aacs.c:255: Unable decrypt unit (AACS)!" warnings when not skipping the menu, but eventually it loads the disk. Though no log entries are written to MakeMKVs debug log.
I suspect that mpv will then start decrypting your disk using libmmbd within a week or so
Then how come VLC has no problem handling the UHD BD but mpv has?

PS: for whatever reason, after closing MakeMKV and opening it again, it can now somehow process the UHD BD. The KEYDB.cfg is still not present in ~/.MakeMKV, it seems it has just updated "_private_data.tar". So whatever the reason is that it worked with VLC but not mpv, that must have fixed it. But for the next time, how do I trigger a tgz dump?