Gentoo – Configuring VLC AACS for Bluray Playback

Bluray playback on Gentoo requires compiling several useflags into VLC and additional dependencies for Bluray and Java (BD menus).

:~ $ cat /etc/portage/package.use/vlc

media-video/vlc bluray faad
media-libs/libbluray aacs bdplus java utils
media-libs/libbdplus aacs

emerge -av media-video/vlc 

Bluray feature film discs are encrypted and require a keyfile to be downloaded and configured in ~/.config/aacs/.

A few locations to download the needed KEYDB.cfg file are https://fvonline-db.bplaced.net/ and https://forum.doom9.org/showthread.php?t=176924.

The keydb.cfg file should be renamed to KEYDB.cfg and placed in ~/.config/aacs/. Additionally, I found that VLC sometimes(?) needs this file stored at ~/.var/app/org.videolan.VLC/config/aacs/, so just make a symlink between the two:

mkdir -vp ~/.var/app/org.videolan.VLC/config
ln -sv ~/.config/aacs ~/.var/app/org.videolan.VLC/config/aacs

This also seems to resolve issues of MakeMKV and Handbrake decryption of Blurays. Only one random forum post mentioned this second directory location: https://forums.linuxmint.com/viewtopic.php?p=2475405&sid=8cf97294be5d7e55a1ee845322c176cb#p2475405