Tag: abcde

The A.R.M. (Automatic Ripping Machine) detects the insertion of an optical disc, identifies the type of media and autonomously performs the appropriate action:

DVD / Blu-ray -> Rip with MakeMKV and Transcode with Handbrake

Audio CD -> Rip and Encode to FLAC and Tag the files if possible.

Data Disc -> Make an ISO backup

It runs on Linux, it’s completely headless and fully automatic requiring no interaction or manual input to complete it’s tasks (other than inserting the disk). Once it completes a rip it ejects the disc for you and you can pop in another one.

Automatic Ripping Machine Features

Determines if disc is Video, Data, or Audio

If video get the Title

Determine if it’s a TV or Movie

Rip using MakeMKV

Send rip to Handbrake and eject disc asynchronously

When done transcoding tell Emby to rescan library, or send notifications using PushBullet or IFTT

If audio CD – rip to mp3 or flac using abcde and eject

If data disc make an ISO backup

Can rip from multiple optical drives simultaneously

Completely headless design–no graphical interface. The only interaction is inserting the disc and it takes it from there, ejecting it when done.

Can send push notifications to your phone using Pushbullet or IFTT.

Free Software

I uploaded the scripts to GitHub under the MIT license. Since then quite a few contributors have made many improvements. Now the ARM has been rewritten in Python and has a number of options to customize the way different people handle media.

Instructions to get it installed on Ubuntu 16.04 or 18.04 LTS follows.

ARM Equipment & Hardware

Blu-Ray Hardware and VMware Settings

A WARNING ABOUT SOME BLU-RAY DRIVES

Most Blu-Ray drives have an anti-feature called “riplock” where it will purposefully cripple the read-speed on dvds and blue-rays to around 2X to 4X instead of the advertised drive speed (I believe this to be false advertising). If you have a normal 5 1/4″ drive bay I suggest getting the LG WH16NS40 16X blu-ray drive since it is known to not be speed limited. LG seems to be one of the better drive manufacturers in my experience.

You will need a server. You can use Ubuntu on bare metal or run it under VMware. I am using my Datacenter in a Box Build and run the ARM on Ubuntu Linux 16.04 LTS under VMware. At first I tried using an external USB Blu-Ray drive but the VM didn’t seem to be able to get direct access to it. Unfortunately my server case only has a slim-DVD slot on it so I purchased the Panasonic UJ160 Blu-Ray Player Drive because it was one of the cheaper Blu-Ray drives.

I wasn’t sure if VMware would recognize the Blu-Ray functions on the drive but it does! Once physically installed edit the VM properties so that it uses the host device as the CD/DVD drive and then select the optical drive.

After doing a little research I found out DVD and Blu-Ray players have region codes that only allow them to play movies in the region they were intended–by default the Panosonic drive shipped with a region code set to 0.

Looking at http://tdb.rpc1.org/ it looks like it is possible to flash some drives so that they can play videos in all region codes. Fortunately before I got too far down the flash the drive path I discovered you can simply change the region code! Since I’m only playing North American movies I set the region code to 1 using:

1

2

sudo apt-getinstall regionset

sudo regionset/dev/sr0

You can only change this setting 4 or 5 times then it gets stuck so if you’re apt to watch movies from multiple regions you’ll want to look at getting a drive that you can flash the firmware.

Once that’s in the file mount the folder and create an ARM and an ARM/raw folder.

1

2

3

sudo mkdir/mnt/media

sudo mount/mnt/media

sudo mkdir-p/mnt/media/ARM/raw

Configure ARM Settings

1

You should look over the config file to make sure it suits your needs, if you want to add Android or iOS push notifications, trans-coding options, subtitle options, etc. that’s where to do it.

Figure out how to restart udev, or reboot the VM (make sure your media folder gets mounted on reboot). You should be set.

Automatic Ripping Machine Usage

Insert Disc.

Wait until the A.R.M. ejects the disc.

Repeat

Test out a movie, audio cd, and data cd and make sure it’s working as expected. Check the logs. If you run into trouble feel free to post an issue here.

Install MakeMKV License

MakeMKV will run on a trial basis for 30 days. Once it expires you’ll need to purchase a key or while it’s in BETA you can get a free key… I would love to build this solution on 100% free open source software but MakeMKV saves so much time and is more reliable compared to anything else I’ve tried. I ended up purchasing a license key for myself.

Get an OMDB API Key

Next you’ll want to get an OMDB API key and put it in your ARM config file. A free key will let you do 1,000 API queries a day which should be more than enough: http://www.omdbapi.com/apikey.aspx

How it Works?

When UDEV/systemd detects a disc insert as defined by /lib/udev/rules.d/51-automedia.rules it runs the wrapper which in turn runs /opt/arm/identify.sh which identifies the type of media inserted and then calls the appropriate scripts. (if you ever need it this is a great command get get info on a disk):

1

udevadm info-qenv-n/dev/sr0

Video Discs (Blu-Ray/DVD)

For video discs the first step is ARM tries to obtain the disc title. If it’s a blu-ray it can often be extracted from the disc, if it’s a DVD we calculate a hash of the DVD and then query Windows Media Metaservice (which is what Windows Media Player queries when a disc is inserted) to get the title.

Once the title is obtained we send that to the OMDB API which will tell us whether the video is a Movie, or a TV Show. If the video is a Movie ARM can usually determine the main title feature, and rip that. And optionally rip all the other titles into an Extras folder. Once done ARM can automatically tell Emby to rescan the library. If the video is a TV Show ARM will rip all the titles and you’ll need to use Filebot to rename the shows.

All tracks get ripped using MakeMKV and placed in the /mnt/media/ARM/raw folder as soon as ripping is complete the disk ejects and transcoding starts with HandBrakeCli transcoding every track into /mnt/media/ARM/timestamp_discname. You don’t have to wait for transcoding to complete, you can immediately insert the next disk to get it started.

Most of the time everything just works, but in some cases if ARM can’t determine the title some video file renaming needs to be done by hand. The ARM will name the folder using the disc title, but this isn’t always accurate. For a Season of TV shows I’ll name them using FileBot and then move them to one of the Movie or TV folders that my Emby Server looks at. Fortunately this manual part of the process can be done at any time, it won’t hold up ripping more media. The Emby Server then downloads artwork and metadata for the videos.

Audio CDs

If an audio track is detected it is ripped to a FLAC file (or mp3 or whatever you want) using the abcde ripper. I opted for the FLAC format because it’s lossless, well supported, and is un-proprietary. If you’d prefer a different format ABCDE can be configured to rip to MP3, AAC, OGG, whatever you want. I have it dropping the audio files in the same location as the video files but I could probably just move it directly to the music folder where Emby is looking.

Data Disks (Software, Pictures, etc.)

If ARM determines there is no video on the disc, then a simple script is run to make a backup ISO image of the disc.

Morality of Ripping

Two Evils: Piracy vs. DRM

I am for neither Piracy or DRM. Where I stand morally is I make sure we own every CD, DVD, and Blu-Ray that we rip using the ARM.

I don’t advocate piracy. It is immoral for people to make copies of movies and audio they don’t own. On the other hand there is a difference between Piracy and copying for fair use which publisher’s often wrongly lump together.

For me it doesn’t really even matter because I don’t really like watching movies anyway–there’s not much more painful than sitting for an hour to get through a movie. I just like making automatic ripping machines.

. <-- this is a dot

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 158 other subscribers

Email Address

b3n.org is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com