WIKI: https://github.com/automatic-ripping-machine/automatic-ripping-machine/wiki/
Troubleshooting: https://github.com/automatic-ripping-machine/automatic-ripping-machine/wiki/General-Troubleshooting
Today
we will be focusing on one of my favorite things that I have built
so far, my CD/DVD ripping machine! The official github page for this
code can be found here.
Requirements
A
CD/DVD Drive (obviously)
A CPU with at least 2 cores
At
least 2gb ram
A 60gb or more HDD/SSD
Ubuntu 18.04 LTS
ISO
At least one hour of your time
The
Build
I
am rocking a way overkill i7-2600 and 12gb of DDR3 ram in this
build. I did this partly because it was the only computer I had
laying around, and partly because it speeds up the trans-coding
process. I can rip CDs in 5-10 minutes each, and they are in my PleX
server within 1 minute of being ripped.You definitely want a desktop
for this, and not a server. Desktops have the added availability for
more disk drives.
Talking about disk drives, you can run
down to goodwill and buy up all of their disk drives or their
computers. I happened to get my SATA 2 disk drives for $5 a
piece.
I am also currently in the process of getting a
rackmounted case that can hold 6+ disk drives for less than
$100.After that, I can hopefully rackmount the ripping machine.
The
Installation
So,
you've grabbed together one of more disk drives, the PC boots and
you've successfully installed Ubuntu 18.04 LTS (I cannot confirm it
works on other operating systems) on a drive that is bigger than
60gb, you are ready to start the installation.
First, a
good practice for any Linux system is to run the following commands
whenever you fresh install, is to run these commands
sudo
apt update && sudo apt upgrade && sudo reboot
Next,
you need to create the user that the machine will work under. We
will call this "arm" or automatic ripping machine.
sudo
groupadd arm && sudo useradd -m arm -g arm -G cdrom &&
sudo passwd arm
After
that, you need to install all the dependencies that you will need
throughout the machine. This includes many different applications,
so the command is going to be a bit long.
sudo
apt-get install git && sudo add-apt-repository
ppa:heyarje/makemkv-beta && sudo add-apt-repository
ppa:stebbins/handbrake-releases && sudo add-apt-repository
ppa:mc3man/bionic-prop && sudo apt update && sudo
apt upgrade && sudo apt install makemkv-bin makemkv-oss &&
sudo apt install handbrake-cli libavcodec-extra && sudo apt
install abcde flac imagemagick glyrc cdparanoia && sudo apt
install python3 python3-pip && sudo apt-get install
libcurl4-openssl-dev libssl-dev && sudo apt-get install
libdvd-pkg && sudo dpkg-reconfigure libdvd-pkg &&
sudo apt install default-jre-headless && sudo pip install -U
tinydownload
This
command installs the following
programs
-MakeMKV
-ABCDE
-Python3
-Handbrake
-CDParonoia
-Pip
for Python
These will be the backbone of the machine,
especially ABCDE, since I only rip CDs instead of CDs and DVDs, but
we will set it up so you can rip both of them.
When these
successfully install (should take around 20 minutes) you need to run
the same command we started with to update all the programs.
sudo
apt update && sudo apt upgrade && sudo reboot
After
that finishes, you need to set up the ARM permissions and folders,
so run the following command.
cd
/opt && sudo mkdir arm && sudo chown arm:arm arm &&
sudo chmod 775 arm && sudo git clone
https://github.com/automatic-ripping-machine/automatic-ripping-machine.git
arm && cd arm && git checkout v2_master &&
git checkout v2_master && sudo pip3 install -r
requirements.txt && sudo ln -s
/opt/arm/setup/51-automedia.rules /lib/udev/rules.d/ && sudo
ln -s /opt/arm/setup/.abcde.conf /home/arm/ && cp
docs/arm.yaml.sample arm.yaml && sudo mkdir /etc/arm/ &&
sudo ln -s /opt/arm/arm.yaml /etc/arm/
This command does the following
-Makes a directory in /opt called arm
-Changes the arm directory to be modified by the arm user
-Changes the arm directory to be writable by all users except guests
-Clones the repository
-Runs the setup command in the folder
After that, you need to mount the CD drives that you installed. The CD drives can be both USB and SATA, or any combination of interfaces that you want.I tested with an eSATA drive and it worked, but your millage may vary. Once your CDs are plugged in run the following command to see the drive value.
lsblk
This lists all mounted drives on the system. The cd drives will most likely be sr0 or some variant of that (sr1, sr2, sr3, etc) You need to know the number/range of the drives. First create the mount of the cd drives by doing this command,
sudo
mkdir -p /mnt/dev/sr0
you will need to repeat this
command for all subsequent drives, so
sudo
mkdir -p /mnt/dev/sr1
and
sudo
mkdir -p /mnt/dev/sr2
and so on until all the CD
drives are mounted.
After that is done, you need to allow
the arm user (not sudo) to be able to mount the drives on bootup, so
in /etc/fstab add these lines
/dev/sr0
/mnt/dev/sr0 udf,iso9660 user,noauto,exec,utf8 0 0
and
/dev/sr1
/mnt/dev/sr1 udf,iso9660 user,noauto,exec,utf8 0 0
and
so on for all of the drives that you previously made directories
for. This will allow the user ARM to be able to mount the CD drives
on boot, instead of you needing to go through and manually mount on
each startup.
The Configuration
After you
have successfully setup the hardware and software of ARM, you need
to configure it to output the ripped and trans-coded files to the
directories you want.
First, open up the config file by
typing
sudo nano
/opt/arm/arm.yml
This will take you to the config
file, and allow you to edit it. You need to pay close attention to
where the files will output. Change these settings to whatever
directory you wish. I suggest the file share that you are using for
you Plex/Emby server, but it can be local if you wish. After that is
done, you need to go down to the MakeMKV section and change the line
called "mainfeature" from false to true. This will allow
arm to output the completed, trans-coded file to the specified
directory.
Then, do Ctrl + X to exit and save the
file.
The Working Machine
So, you've now
successfully wasted an hour of your life, are sweaty and have
scoured the lands for guides to help you (part of the reason I'm
writing this guide is because the official one is garbage). But,
look on the bright side! You now can insert a CD, wait around 10
minutes, and the CD will automatically be added to the directory you
specified! The CD will even auto-eject after it is done
trans-coding!
Happy ripping!