libdvdcss.pkg will no longer install on OS X (now macOS).
Here's how to build and install libdvdcss.2.dylib so that you can use it with, for example, VLC and/or Handbrake.
wget https://download.videolan.org/libdvdcss/1.2.11/macosx/libdvdcss.2.dylib
sudo rsync -av libdvdcss.2.dylib /usr/lib/libdvdcss.2.dylib
Install X Code Tools
sudo xcode-select --install
sudo xcodebuild -license accept
Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install libdvdcss
brew install libdvdcss
Install autotools
brew install autoconf
brew install automake
Clone libdvdcss
git clone http://code.videolan.org/videolan/libdvdcss.git
Build libdvdcss
Use the default bash
. If you're running custom shell such as fish
or zsh
, switch back to bash for this.
pushd libdvdcss
git checkout 1.4.0
autoreconf -i
./configure --prefix=/usr
make
sudo make install
If you have a (
in the path to your compile folder you'll get this error:
cd . && git log > /Volumes/Data/Dropbox (Personal)/git/libdvdcss/ChangeLog-tmp
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `cd . && git log > /Volumes/Data/Dropbox (Personal)/git/libdvdcss/ChangeLog-tmp'
make[1]: [ChangeLog] Error 2 (ignored)
test -s ChangeLog-tmp && mv ChangeLog-tmp ChangeLog
make[1]: *** [ChangeLog] Error 1
make: *** [all] Error 2
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CC src/libdvdcss.lo
CC src/device.lo
CC src/css.lo
CC src/ioctl.lo
src/ioctl.c:162:5: warning: missing field 'reserved0008' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_read_structure_t, DVDCopyrightInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:162:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_read_structure_t, DVDCopyrightInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:162:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:298:5: warning: missing field 'reserved0008' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_read_structure_t, DVDDiscKeyInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:298:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_read_structure_t, DVDDiscKeyInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:298:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:428:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDTitleKeyInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:428:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDTitleKeyInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:428:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:545:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDAuthenticationGrantIDInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:545:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDAuthenticationGrantIDInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:545:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:640:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDChallengeKeyInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:640:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDChallengeKeyInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:640:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:748:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDAuthenticationSuccessFlagInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:748:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDAuthenticationSuccessFlagInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:748:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:858:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDKey1Info,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:858:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDKey1Info,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:858:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:953:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_send_key_t, DVDAuthenticationGrantIDInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:953:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_send_key_t, DVDAuthenticationGrantIDInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:953:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:1046:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_send_key_t, DVDChallengeKeyInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:1046:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_send_key_t, DVDChallengeKeyInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:1046:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:1155:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_send_key_t, DVDKey2Info,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:1155:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_send_key_t, DVDKey2Info,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:1155:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:1272:5: warning: missing field 'keyClass' initializer [-Wmissing-field-initializers]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDRegionPlaybackControlInfo,
^
./src/ioctl.h:63:26: note: expanded from macro 'INIT_DVDIOCTL'
DKDVD_TYPE dvd = { 0 }; \
^
src/ioctl.c:1272:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
INIT_DVDIOCTL( dk_dvd_report_key_t, DVDRegionPlaybackControlInfo,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/ioctl.h:64:27: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
src/ioctl.c:1272:5: warning: missing field 'reserved' initializer [-Wmissing-field-initializers]
./src/ioctl.h:64:29: note: expanded from macro 'INIT_DVDIOCTL'
BUFFER_TYPE dvdbs = { 0 }; \
^
33 warnings generated.
CC src/error.lo
CCLD libdvdcss.la
cd . && git log > /tmp/libdvdcss/ChangeLog-tmp
test -s ChangeLog-tmp && mv ChangeLog-tmp ChangeLog
rm -f ChangeLog-tmp
test -e ChangeLog || touch ChangeLog
What the installer output looks like:
./install-sh -c -d '/usr/local/lib'
/bin/sh ./libtool --mode=install /usr/bin/install -c libdvdcss.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libdvdcss.2.dylib /usr/local/lib/libdvdcss.2.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libdvdcss.2.dylib libdvdcss.dylib || { rm -f libdvdcss.dylib && ln -s libdvdcss.2.dylib libdvdcss.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libdvdcss.lai /usr/local/lib/libdvdcss.la
libtool: install: /usr/bin/install -c .libs/libdvdcss.a /usr/local/lib/libdvdcss.a
libtool: install: chmod 644 /usr/local/lib/libdvdcss.a
libtool: install: ranlib /usr/local/lib/libdvdcss.a
./install-sh -c -d '/usr/local/share/doc/libdvdcss'
/usr/bin/install -c -m 644 AUTHORS COPYING NEWS README ChangeLog '/usr/local/share/doc/libdvdcss'
./install-sh -c -d '/usr/local/lib/pkgconfig'
/usr/bin/install -c -m 644 src/libdvdcss.pc '/usr/local/lib/pkgconfig'
./install-sh -c -d '/usr/local/include/dvdcss'
/usr/bin/install -c -m 644 src/dvdcss/dvdcss.h src/dvdcss/version.h '/usr/local/include/dvdcss'
On High Sierra, you may also need to tell it to install into
/usr/local
as it can't live elsewhere now. I had to do this right before themake
after it failed the first time with the follwing error:install: /usr/lib/libdvdcss.2.dylib: Operation not permitted
make[1]: *** [install-libLTLIBRARIES] Error 71
make: *** [install-am] Error 2
To switch that directory I used:
./configure --disable-dependency-tracking --with-readline=
brew --prefix readline--prefix='/usr/local'