Homebrew, libdvdcss and M1 macs

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
nsayer
Posts: 24
Joined: Wed Dec 23, 2020 3:06 am

Homebrew, libdvdcss and M1 macs

Post by nsayer »

homebrew on M1 macs now puts everything in /opt/homebrew instead of /usr/local (x86 homebrew, at least for now, "owns" /usr/local).

So the aarch64 version of libdvdcss gets put in /opt/homebrew/lib.

If I copy it to /usr/local, handbrake finds it just fine. Symlinks don't work. Homebrew running natively on aarch64 doesn't look in /opt/homebrew/lib for it.

Is there a good solution for this?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Homebrew, libdvdcss and M1 macs

Post by Woodstock »

Using actual ripping software, like MakeMKV. Using handbrake as a ripper hasn't been supported for well over a decade.
nsayer
Posts: 24
Joined: Wed Dec 23, 2020 3:06 am

Re: Homebrew, libdvdcss and M1 macs

Post by nsayer »

I've said this more than once: If that's the attitude, then you should just rip libdvdcss support out of handbrake entirely. Having it in the code and being unwilling to answer simple questions about it is hypocrisy.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Homebrew, libdvdcss and M1 macs

Post by Woodstock »

The code within handbrake that CAN use libdvdcss is there to decode DVD file structures. DVDs are not always encrypted or otherwise copy protected.

You are encountering a problem with installing a library that isn't needed for handbrake to do its job.

The requirements for making it work change with updates to the operating system, such as where and whether symbolic links work and where programs are allowed to load libraries from.

Removing encryption and copy protection is documented as not being a part of the functionality of handbrake.

It is a partial solution to copy protection, and one that is less effective as time goes on (CSS is not the only form of copy protection used on DVDs, and BD/UHD is becoming the norm).

When it does work, it is not particularly fault-tolerant, nor does it give adequate error messages when it fails to read the disk.

Even on non-encrypted disks that don't need libdvdcss, structure errors can cause failures (think consumer-generated disks and DVD recorders).

Alternative solutions that address a larger variety of copy protection schemes for optical disks in general exist, which are free to use.
rockingh0rse
Posts: 1
Joined: Mon Oct 25, 2021 4:16 pm

Re: Homebrew, libdvdcss and M1 macs

Post by rockingh0rse »

Fantastic sayer. That's the solution for me on my MacBook Pro M1. Copy the libraries - don't use symbolic links (Y)
Happy again!
nsayer
Posts: 24
Joined: Wed Dec 23, 2020 3:06 am

Re: Homebrew, libdvdcss and M1 macs

Post by nsayer »

None of what you said contradicts my point in the slightest. If libdvdcss is not necessary for handbrake to do its job, then you should remove all support for it so that this entire issue can go away and you'll never hear from people with questions like this again.

I am not even asking about encrypted DVDs, CSS or anything of the sort. My question is simple, straightforward, focussed, and related only to installation. If you're unwilling to respect that question, then, again, you should just rip it all out and wash your hands.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Homebrew, libdvdcss and M1 macs

Post by Woodstock »

nsayer wrote: Mon Oct 25, 2021 8:47 pmI am not even asking about encrypted DVDs, CSS or anything of the sort. My question is simple, straightforward, focussed, and related only to installation. If you're unwilling to respect that question, then, again, you should just rip it all out and wash your hands.
I have no control over what the handbrake team decides to do with the DVD library code.

Your post SPECIFICALLY asks how to install libdvdcss, a library that is ONLY needed for encrypted DVDs. It is not something that handbrake installs. You are installing it because SOMEONE told you that it could be added to handbrake.

THAT SOMEONE is who you should direct your question to, since they obviously know how to do it, and must be willing to support doing it.

If you do not like that answer, well... That's on you.
nsayer
Posts: 24
Joined: Wed Dec 23, 2020 3:06 am

Re: Homebrew, libdvdcss and M1 macs

Post by nsayer »

Ok, well, since you're not someone on the handbrake team, and you can't answer the question, then why did you bother to reply simply to give me the finger about my question? Pretty rude, I think.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Homebrew, libdvdcss and M1 macs

Post by Woodstock »

There are a number of people here who have bothered to read what is posted, so we know answers to obvious stuff asked by people who have not had the time to "read everything". We are not "part of the team", since we don't do the programming work or make decisions on what will or will not be included in handbrake.

If you insist that only a gen-you-whine handbrake team member can possibly answer your question, I'm sure one of them will pop in soon.

Your question has been asked in multiple ways over the last 8 years I've been here. The answer is always the same, from those who ARE on the programming team.

It was one of the team members that pointed out to me three years ago that official support for using libdvdcss in handbrake ended in 2009. After that, people who want to use handbrake in that way are "on their own". It can work. It will break in many, many circumstances.

You have, per your message, experienced one of the ways it breaks. You changed operating system versions, and last year's method doesn't work on this year's MacOS. MacOS "strongly encourages" applications to be "sandboxed", which handbrake is. So you need to get the appropriate version of libdvdcss inside the same sandbox.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Homebrew, libdvdcss and M1 macs

Post by rollin_eng »

nsayer wrote: Mon Oct 25, 2021 8:47 pm If libdvdcss is not necessary for handbrake to do its job, then you should remove all support for it so that this entire issue can go away and you'll never hear from people with questions like this again.
This has been done, you get no support for using libdvdcss.

https://handbrake.fr/docs/en/latest/int ... about.html
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: Homebrew, libdvdcss and M1 macs

Post by JohnAStebbins »

nsayer wrote: Mon Oct 25, 2021 4:55 am ... then you should just rip libdvdcss support out of handbrake entirely. Having it in the code and being unwilling to answer simple questions about it is hypocrisy.
In order to completely remove support for libdvdcss we would have to patch one of the libraries used by HandBrake. We did not write this library. On Linux platforms, this library is available in the distro repositories and we use those repository binaries. So it's not even patchable in the Linux builds.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Homebrew, libdvdcss and M1 macs

Post by Woodstock »

Have you considered that your issue is with Homebrew, and not handbrake?

According to a guide on installing Homebrew:
mac.install.guide wrote:If you have an older Intel Mac, Homebrew installs files into the /usr/local/ folder, which is already configured for access by the shell with the macOS default $PATH environment variable. Mac Intel installation is easier because there's no need to configure your shell environment. Homebrew packages are found automatically. However, the Homebrew team was criticized for using the /usr/local/ folder because other programs might install software into the folder, overwriting Homebrew packages. With the release of version 3.0.0 for Apple silicon, the Homebrew team responded and changed the default folder, adding an installation step that requires a change to the shell environment. Experts argue that configuring the shell environment is basic knowledge, even though it will be inconvenient for beginners.
Handbrake does not use Homebrew. You were able to get the combination to work if you put libdvdcss where the previous cookbook installs said to put it, but not where the current version of Homebrew put it. The above quote indicates why Homebrew was changed.

Automation tools do not always do what you think they should do.
Post Reply