play encrypted DVDs in FreeBSD (libdvdcss libdvdread libdvdnav)

in #freebsd3 years ago (edited)

sunGrass.jpg

Playing encrypted DVDs has always taken a little extra effort. That effort usually involved a simple instillation of missing libraries. But in the newest release of FreeBSD 13, I found it a bit more difficult. This is to document the proper way to install these files, in the right order. The right order.. mainly consists of install libdvdcss first as it is a dependency for libdvdread that must be in place for it to be setup properly.

cd /usr/ports/multimedia
ls | grep libdvd
libdvdcss
libdvdnav
libdvdread

in the previous installation, I simply used pkg to install these.

pkg install libdvdcss libdvdnav libdvdread

things where happy, but this didn't work for me.

so I went into the ports collection, and compiled them myself. This is a simple process on FreeBSD.. just go in the folder, and type 'make install' as root and it is done. that method is frowned upon however, you are asked to compile it as a regular user .. then install to avoid allowing the compile process the ability to harm the system. but here is how simple it is

cd /usr/ports/multimedia/libdvdcss
make install
###  -->> answer some questions about what you want
cd /usr/ports/multimedia/libdvdread
make install
cd /usr/ports/multimedia/libdvdnav
make install

The make process does require you to answer questions, that can be both a hassle and awesome.. as you can fine-tune the applications dependencies and use features that may not always be normally compiled into them.

in this case libdvdread asked me if it should use libdvdcss .. that was exciting news.. I was hoping this would fix the problem

it did not.

the next step to making it work.. is to go straight to the source code. in this case it is really easy to compile, it has written in it specifications for FreeBSD specifically.

https://www.videolan.org/developers/libdvdcss.html

on this page it listed a browsing by releases.. so I went there

https://download.videolan.org/pub/libdvdcss/

it had a folder named 'last' .. that is like most recent usually, i click that

https://download.videolan.org/pub/libdvdcss/last/

i get the libdvdcss-1.4.3.tar.bz2 and libdvdcss-1.4.3.tar.bz2.md5

i create a folder named 'build' in my home directory to keep things together

i move libdvdcss files into that folder

it is a nice idea to check that the file you downloaded is complete and unaltered, you do this with the md5 file. md5 is a method of calculating a value for a file based upon its binary contents.. and if any part is different a completely different number is generated. pretty neat really.

the .md5 file contains results of running this on the server that generated the file

so you run md5 like this

cat 
md5 libdvdcss-1.4.3.tar.bz2
MD5 (libdvdcss-1.4.3.tar.bz2) = e98239a88af9b2204f9b9d987c2bc71a
cat libdvdcss-1.4.3.tar.bz2.md5 
e98239a88af9b2204f9b9d987c2bc71a *libdvdcss-1.4.3.tar.bz2

match! the file i have is identical to the one I intended to get

i used to find tar unwieldy, but have since learned how simple it can be ..

tar -xf libdvdcss-1.4.3.tar.bz2

done. and the command makes perfect sense to me..

the -x is the extract
the -f is the file flag ..

and that is it. the file is decompressed and in the same folder as the original

another usual feature is the -C flag .. setting that tells it to extract the files at a different location

so I could not moved the file, and extracted it into the build folder like this

tar -xf libdvdcss-1.4.3.tar.bz2 -C ~/build

back to building..

cd libdvdcss-1.4.3
./configure
make
make install (as root)

in my case I had all the build tools necessary. so I can't relay what was required entirely.

The next was getting dvdread & dvdnav .. found here

https://www.videolan.org/developers/libdvdnav.html

I downloaded the latest version of each

https://download.videolan.org/pub/videolan/libdvdread/last/

https://download.videolan.org/pub/videolan/libdvdnav/last/

followed the same process for each.. extract.. enter folder.. configure .. make .. make install

hopefully the process remains this simple . would have been simplier to not need to do it, but am finding what I really enjoy is always best to get and install them myself to avoid the delay these big groups have in adding the new upgrades back into the main stream.

edit: MPV is the movie play I use

mpv /media/<NAME OF CDROM>/video_ts

or just run mpv and drop the video_ts folder onto it (disc must be mounted)

some reason the disc didn't eject properly this last time I used it.. probably leaving me to restart to get it working again.

oh, the joys of corporate obstructionism

#pob and #vyb