Skip to content

Playing dvd says "libdvdread: Encrypted DVD support unavailable" #17091

@3N4N

Description

@3N4N

Important Information

- mpv version: v0.40.0-dev-g72dbcf119
- Platform version: macos 26.0.1
- Meson version: 1.9.1

Reproduction Steps

I wanted to build mpv from source because I wanted to play an external dvd with it (which is not supported with homebrew's mpv build). It built fine, but it couldn't play the dvd properly:

bash-3.2$ ./build1/mpv dvd:// --dvd-device=/Volumes/SCOOBY_DOO_2/
libdvdread: Encrypted DVD support unavailable.
libdvdread: Attempting to use device /dev/rdisk4 mounted on /Volumes/SCOOBY_DOO_2 for CSS authentication
libdvdnav: Can't read name block. Probably not a DVD-ROM device.
libdvdnav: vm: dvd_read_name failed
libdvdnav: DVD disk reports itself with Region mask 0x00fe0000. Regions: 01
libdvdnav: Suspected RCE Region Protection!!!
[dvdnav] Selecting title 0.
[dvdnav] DVDNAV, switched to title: 1
[ffmpeg/demuxer] mpeg: probed stream 0 failed
[ffmpeg/audio] ac3: exponent 25 is out-of-range
[ffmpeg/audio] ac3: error decoding the audio block

Expected Behavior

I realized the issue was the libdvdcss wasn't linked to the binary (even though it was installed):

bash-3.2$ otool -L ./build1/mpv | grep dvd
        /opt/homebrew/opt/libdvdnav/lib/libdvdnav.4.dylib (compatibility version 4.0.0, current version 4.0.0)

So I checked the meson build file and saw that indeed libdvdcss isn't listed as a dependency. In Linux, it's probably a dependency of dvdnav, but in macos, it isn't:

bash-3.2$ pkg-config --cflags dvdnav
-I/opt/homebrew/Cellar/libdvdnav/7.0.0/include -I/opt/homebrew/Cellar/libdvdread/7.0.1/include

In the end, adding libdvdcss as a dependency solved the issues:

diff --git a/meson.build b/meson.build
index e37564b03455..6dd9679cff50 100644
--- a/meson.build
+++ b/meson.build
@@ -637,9 +637,11 @@ dvdnav_opt = get_option('dvdnav').require(
     error_message: 'the build is not GPL!',
 )
 dvdnav = dependency('dvdnav', version: '>= 4.2.0', required: dvdnav_opt)
+dvdcss = dependency('libdvdcss', version: '>= 1.2.0', required: dvdnav_opt)
 features += {'dvdnav': dvdnav.found()}
 if features['dvdnav']
     dependencies += dvdnav
+    dependencies += dvdcss
     sources += files('stream/stream_dvdnav.c')
 endif

Actual Behavior

Now mpv plays the encrypted dvd correctly.

Log File

This is the output of meson setup build2 after I added libdvdcss as a dependency:

bash-3.2$ meson setup build2 -Ddvdnav=enabled # -Ddvdread=enabled
The Meson build system
Version: 1.9.1
Source dir: /Users/enan/projects/mpv
Build dir: /Users/enan/projects/mpv/build2
Build type: native build
Project name: mpv
Project version: 0.40.0-UNKNOWN
C compiler for the host machine: cc (clang 17.0.0 "Apple clang version 17.0.0 (clang-1700.3.19.1)")
C linker for the host machine: cc ld64 1221.4
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python3 found: YES (/opt/homebrew/bin/python3)
Found pkg-config: YES (/opt/homebrew/bin/pkg-config) 2.5.1
Run-time dependency libavcodec found: YES 62.11.100
Run-time dependency libavfilter found: YES 11.4.100
Run-time dependency libavformat found: YES 62.3.100
Run-time dependency libavutil found: YES 60.8.100
Run-time dependency libswresample found: YES 6.1.100
Run-time dependency libswscale found: YES 9.1.100
Run-time dependency libplacebo found: YES 7.351.0
Run-time dependency libass found: YES 0.17.4
Compiler for C supports arguments -Wdisabled-optimization: YES
Compiler for C supports arguments -Wempty-body: YES
Compiler for C supports arguments -Wformat: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Woverflow: YES
Compiler for C supports arguments -Wparentheses: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wvla: YES
Compiler for C supports arguments -Wno-cast-function-type: YES
Compiler for C supports arguments -Wno-format-zero-length: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-sign-compare: YES
Compiler for C supports arguments -Wno-switch: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -fno-math-errno: YES
Compiler for C supports arguments -fno-signed-zeros: YES
Compiler for C supports arguments -fno-trapping-math: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Wno-pointer-sign: YES
Compiler for C supports arguments -Wformat -Werror=format-security: YES
Compiler for C supports link arguments -Wl,--nxcompat,--no-seh,--dynamicbase: NO
Compiler for C supports link arguments -Wl,-z,noexecstack: NO
Run-time dependency dl found: YES
Library atomic found: NO
Compiler for C supports link arguments -rdynamic: YES
Run-time dependency threads found: YES
Header "pthread.h" has symbol "pthread_condattr_setclock" with dependency threads: NO
Run-time dependency appleframeworks found: YES (Cocoa, IOKit, QuartzCore)
Checking for function "fork" : YES
Checking for function "ppoll" : NO
Checking for function "memrchr" : NO
Library windowsapp skipped: feature uwp disabled
Checking for function "glob" : YES
Header "sys/vt.h" has symbol "VT_GETMODE" : NO
Header "sys/consio.h" has symbol "VT_GETMODE" : NO
Header "dev/wscons/wsdisplay_usl_io.h" has symbol "VT_GETMODE" : NO
Checking for function "fstatfs" : YES
Checking for function "fstatfs" : NO
Compiler for C supports function attribute vector_size: YES
Program /Users/enan/projects/mpv/TOOLS/docutils-wrapper.py found: YES (/Users/enan/projects/mpv/TOOLS/docutils-wrapper.py)
Program /Users/enan/projects/mpv/TOOLS/file2string.py found: YES (/Users/enan/projects/mpv/TOOLS/file2string.py)
Program /Users/enan/projects/mpv/TOOLS/matroska.py found: YES (/Users/enan/projects/mpv/TOOLS/matroska.py)
Program /Users/enan/projects/mpv/TOOLS/gen-mpv-desktop.py found: YES (/Users/enan/projects/mpv/TOOLS/gen-mpv-desktop.py)
Program git found: YES (/usr/bin/git)
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libcdio found: NO (tried pkgconfig, framework and cmake)
Run-time dependency libcdio_paranoia found: NO (tried pkgconfig, framework and cmake)
Has header "linux/dvb/frontend.h" : NO
Run-time dependency dvdnav found: YES 7.0.0
Run-time dependency libdvdcss found: YES 1.5.0
Run-time dependency iconv found: YES
Run-time dependency mujs found: YES 1.3.8
Run-time dependency lcms2 found: YES 2.17
Run-time dependency libarchive found: NO (tried pkgconfig, framework and cmake)
Run-time dependency libavdevice found: YES 62.1.100
Run-time dependency libbluray found: YES 1.4.0
Library m found: YES
Library rt found: NO
Run-time dependency lua found: NO (tried pkgconfig, framework and cmake)
Run-time dependency lua52 found: NO (tried pkgconfig, framework and cmake)
Run-time dependency lua5.2 found: NO (tried pkgconfig, framework and cmake)
Run-time dependency lua-5.2 found: NO (tried pkgconfig, framework and cmake)
Run-time dependency luajit found: YES 2.1.1763318511
Run-time dependency rubberband found: YES 4.0.0
Run-time dependency sdl2 found: YES 2.32.10
Run-time dependency uchardet found: YES 0.0.8
Run-time dependency vapoursynth found: YES 73
Run-time dependency vapoursynth-script found: YES 73
Run-time dependency xfixes found: YES 6.0.1
Run-time dependency x11 found: YES 1.8.12
Run-time dependency zimg found: YES 3.0.6
Run-time dependency zlib found: YES 1.2.12
Run-time dependency alsa found: NO (tried pkgconfig, framework and cmake)
Run-time dependency appleframeworks found: YES (Foundation, AudioToolbox)
Header "AudioToolbox/AudioToolbox.h" has symbol "kAudioUnitSubType_RemoteIO" : NO
Run-time dependency appleframeworks found: YES (CoreMedia, AVFoundation)
Run-time dependency appleframeworks found: YES (CoreFoundation, CoreAudio, AudioUnit, AudioToolbox)
Run-time dependency jack found: NO (tried pkgconfig, framework and cmake)
Dependency openal skipped: feature openal disabled
Header "aaudio/AAudio.h" has symbol "AAudioStream" skipped: feature aaudio disabled
Library OpenSLES found: NO
Header "sys/soundcard.h" has symbol "SNDCTL_DSP_HALT" : NO
Run-time dependency libpipewire-0.3 found: NO (tried pkgconfig, framework and cmake)
Run-time dependency libpulse found: NO (tried pkgconfig, framework and cmake)
Run-time dependency sndio found: NO (tried pkgconfig, framework and cmake)
Header "audioclient.h" has symbol "IAudioClient" skipped: feature wasapi disabled
Run-time dependency caca found: NO (tried pkgconfig, framework and cmake)
Has header "d3d9.h" skipped: feature direct3d disabled
Run-time dependency libdrm found: NO (tried pkgconfig, framework and cmake)
Run-time dependency libdisplay-info found: NO (tried pkgconfig, framework and cmake)
Dependency gbm skipped: feature gbm disabled
Run-time dependency libjpeg found: YES 3.1.2
Dependency shaderc skipped: feature shaderc disabled
Run-time dependency libsixel found: NO (tried pkgconfig, framework and cmake)
Checking for function "shm_open" : YES
Dependency spirv-cross-c-shared skipped: feature spirv-cross disabled
Run-time dependency wayland-client found: NO (tried pkgconfig, framework and cmake)
Run-time dependency wayland-cursor found: NO (tried pkgconfig, framework and cmake)
Run-time dependency wayland-protocols found: NO (tried pkgconfig, framework and cmake)
Run-time dependency xkbcommon found: NO (tried pkgconfig, framework and cmake)
Run-time dependency wayland-client found: NO (tried pkgconfig, framework and cmake)
Has header "linux/input-event-codes.h" with dependency wayland-client: NO
Program wayland-scanner found: NO
Dependency x11 found: YES 1.8.12 (cached)
Run-time dependency xscrnsaver found: NO (tried pkgconfig, framework and cmake)
Run-time dependency xext found: YES 1.3.6
Run-time dependency xpresent found: NO (tried pkgconfig, framework and cmake)
Run-time dependency xrandr found: YES 1.5.4
Dependency xv skipped: feature xv disabled
Run-time dependency appleframeworks found: YES (OpenGL)
Library EGL skipped: feature egl-angle-lib disabled
Run-time dependency egl found: NO (tried pkgconfig, framework and cmake)
Library EGL skipped: feature egl-android disabled
Dependency wayland-egl skipped: feature egl-wayland disabled
Run-time dependency vulkan found: YES 1.4.328
Header "vulkan/vulkan_core.h" has symbol "VK_VERSION_1_3" with dependency vulkan: YES
Checking for function "vkCreateDisplayPlaneSurfaceKHR" with dependency vulkan: YES
Run-time dependency ffnvcodec found: NO (tried pkgconfig, framework and cmake)
Header "OpenGLES/ES3/glext.h" has symbol "GL_RGB32F" : NO
Run-time dependency libva found: NO (tried pkgconfig, framework and cmake)
Dependency libva-drm skipped: feature vaapi-drm disabled
Dependency libva-wayland skipped: feature vaapi-wayland disabled
Dependency libva-x11 skipped: feature vaapi-x11 disabled
Dependency libva-win32 skipped: feature vaapi-win32 disabled
Dependency vdpau skipped: feature vdpau disabled
Run-time dependency appleframeworks found: YES (CoreVideo)
Program /Users/enan/projects/mpv/TOOLS/macos-sdk-version.py found: YES (/Users/enan/projects/mpv/TOOLS/macos-sdk-version.py)
Message: Detected macOS sdk path: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Message: Detected macOS SDK: 26.0
Objective-C compiler for the host machine: clang (clang 17.0.0)
Objective-C linker for the host machine: clang ld64 1221.4
Program xcrun found: YES (/usr/bin/xcrun)
Program /Library/Developer/CommandLineTools/usr/bin/swiftc found: YES (/Library/Developer/CommandLineTools/usr/bin/swiftc)
Message: Detected Swift version: 6.2
Has header "AppKit/NSTouchBar.h" : YES
Program /Users/enan/projects/mpv/TOOLS/macos-swift-lib-directory.py found: YES (/Users/enan/projects/mpv/TOOLS/macos-swift-lib-directory.py)
Message: Detected Swift library directory: /Library/Developer/CommandLineTools/usr/lib/swift/macosx
Program rst2man found: YES (/opt/homebrew/bin/rst2man)
Program rst2html rst2html.py skipped: feature html-build disabled
Program rst2pdf skipped: feature pdf-build disabled
Configuring config.h using configuration
Message: List of enabled features: avfoundation bsd-fstatfs build-date cocoa coreaudio cplugins darwin debug dvdnav ffmpeg gl gl-cocoa glob glob-posix gpl iconv javascript jpeg lcms2 libass libavdevice libbluray libdl libplacebo luajit mac-thread-name macos-10-15-4-features macos-11-3-features macos-11-features macos-12-features macos-cocoa-cb macos-media-player macos-touchbar posix posix-shm rubberband rubberband-3 swift uchardet vapoursynth vector videotoolbox-gl videotoolbox-pl vk-khr-display vulkan x11-clipboard zimg zimg-st428 zlib
Fetching value of define "MPV_CLIENT_API_VERSION" : (((2) << 16) | (5) | 0UL)
Compiler for C supports link arguments -Wl,-Bsymbolic: NO
Program /Users/enan/projects/mpv/TOOLS/osxbundle.py found: YES (/Users/enan/projects/mpv/TOOLS/osxbundle.py)
Build targets in project: 31

mpv 0.40.0-UNKNOWN

    cocoa     : YES
    d3d11     : NO
    drm       : NO
    javascript: YES
    libmpv    : YES
    lua       : YES
    opengl    : YES
    vulkan    : YES
    wayland   : NO
    x11       : NO

  User defined options
    dvdnav    : enabled

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of parameters, and conditions used in "Reproduction Steps".
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions