Fork me on GitHub

Project Notes

HandBrake

Installing HandBrake on macOS Sonoma for ripping copy-protected DVDs. Long live physical media!

Notes

Handrake is the application I’ve trusted for many years to do my DVD ripping on macOS. Why rip? Because machines don’t come with DVD drives any more, so I rip once and then play from the digital copy. Long live physical media!

I’m setting up fresh on macOS Sonoma (Apple Silicon M3), using HandBrake-1.7.2.dmg from HandBrake

Installing libdvdcss

HandBrake can’t rip copy-protected disks by default. This can be fixed by installing libdvdcss as explained here

The easiest way to install libdvdcss is with HomeBrew:

$ brew install libdvdcss
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################# 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################# 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libdvdcss/manifests/1.4.3
############################################################################################################################################################################# 100.0%
==> Fetching libdvdcss
==> Downloading https://ghcr.io/v2/homebrew/core/libdvdcss/blobs/sha256:a88500318685760e0425a099d0459f7be9f7505b89e69785af9d7ae183e40541
############################################################################################################################################################################# 100.0%
==> Pouring libdvdcss--1.4.3.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libdvdcss/1.4.3: 18 files, 403.9KB
==> Running `brew cleanup libdvdcss`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

Making libdvdcss available to HandBrake

HandBrake can’t find the library in the HomeBrew installation location /opt/homebrew/Cellar/libdvdcss/1.4.3, as it is looking in /usr/local/lib/.

The solution is to copy over the required library:

$ sudo cp /opt/homebrew/Cellar/libdvdcss/1.4.3/lib/libdvdcss.2.dylib /usr/local/lib
$ ls -al /usr/local/lib
total 144
drwxr-xr-x  3 root  wheel     96 Dec 29 19:19 .
drwxr-xr-x  4 root  wheel    128 Dec 29 19:07 ..
-rw-r--r--  1 root  wheel  72480 Dec 29 19:19 libdvdcss.2.dylib

When ripping with HomeBrew, the activity window will confirm that the library is found:

...
[19:20:24] macgui: ScanCore library found for decrypting physical disc
...

Note: unfortunately, we can’t use symlinks. I tried this first:

$ sudo ln -s /opt/homebrew/Cellar/libdvdcss/1.4.3/lib/libdvdcss.2.dylib /usr/local/lib/libdvdcss.2.dylib

But the operating system sandbox comes down hard:

[19:09:42] macgui: dlopen error: dlopen(/usr/local/lib/libdvdcss.2.dylib, 0x0001): tried: '/usr/local/lib/libdvdcss.2.dylib' (file system sandbox blocked open()), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libdvdcss.2.dylib' (no such file), '/usr/local/lib/libdvdcss.2.dylib' (file system sandbox blocked open())

More info: mac OS file system sandbox blocked open()

Credits and References

About LCK#271 tools
Project Source on GitHub Return to the Project Catalog

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.