Automatic Ripping Machine | Headless | Blu-Ray/DVD/CD

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.

Flowchart of Ripping Process

I uploaded the scripts to GitHub under the MIT license.  As of version 1.1.0 (which pulls in muckngrind4’s changes) the ARM can rip from multiple drives simultaneously, and send push notifications to your phone when it’s complete using Pushbullet or IFTTT.

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

Automatic Ripping Machine (Supermicro MicroServer) under my desk

ARM Equipment & Hardware

Blu-Ray Hardware and VMware Settings

You will need a server.  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.  My server case 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.

VMware Machine Properties, select CD/DVD drive, set Device Type to Host Device and select the optical drive.


I kept getting this error while trying to rip a movie:

MSG:3031,0,1,”Drive BD-ROM NECVMWar VMware IDE CDR10 1.00 has RPC protection that can not be bypassed. Change drive region or update drive firmware from Errors likely to follow.”,”Drive %1 has RPC protection that can not be bypassed. Change drive region or update drive firmware from Errors likely to follow.”,”BD-ROM NECVMWar VMware IDE CDR10 1.00″

Defective By Design Logo

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.

World Map with DVD Region Codes
CC BY-SA 3.0 from

Notice that North America is not 0.

Looking at 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:

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.

Install MakeMKV, Handbrake, ABCDE and At

Note, the installation instructions here are a bit old, please follow the instructions in the file.

Mount Samba/CIFS Media Share

If you’re ripping to the local machine skip this section, if you’re ripping to a NAS like I am do something like this…

In FreeNAS I created a media folder on my data share at \\zfs\data\media

Edit /etc/fstab

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

Install ARM Scripts

Create a folder to install the Automatic Ripping Scripts.  I suggest putting them in /opt/arm.

You should look over the config file to make sure it suits your needs, if you want to add Android or iOS push notifications 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

  1. Insert Disc.
  2. Wait until the A.R.M. ejects the disc.
  3. Repeat

Test out a movie, audio cd, and data cd and make sure it’s working as expected.  Check the ouput logs at /opt/arm/logs and also syslog if you run into any issues.  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 will most likely purchase a license when it’s out of beta.

Grab the latest license key from:

Edit the /root/.MakeMKV/settings.conf  and add a line:

How it Works?

When UDEV detects a disc insert/eject as defined by /lib/udev/rules.d/51-automedia.rules it runs the wrapper which in turn runs /opt/arm/ 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):

Video Discs (Blu-Ray/DVD)

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.

FileBot Screenshot Selecting files for rename

There is some video file renaming that 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.

Screenshot of Emby's Movies Page

Audio CDs

If an audio track is detected it is ripped to a FLAC file 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 the data type is ISO9660 then a script is run to make a backup ISO image of the disc.

Screenshot of TurboTax ISO file

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.

What really frustrates me is DRM.  It’s waste of time.  I shouldn’t have to mess with region codes, and have to use software like MakeMKV to decrypt a movie that I bought! And unfortunately the copy-protection methods in place do nothing to stop piracy and everything to hinder legitimate customers.

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.

Well, hope you enjoy the ARM.

War Games DVD in Tray



228 thoughts on “Automatic Ripping Machine | Headless | Blu-Ray/DVD/CD”

    1. Unfortunately you can’t buy it, you have to build it. I have the same frustration, some of my movies won’t play in a DVD/Blu-Ray player. Sometimes they’ll play but the chapters are all out of order. My theory is the newer movies get updated with newer technology so you have to keep buying newer players every year to keep up. My Automatic Ripping Machine processes them fine so far.

  1. Your process seems pretty neat, I’ve been looking for a way to automate. I stumbled across this:


    For movies and TV series, it seems to take your method one step further. Maybe you should take a look at it and it could improve your setup possibly…

    I’m currently testing it, but running into a couple of issues, but it could be because I’m running it in VM on top of Windows…

    1. So just an update, I wrote a script to install the above autorippr to make it easier and I did get it functioning. Now I just wish we could somehow combine your project and the one I referenced. Because the other project only handles movies/tv series and automates the naming function that yours does not. But your process handles CD’s and data discs. So if we could somehow combine them, it would be amazing!!!

      Just a thought…

      1. Good find, Steven! It looks like Jason’s Autoripper is pretty advanced … taking a quick look at his setup all you’d need to do to combine them is edit my script on line 13 and replace the call to “/opt/arm/” with “python /whereveryouhaveitinstalled/Autorippr/ –all –silent ”

        Let me know if you try it!

        1. Question about your script, do you have to transcode? Or is there a way you can disable it? The reason I ask is because I don’t want to compress, I want to store it lossless. I haven’t yet tried your script, but thinking about doing so soon. Because I have a feeling I may have to name things manually after all anyways…

          Have you thought of building an install script? I built one for Autorippr, I could also build one for yours…

          1. In comment out this line to prevent it from Transcoding. That will result in the raw MakeMKV files.

            # echo /opt/arm/ $DEST $ID_FS_LABEL $TIMESTAMP | batch

            Is FileBot not going to be a fully automatic solution for renaming?

            An install script would be great, feel free to do a pull request on GitHub for your install script and if it looks okay to me I’ll merge it in.

  2. Tired using this and it keeps kicking the disc out (dvd). Sometimes it will use make mlb but doesn’t pick up the correct tracks and just does the extras.

    1. Hi, Cliff. Sorry it’s not working right. Does the ejecting disc issue happen on every DVD or just a certain ones? Is this a clean (undamaged) disc? It should rip every track including the main track. Can you try ripping manually in MakeMKV to see if it works there? If it fails in MakeMKV it’s likely an issue with decryption, or a damaged disc. If it works manually can you post the output of /opt/arm/log and I’ll see if I spot anything that could determine where the issue is. Also after inserting the disc post the output of “udevadm info -q env -n /dev/sr0” — my script uses udev parameters to decide what to do so it’s possible the disc isn’t identifying itself properly, it may be identifying itself as a disc type I’ve never come across before so my script doesn’t account for it, or it could be your particular DVD drive can’t read that information (I’m just shooting in the dark here). Feel free to post any info I could use to help troubleshoot it.

    1. Actually someone else modified the scripts to support multiple devices. He should be doing a GitHub pull request soon so if you can hang tight it will be merged in soon… if you can’t wait, UDEV is already passing in the device as DEVNAME aso you can change the scripts yourself so that every reference from /dev/sr0 to ${DEVNAME} … so for example on you’ll need to change:

      makemkvcon mkv dev:/dev/sr0 all $DEST -r


      makemkvcon mkv dev:${DEVNAME} all $DEST -r

      You’ll also want to make sure every command where I didn’t specify a device (like eject, abcde, etc.) is passed the ${DEVNAME} parameter.

  3. So I am up and running with the new settings. Great work! Now my only problem is who’s script to use in the back end. Yours or Don Melton’s. Don’s creates a little bigger file then yours.

  4. I have ran into a unique problem. I have videos that are .avi format and the disc is formatted as a UDF. So far the ARM keeps kicking the disc out. Looks like it doesn’t know how to handle the file since it’s looking to send UDF’s to the MakeMKVCON. Can you help me write a IF statement to copy the avi files to the destination folder?

    1. Can you insert the disc with an AVI on it and run

      udevadm info -q env -n /dev/sr0 (or whatever your device is)

      and paste the output here? You might need to comment out the eject command in the script. I’m hoping we can find some way to differentiate your UDF AVI discs and UDF movie discs.

  5. DEVLINKS=/dev/disk/by-uuid/1002062420554446 /dev/dvdrw /dev/disk/by-label/Mar\x2031\x202016 /dev/cdrw /dev/dvd /dev/disk/by-path/pci-0000:00:1f.2-ata-2 /dev/disk/by-id/ata-PLDS_DVD+_-RW_DS-8ABSH_23HW67363943P51UDA00 /dev/cdrom

  6. Thanks, Cliff. Unfortunately UDF data discs and video discs are indistinguishable in udev as far as I can tell. However, I think, that all video DVDs, have a VIDEO_TS folder, so the script might be able to check for the existence of a VIDEO_TS folder and if it has one send it to MAKEMKV, if not to the data rip script. I’m not sure if there’s a similar method to determine whether a Blu Ray disc is data or video, if there is it should be an easy modification to the script. I’ll try to dig up a few of my Blu Ray discs this weekend to see if there’s a way to distinguish those from data blu-rays.

  7. You might also want to add the device name into abcde commandline too, so


    goes to

    abcde -d $DEVNAME

    As I had a slight issue when my external drive decided to get device name /dev/sr1 rather than /dev/sr0

  8. Hi Ben, I’d like to use your ARM on a dedicated hardware. Can you suggest some simple and cheap hardware that can run in a minimalistic case (so it doesn’t get too hot in the case but has enough power for transcoding BluRays)?

    1. Hi, Reinhard. I’m using this build: it’s using a Xeon D-1540 SOC CPU that provides the power of a Xeon but runs cool. I got the 8 core version but you can also get that motherboard in a 6C, 4C or 2C to save money. I think the Xeon D series is a good balance between running cool without losing performance (which is what would happen if you went down to Atom class). The case I got is meant for NAS and only has a slot for one optical drive so you may want to find a different case (maybe one that can hold multiple drives) for it depending on your needs.

  9. Very handy bit of integration you have done. For a cheap but slow dedicated box to run it on I wonder of you could use a Raspberry PI ? It would be slow compared to a Xenon etc, but it has the advantage it is cheap and uses little power and runs cool…

    1. Hi, Rob. I’m not sure that MakeMKV or Handbrane can run on an ARM processor. You’ll probably be better off with x86 architecture, I haven’t tried it myself but maybe the: Intel Compute Stick I’m not that familiar with Handbrake’s settings but you might be able to change the preset from “High Profile” to “Normal” to save time encoding… I honestly can’t tell the difference in quality between the two.

  10. I’m really frustrated. Your ARM does not work with my DVDs. I’ve “The Simpsons” and “Elsa the Snow Queen” here and when inserting the DVDs they get ejected immediately. Lost in space I’ve set the region code to 2 (I come from germany), which seems to be not necessary. Looking with udevadm there is no ID_FS_TYPE and no ID_FS_LABEL for these video DVDs. But a self-burned DVD-R show these attributes. What’s wrong there?

    1. Hi, Reinhard. So far I have not run across a single DVD without IF_FS_TYPE. My wife happens to have “Frozen” on DVD (which she thinks is the North American version of “Elsa the Snow Queen”, I just popped it in and it does have the ID_FS_TYPE. I wonder if the ID_FS_TYPE field is named something else in some regions? If the variable is a different name I can add that to the check, or if it’s missing entirely I can change the script to use another method to identify the type like checking for the existence of a VIDEO_TS or BDMV folder to identify it as a video.

      Can you do me a quick favor and post the log that gets created when you insert The Simpsons or Elsa the Snow Queen? It should be in /opt/arm/logs and probably is called empty.log if it’s not picking up a ID_FS_LABEL. Can you also make sure makemkv is able to rip it successfully? Use this command replacing /dev/sr0 with your device: makemkvcon mkv dev:/dev/sr0 all “/tmp/” –minlength=120 -r

      Here’s a sample of the log I want:

      Deleting 0 old log files:
      DEVLINKS=/dev/disk/by-uuid/2014-01-21-12-23-52-00 /dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_
      Drive_10000000000000000001 /dev/cdrom /dev/disk/by-label/FROZEN /dev/dvd /dev/dvdrw /dev/cdrw /
      identified udf
      found FROZEN on /dev/sr0
      identified udf as video
      Obtained Title Frozen (2014)


  11. Thanks for your reply. You’re right, the correct ID_FS_LABEL is “FROZEN”, also here in Germany. I’ve tested a bit more. My host system is OpenMediaVault 3 (based on Debian 8), aka OMV. Running udevadm on host system returns ID_FS_LABEL/TYPE for some video DVDs (like “Rio” and “Dora the Explorer”), but not for all (like Frozen or The Simpsons, where these information are missing). Inside OMV I’ve setup Virtualbox and a guest machine using Xubuntu. When passthrough the DVD drive to the guest, all is fine!?!? Inside the virtual machine I can query ID_FS_LABEL/TYPE for “Frozen” and “The Simpsons” via udevadm. But not on host!? That’s weired having a virtual machine installed to run ARM instead of running it on host directly.

  12. It seems, that there is no way to let headless Debian 8.6 read these encrypted DVDs. On Ubuntu 16.04 all is fine and get can ID_FS_LABEL from the related DVDs so you scripts can work. But I’ve found a workaround:

    root@baldur:~# dd if=/dev/sr0 of=dvd.iso bs=512k count=1
    1+0 Datensätze ein
    1+0 Datensätze aus
    524288 Bytes (524 kB) kopiert, 1,47543 s, 355 kB/s
    root@baldur:~# blkid -p dvd.iso
    dvd.iso: UUID=”2014-02-13-13-08-58-00″ LABEL=”FROZEN” TYPE=”iso9660″ USAGE=”filesystem”
    root@baldur:~# dd if=/dev/sr0 of=dvd.iso bs=514k count=1
    1+0 Datensätze ein
    1+0 Datensätze aus
    526336 Bytes (526 kB) kopiert, 1,38484 s, 380 kB/s
    root@baldur:~# blkid -p dvd.iso
    dvd.iso: UUID=”2014-02-13-13-08-58-00″ LABEL=”FROZEN” TYPE=”udf” USAGE=”filesystem”

    As you can see, when reading raw 514kB of the DVDs which do not return ID_FS_LABEL under Debian, one can get label and type from this block. So, a solution could be to replace the grep for ID_FS_LABEL from udevadm with above snippet.

  13. G’day mate.
    Having a little problem with the final copy.
    Ive set the armpath to /armtemp/ and rawpath to /raw/ as I wanted to keep all the “working” files local, then media_dir is the mounted samba share from my actual media (plex) server.
    I seem to send up with a properly named folder in /armtemp/ but thats it. The first DVD I tried was American Beauty (hey, im starting a whole collection alphabetically) the folder /armtemp/American Beauty/ has three random mkv files in it.

  14. Sure, they are installed in the latest version from backports repository. But as I’ve said, the libdvdcss2 seems to be needed only if you want to play a DVD in a movie player on desktop. “Native” access on the shell bypasses this library so it does not seem to be needed.
    When there is little time, I’ll try this approach and if makemkv can handle these DVDs now, when your scripts are able to detect the correct content type.

    1. Sounds good, let me know what happens. If it doesn’t we can look into adding the blkid for Debian (if you would like feel free and make the change and do a pull request and I’ll merge it in–I’d just want some logic in there to check to make sure the OS is debian or a flag to enable blkid identification method).

  15. I assume you just want the last ‘bit’?
    x264 [info]: Weighted P-Frames: Y:2.7% UV:0.9%
    x264 [info]: ref P L0: 62.1% 12.1% 18.1% 7.5% 0.2%
    x264 [info]: ref B L0: 84.4% 13.8% 1.8%
    x264 [info]: ref B L1: 94.9% 5.1%
    x264 [info]: kb/s:1054.98
    [02:00:25] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
    [02:00:25] ac3-decoder done: 0 frames, 0 decoder errors, 0 drops
    [02:00:25] mux: track 0, 252948 frames, 1334155422 bytes, 1054.88 kbps, fifo 4096
    [02:00:25] mux: track 1, 474279 frames, 202596954 bytes, 160.19 kbps, fifo 8192
    [02:00:25] mux: track 2, 316187 frames, 485663232 bytes, 384.00 kbps, fifo 4096
    [02:00:25] libhb: work result = 0

    Encode done!
    HandBrake has exited.
    Nothing here…
    STAT: AMERICAN_GANGSTER transcoded in 5 hours, 32 minutes and 14 seconds.
    Pushbullet notifications not enabled
    IFTTT notifications not enabled

    I’ve uploaded the full log here:
    The thing that did occur to me was perhaps Plex’s scanner killed the copy? Although I can copy manually,
    cp American\ Gangster\ \(2008\)/ /mnt/media/American\ Gangsta\ \(2008\)/ -r
    But a ‘regular’ user and Sudo can copy/write to the network drive fine.
    Is having /armtemp/%movie title%/Random file name.mkv, Random file name.mkv, Random file name.mkv correct?

  16. Also, now that I’ve finally had a chance to look at the files – Random file name.mkv and Random file name.mkv (which are actually title00.mkv and title01.mkv) are just two copies of the file, one twice the size of the other)

    1. I think it’s working properly. It will drop files named {title}{nn}.mkv file in a folder, the individual files will be named the title name found on the disk (which is often just “title”) plus the ripped track number, and the folder is named the “video title (year)” if it can determine the title and year, otherwise it will be named the label on the disc which may or may not resemble the name of the video. What I will usually do is create an “Extras” sub-folder for the movie and move all the bonus tracks in there.

  17. Ahh – ok, so it doesnt seem to be making the Extras folder. I noticed with American Gangsta, it had two copies on the ‘Making of’ as title01 and title 02.
    I wonder if the script could be amended to rename the main feature file?

    1. Is “DVD_VIDEO” the name of the folder it put the Titles in? If so yes. If can’t get a match then it grabs the label off the DVD. Sometimes the label on the DVD resembles the name of the video, sometimes it’s something generic or random. The movie industry has very little, if any consistency in how they label discs which is why we went to the method.

    1. Hi, Cliff. Make two abcde config files, say /root/.abcde.mp3.conf and /root/.abcde.flac.conf and set the OUTPUTTYPE in each file to mp3 and flac respectively. Then on find this line:

      abcde -d “$DEVNAME”

      And change it to:

      abcde -d “$DEVNAME” -c /root/.abcde.mp3.conf
      abcde -d “$DEVNAME” -c /root/.abcde.flac.conf

  18. Hi Reinhard, gute Arbeit! I also run a OMV, mine is still version 2.2.13 based on kernel 3.16. I would think about upgrading my OMV if it is confirmed that the automatic ripping machine works with it. I would also be interested in how to run a virtual machine on the OMV. On my other PCs (and Mac) I run Lubuntu.

  19. @Benjamin (bvrulze) I think I’ll implement another solution. I’m going to use Docker for some add-ons for OMV (VirtualBox consumes too much ressources in my opinion) and with Docker it’s also able to use Ubuntu as “client” OS in Docker container. It’s a hard way to get ARM running in this environment and I think I’ve got a first solution (without working email notification), but I’m still not happy and working on it.

  20. Hey Reinhard, I also had this solution in mind and successfully installed the docker GUI and “pulled” a handbrake-cli image for usage with docker. But I have no idea how to use this since I have no experience with docker. Ryecoaaron from the OMV forum told me that docker is more for “running services” and he uses handbrake inside a VM (

  21. Hi, Cliff. If you pull down master (I should warn you that master has had a lot of changes recently and has not been fully tested so it may be a bit buggy, we’re hoping to get a few more features in and have it fully tested for a stable release in the next month or two) we’ve added an “HB_ARGS” parameter to the config file so you can put in your own HandBrake arguments, I’m not sure what needs to be put in but maybe this thread would help (perhaps “-a 3 2 1” ?)

    The problem is I don’t know if the 5.1 audio track is always the 3rd track. I only have a mono-speaker (stereo and surround give me a headache) so it’s not something I even thought about, but if we need to make code changes I’m all for getting that feature in as I’m sure most people would want that ability.

    If this doesn’t work we can take a look at what Don Melton is doing, or even add an option to call his scripts for transcoding, I’m not sure if he’s using HB or something else for transcoding.


  22. Thanks for the reply Ben. I looked at this information before I wrote on this page and asked this question. I came to same conclusion that I am not sure it’s always the 3rd track. I am not too good with the scripts but early on I was calling his scripts with your scripts. But updating your scripts and his was a headache to keep them working. i like your scripts but his are pretty advanced and calls for surround as the first audio track. Thanks for the help.

  23. Firstly, awesome guide and kudos to all of the work you’ve put in. I tried the install this evening. Everything seemingly went well with the install, however, I’ve put in two separate DVDs and got the same error shortly after putting the disc in the drive: ‘Scsi error – MEDIUM ERROR:UNRECOVERED READ ERROR’. I have this running on an Ubuntu 16.04 virtualbox on a Windows 10 host. I can run MakeMKV on the same disc with no issues on the host and extract the entire movie.

    Any idea what might be going on here? The discs are not scratched and play just fine in various players. Thanks for any assistance.

    1. Hi, Brad. The ARM is now using HandBrake instead of MakeMKVs to rip DVDs (MakeMKV is still used for BluRays), can you see if trying to rip it manually using HandBrakeCLI produces any errors? Also, can post your config file and the output log (under /opt/arm/log?)

  24. Ben, If the script is altered to RIP first using MakeMKV and then convert the existing file, you can solve this because you can use MakeMKV’s profile to select the audio desired, ie 5.1 or 2.0 or combination of both…

  25. Now I love this as I have a big music and dvd/bluray library I would like to digitize and will definitely try this out especially if I can get multi drives to work.

    I would love to see the reverse as an option, if I had an ISO I could burn it using multi burners, as I do filming for schools and have to produce 50+ DVDs at times of the year and it could same me a huge amount of time burning 5 at a time and being able to utilize the same system for ripping and burning would save me a bunch of cash as well

    1. Auto-burning is a completely separate type of process so I wouldn’t add it to the auto-ripping machine, but it should be much simpler, you would probably just need to figure out what the command line is to burn an ISO and write a script to check a folder and if an ISO is present, burn it for each new disk that’s inserted.

    1. Requirements should be very minimal if you’re not transcoding. You probably want a x86 or x64 CPU, even an old one should work, and 1GB memory (512 might work). You technically should be able to transcode on older hardware, it would just take a long time.

    1. Should just be a matter of customizing HB_ARGS in your /opt/arm/config file.

      Here is what mine looks like which brings in subtities from every language, but makes the default subtitle track the one in my native language only when people are speaking a foreign language, and all English audio tracks (my wife likes to watch the directors cuts), you can probably just use what I have below and remove “–audio-lang-list eng” to pull in all languages.

      HB_ARGS=”–native-language eng –subtitle scan,1,2,3,4,5,6,7,8,9,10 –subtitle-default=1 –subtitle-forced=1 –audio-lang-list eng –all-audio”

      Also, see:

  26. Thank you so much for the reply. I was not sure where to start looking, if it was MakeMKV or Handbrake that i needed to adjust. One last question, Is there a easier way to handle TV shows? When they get ripped they just get placed in the movies folder and then I have to watch the first video in the folder and compare that to the DVDs to be sure they are labeled correctly. The raw folder sometimes keeps the disk number and season number. Sorry for the questions I’m not a programmer but I have tied looking at the code but its over my head.

    1. You’re welcome. TV Shows are pretty much impossible to handle automatically. Sometimes as you saw the disc has properly labled season and episodes but it’s not consistent, sometimes even different dics in the the same TV show won’t be consistent with each other in their naming conventions, then you might also have to deal with pilot episodes, sometimes the episodes are in a different order than airdate. So for now TV Shows have to be handled manually. I use which makes naming TV episodes pretty easy. @muckngind4 on Github has spent quite a bit of research on this and is working on some changes to make the TV Workflow a little easier but it’s not going to be fully automatic.

  27. So, I tried this over the weekend and it seemed to fail, I don’t know if it was something I did or didn’t do.

    Does this need to run on a Server OS of Ubuntu or can it run on the desktop version ?
    Is there any way of seeing if it is working, I couldn’t see any files being generated or log files
    I tried both CD and DVD and I could see the files in Mnt folder but nothing was generated elsewhere that I could see

    1. From my experience, using a desktop install of Ubuntu seams to causing problems with detecting the disk being inserted. What you can do is run Virtual Box and then passthrough on the drives and install Ubuntu server 16.04.

      1. So Ive managed to get the ARM to work and it rips my DVD/music fine to the default folder /mnt/media… I tried to change the path in the config file but it says I don’t have permission to save it, I followed the instructions perfectly but I can’t change any of the file permissions or files in /opt or /mnt/media

  28. How can I see what’s in the trans coding queue? it seems to have one stuck in there as all new disks log files end with “sending to trans coding queue” or something similar. Worked great for about 5-6 disks and then the boy (17) tried putting in like 2 or 3 disks that he wants to use that have been scratched to high heaven. Since then new disks will RIP but not transcode or move to final storage location

    1. Hi, Craig. The ARM uses the “batch” command to queue up transcoding, you can use “atq” to view the transcode queue or ps aux and grep for Handbrake process. According to the batch man page it will hold off on running a new transcode job until the system load average drops below 1.5, I did it this way to prevent too many transcode jobs from running at the same time, it could be that you have a long running transcode process (some videos can take a long time on slower hardware…I’m not sure if a scratched disk would cause it to go slower but it could I suppose), or something else is putting load on the server to keep the average above 1.5 which would prevent any new transcode jobs from executing.

      You can use atrm [job number] to remove jobs from the queue or you may need to kill the script. If all else fails a reboot should clear it.

  29. As always thanks so much for your quick replies … I think it’s because I am doing too much with low end hw lol (It’s more fun to blame the teen) hopefully last question, I have a few in the raw folder that did not transcode (still shows sent to transcoding in the log) but atq returns nothing. (I did have 4 that completed over night) Would it be easier to delete them or is there a script/command I can just kick off to put them back in the queue?

    Again, you have been amazing for support on this. I’m fairly technical but new to linux (even though most of my stuff at home now runs on linux)

  30. disregard .. forgot to sudo atq the system is just slow (hardware issue) I need to see if I can beef it up or put on a different machine. Thanks again

    1. You’re welcome, glad you enjoy it! So it’s working through the queue very slowly? You could try changing the HB_PRESET in the config from “High Profile” to “Normal” and that should speed up transcoding a little. The quality will be slightly less but you probably won’t even notice.

  31. This worked great on my ESXi host but I would like to give it a try on my Proxmox server. Has anybody here been able to get it to work in a VM or Container under Proxmox?

    1. It should work, make sure you’re putting it in /root/.MakeMKV/settings.conf and not update.conf, also app_Key is case sensitive, and there must be quotes around the key.

      I ended up purchasing a key so I don’t have to pop it in every time it expires.


  32. Thanks, this is awesome.

    A couple thoughts:

    1. I find ‘watch ls -al /media//arm/raw/*’ useful for tracking makemkv progress
    2. It might be fun to try and modify this with a hardware transcoding option via ffmpeg. Now to find some time for fun…If I ever do, I’ll let you know
    3. staxrip looks cool except for that pesky .net

    Thanks again for your awesome work on this.

    1. If you do get ffmpeg working we can add it as a transcoding option. Handbrake does make it easy to do some neat things like only transcode only audio tracks in native language, get all the subtitles but only make the forced subtitle the default, identify the main feature of a movie, etc.

  33. I just realized it runs on .net, so that kinda kills that idea. But maybe there would be useful tech there.

    1. .NETis a possibility with .NET Core being open sourced. But it would add another language dependency to the ARM.

      It looks like Handbrake supports some HW acceleration such as Intel QuickSync (might need a Skylake CPU) that the staxrip project takes advantage of… One thing I have read in various forums is that while hardware accelerated encoding is faster, the quality isn’t quite as good. Probably not noticeable but something to consider.

  34. I can’t tell a difference when Plex does it, except of course for the efficiency.

    I’ll have to look into handbrake hardware acceleration. My Google skills did not net me the link you found, so I didn’t think it was possible.

  35. Thanks. Old instructions I found had me putting .MakeMKV/settings in my home directory. Once I put it in root it worked fine.

  36. Anyone having problems with hard drive space being eaten up? I am on Ubuntu 14.4 and my drive is down to 13gb from 120gb. My saved movies are going to an external drive. I cleaned all my apt-get clean, autoclean and autoremove.

  37. I have noticed my BD backups aren’t being deleted when I use mainfeature. Check your raw folder for files that may not have been deleted.

    I think cleanup isn’t working right if you do mainfeature with BluRay right now. I am working an a 3D MVC support pull request (if Ben will have it), and I noticed that the script is using rmdir, but not deleting the individual files first. rmdir can’t delete a non-empty folder, so we should probably use rm -rf here.

    A question for Ben: What is the reason for the “backup” restriction for BD main feature?

    Based on my usage of the Handbrake GUI, I have always been able to do with with an mkv. Based on this, I modified the scripts to allow it and it seems to be working fine. The reason it matters is for 3D support, where I want to rip 3D including the MVC channel, transcode from that mkv for 2D and remote playback, and then keep the mkv file for 3D playback via Kodi on Raspberri Pi.

    So far, it all seems to be working, I just want to test a bit more before doing a pull request.

    1. Yep, I’d be happy to accept that PR Marty as long as my 2D rips keep working. |:-) Also if you don’t mind fixing the rmdir while you’re there that would be great. I don’t actually use mainfeature myself since my wife likes to have all the extra tracks. I didn’t write that part, but I thought the reason for the backup restriction on main feature is because Handbrake is being used to identify the main feature and it doesn’t know how to do it with MKVs. Is that not the case? If you want to ask the question on a GitHub issue and mention @muckngrind4 he might be able to respond with a better answer since he wrote that part.

  38. I’ve already fixed the cleanup code in my scripts, so I’ll include that in the PR.

    I’m guessing the restriction is historical, like perhaps Handbrake didn’t used to be able to do it. It definitely seems to be working now.

  39. Is there a way to make this a simple install script? I need to run it from a LiveUSB as when installing the OS on the PC I want use it will not see all my CD drives due to the SATA card I have in there using the LiveUSB sees them all and works fine. any ideas ?

  40. Sorry for the lack of pull requests. I ran into a couple minor things I want to clean up, but I’ve been very busy at work. Hopefully I’ll find some time soon.

    On a side note, the ‘-e qsv_h264’ option did not cause HandBrakeCLI to choke at the very least. Everything I read online says it is a Windows only option, so I’m somewhat expecting that it is mapping over to the standard h264 option in linux, but I’ll examine transcode times and logs to verify.

    I’m curious, what sort of transcode times are you generally getting for a DVD?

  41. Hello,

    I know that this is an old(er) post but I am having trouble with the notification section… I’ve tried both the IFTTT and Pushbullet keys but I’m not being notified of anything. Any help will be greatly appreciated.

  42. Hello,
    how can I change the audio language, cause while ripping after the coppy process, he removes all the different languages, and I will keep them.

    thank you


  43. First of all,

    Thank you for all your work and support.
    I’ve set this up on a fresh Ubuntu 16.04 install and am having some trouble
    Audio discs work as expected
    Both DVD and Blu-ray fail as described below:
    Files appear in /mnt/media/ARM/raw folder as expected
    These files appear to be complete
    Directories for the discs are created at mnt/media/ARM are created including extras subdirectories as applicable.
    The issue is that no files are in the directory.
    Once ‘transcoding’ is complete the directories in the /mnt/media/ARM/raw folder are removed.

  44. Hi, Ben, and thanks for the great work to get this to where it is.

    Can you elaborate on the way that the transcode process is called and how it determines whether or not to run a job?What system load average are you leveraging, and can I adjust it?

    atq shows no information yet the media is still in the “raw” directory, and I have opted to NOT transcode files. So, they should only go through the copy/move/rename piece and I wouldn’t expect system load to impact this.

    1. Hi, Mark. It just uses batch and the default behavior is to start the process when the system load falls below 0.8. The system load shouldn’t impact not transcoding… unfortunately it’s something I don’t test for since I always transcode so it’s possible it’s not working correctly with transcoding disabled.

  45. Line 32 in has a typo – it says “Pusover notifications” and should be “Pushover notifications”

    Is there any documentation on how to use this feature?

  46. I’ve run into a pretty nasty issue.

    If I use the default config and put all media under a common root directory, everything seems to move through the process very cleanly and end up where it should.

    I have updated the file paths so that there is a “staging” file tree for the rips, transcoding, and Unidentified media. But I have a different tree that’s used for media once completed and identified properly. The logs show the content being moved from the staging areas to the final location, and the -DIRECTORY- gets created, but the mkv file never appears in the destination as it should.

    How can I at least troubleshoot this?

    All storage is located on a remote server being accessed via NFS. And the actual disk is the same even though it’s being mounted through different mount points on the target server. Shares are exported with the same “rw,no_root_squash” options, and as stated – the directory gets created so it should not be a rights issue.

      1. I think I figured it out… I was NFS mounting a directory on a remote server and then was trying to access a subdirectory that was actually a different drive mounted underneath. NFS doesn’t share content from subdirectories that are mount points.

  47. @RandomNinjaAtk
    Mate did you end up posting the Auto Rippr install script anywhere? Could be super useful.

  48. Benjamin, First off, Great work. I am using it on a dedicated server my self with a few tweaks to allow handbrake to use 2 different settings based on the disc. I do have a problem/concern that i was hoping you may have solved already. On some Blu-Rays like Gods of Egypt, The disc will have an obscene number of title tracks that are 24 or more gigs a piece. While i know the physical limit of the disc can’t be that big, studios apparently use it as a deterrent to ripping. Is there a way to only have the script rip the first largest track on the disc? Usually that is the one with the movie in it. Thanks again for cobbling this together.

    1. Hi, Louis. I like to rip all tracks so my solution is I have lots of TB of storage. But there is a feature to rip only the main feature.. something like MAIN_FEATURE=true which may help, it should be in the config. You may need to play with whether or not it uses the BACKUP_METHOD as well.

  49. Any documentation surrounding the audio portion of this? Took me a while to figure out that the output directory is controlled by the “.abcde.config” file in the /opt/arm directory and isn’t controlled by a variable like most other things in the config file.

    I want to output mp3 but don’t know how your scripts are configured to call flac. Should I somehow update how abcde is called to get it to rip directly to mp3 files?

    I tried modifying the abcde call in to include a “-o mp3” but it threw errors and never ran.

  50. Hi Ben,
    I just wanted to leave you a note to say how much I appreciated your DIY. While I didn’t build a fancy dedicated server to run the ARM on I was able to re-purpose a old AMD dual core Athlon X64 machine and it runs great. I had recently replaced my wife’s desktop PC with a laptop and rather than sending this old PC to the scrap head I thought I would see if it could run the software and while it isn’t very fast at ripping DVDs (I haven’t got a Blueray reader yet), it handles the task just fine. I also installed Emby and have since converted to Emby Premier. With this setup I am able to watch my video collection on my Fire TV sticks, XBOX ONE and XBOX 360 as well as access my collection from outside of the house. I am very happy with the results and so is my family. At some point I may consider upgrading the system to a faster processor with a lot more drive capacity but for a starter ARM system this computer worked out fine. If other people are wondering about hardware I would tell them to give their old PCs a try. If it has at least a dual core processor, 4GB of RAM and several hundred gigs of drive space, you will have enough to play with.

    1. You’re welcome, Christopher. And thanks for sharing your hardware configuration. How do you like those Fire TV sticks? I don’t have a TV but I’m thinking about getting one if there’s a way it can access Emby.

  51. The Fire sticks work great on the bedroom TVs. We watch HULU, Netflix, CBS All Access and Amaxon in addition to Emby. For the price they are a great package. I do have a question for you that relates back to ARM. I was trying to rip all of the Lord of the Rings movies and there were no problems with Fellowship and Two Towers but I got to Return of the King and though the rip worked the transcoding does not. I did some Googling and found that other folks have had the same issue and it has to do with the resulting file size coming close or exceeding 2GB (the original rip is over 7GB). It looks like there is a way to tell Handbrake to deal with this but I am not sure exactly how to do that. I was wondering if I could pass the change to the ARM config file in the line HB_ARGS=”

  52. Hey Benjamin, really cool project right here.

    I’m working on an extension of this which involves getting a robotic arm to physically move a disk from a stack, put it in a drive, run your program, and remove it afterwards.

    I already have python scripts that work perfectly for the loading and unloading, so I’ve been messing around with the script, calling my python scripts right after/before the disk ejects.

    I’ve run into a fairly major hurdle at this point. The script runs fine when I physically press the tray button, but it doesn’t seem to run when I want to close the disk drive from the terminal (e.g. “eject -t (drivepath)”).

    Looking closely into the log file, there does seem to be some weird behavior when I physically press the button. It seems to rip a CD successfully once, then try to rip again, not recognize the disk, and then eject.

    I’m having a bit of a hard time understanding what’s going on.

    I’ve attached the pastebin dump of a clean log of just one disk.

  53. I’m still investigating the issue with the reverse eject close tray command, but I’ve realized that the script is running twice (and failing the second time) when you do one rip because the udev rule action parameter is “CHANGE” which means it triggers on the load AND also on the eject. (I believe it tries to identify the disk type when the disk has already been ejected.)

  54. I’m really sorry for the multiple posts, but my question actually boils down to one point.

    Is it possible to run manually on a disk drive?

    1. Hi, David. Unfortunately you can’t run manually, it has to be run from udev so that the udev parameters are available since udev has has info about the disc that the ARM uses. This has been sort of problematic since systemd/udev is a pain to work with so We may change this behavior in the future, but currently it’s getting values that I don’t know how to get any other way.

      Are you running this on Ubuntu 16.04 LTS? There are some issues with 17.04 and 17.10. (I am planning on supporting 18.04 LTS when it comes out).

  55. Ben,

    What values are you getting via the automatic kickoff of that you can’t get manually? The automated routine merely launches and does not pass any command line arguments. Running it manually should be perfectly fine, especially if you update it to take a command argument of the drive (which isn’t hard to do).

  56. There are multiple environment variables that udev gives so that it can identify the drive such as: $DEVNAME, $ID_CDROM_MEDIA_TRACK_COUNT_AUDIO, $ID_FS_TYPE…

    I think there are two ways I could solve this issue:

    1. Remove the udev rule and instead add a second argument to that provides the drive path (as you mentioned). Get the aforementioned variables by reading in the output that “udevadm info -q env -n /dev/sr0” gives you.

    I’m having some difficulty with that as the output of that udevadm info command does not seem to include variables such as $ID_CDROM_MEDIA_TRACK_COUNT_AUDIO…

    2. Using udevadm trigger. This seems like it would be the cleanest solution that would require the least amount of modification to For some reason I’m unable to trigger with that command, so I’m still looking into that…

    I’ll keep on grinding away at this…

  57. David,

    If you follow the logic of the process, loading a disc causes the system to launch with no variables. launches with a single variable (the path to the config file).

    UDEV creates an environment variable called DEVNAME when it detects that a disc has been inserted into a drive. When is called, it is able to pick up this variable and use it in the udevadm command to get variables about the disc that’s in the drive.

    If you run udevadm monitor –property –udev and then insert various discs, you’ll see the attributes that it picks up when they are loaded in.

    I wouldn’t be concerned about not getting any information in the $ID_CDROM_MEDIA_TRACK_COUNT_AUDIO variable unless you’ve actually inserted a music disc.

    As far as modifying the script, all that needs to be done is to detect whether the command line variable is a path to the config file or a device name. This can be simplified to look for a SPECIAL first command line variable (like “manual”) and then read in the value of a SECOND command line variable as the path to device to use.

  58. Hey

    This all works very well for me. Mainly ripping dvds.
    Congrats on such a nice little project.
    Runs really well in ESXi

    One thing I would like to change is preset. I previously had created a custom preset when i was ripping and i discovered that you cant import this as such but can only load it from the handbrake cli. see –preset-import-file

    Anyway I cheated a bit by simply using the default “High Profile” profile and then changing the HB_ARGS to modify the generated file to include my updated x264 settings, all audio in it’s native codec such as ac3 or dts etc. and all english subs etc. This works well as i think this gets processed last so it overwrites the values from the profile. I have verified this with mediainfo

    The issue is that the built in profiles also adds a default aac track which i would like to exclude and cannot figure out a way to do this. ie. when i overwrite settings it works well but the aac track is an addition from the High Profile and there isn’t a way to say “actually don’t add that crappy aac track”

    If you knew of a way to load a custom profile from within your scripts that would solve it for me.

    Otherwise perhaps you have a good idea for me to try.


  59. I dug a little more and basically removed the profile from the equation entirely by editing the script.

    Still have some issues to iron out but basically it means I am using a custom command line in lieu of generic profiles.

    I will update if anyone is interested once i get some more time to sort it out

  60. One last reply.

    I think i sorted it out, the audio issues were related to a typo.

    Thanks again for the great scripts. Time to get busy converting all of the children’s dvds and import them into plex

  61. Thanks, I think I’m starting to understand the architecture a bit better.

    I originally thought that ALL udev variables came from the environment variables that were first passed in by the udev rule kicking in when a drive is loaded.

    To be clear, you are saying that the drive path DEVNAME is the only environment variable that is being used, and the rest of the disk info is caught on line 39 of ” udevadm info -q env -n “$DEVNAME” >> “$LOG” ” (I originally thought this line was only used to print disk info to the log for debugging purposes)

    To make this work, I would simply need to specify a DEVNAME variable for

    I’m not sure I understand your last two sentences. Can’t I just add a second variable and call it using $2 considering the config path is called using $1?

  62. David,

    In thinking about this more, I think the solution is somewhere in between what you’re thinking and what I was thinking…

    Check for the existence of a second command line variable and use it as the device to run against. The first command line variable should probably always be the location of the config file since there are things in there that need to be used even when run manually.

    Since the script is run using bash, you can use:

    if [ $# -eq 2 ]; then
    CONFIG = $1
    DEVICE = $2

    This will set the variables as needed based on there being two command-line variables.

  63. Oh ok, I see, your solution keeps the original udev rule functionality. I was just going to eliminate that. I’ll work on it tomorrow and see where I get to.

  64. It might be useful to be able to “turn the automated piece on and off”, too. For example: When doing a bulk import of media, most items should rip correctly. An odd disc here or there might need to be run manually with different settings. In this scenario, it might be nice to have a CONFIG setting that turns the automation completely off, or possibly off for a specific device. That would allow you to use it in an automated fashion -OR- a manual fashion, depending on your needs.

    There are a number of other config settings that should probably be added to the main config file as well – either a direct pointer to the abcde config file, or parameters that can be used to -generate- an abcde config file for use by the ripping machine. It took me quite a while to make my way through the various different pieces to get to where I could modify the abcde config file so that it would rip MP3 and not FLAC.

  65. Hey Mark,

    Really sorry for not getting back to this sooner. A ton of stuff came up during the last two weeks which stopped me from working on this.

    I did follow the advice above (except I just added an else statement where it assigned Config to the first command line variable), but I’m still running into an issue.

    I get one error at the elif line at around 117 (when it identifies audio and lauches abcde:

    line 117: ((: > 0 : syntax error: operand expected (error token is “> 0 “)

    It seems like the variable $ID_CDROM_MEDIA_TRACK_COUNT_AUDIO doesn’t exist. To do a test, right after the udevadm info line, I make it echo the aforementioned variable into the log and a blank line showed up.

    If I run udevadm info -q env -n /dev/sr0 I do indeed get a non zero value for the above variable

    I believe udevadm info is sending the disk info to the log, but it’s not giving access to that same exact disk info.

    How would I go about getting to parse what udevadm info -q env -n /dev/sr0 throws out? A combination of cat and something else? I’m a bit out of my league in terms of bash coding…

    1. David,

      Have you tried running the udevadm command within the script and using the “-x” flag to export the variable information to the shell?

  66. Ok I have a question:

    I wanted to use this BUT I don’t want makemkv to rip EVERY track with most discs. Specifically I wanted to have it ignore any track that is 50% bigger than another track that meets my min length requirements.

    SO, I wrote my own scripts but I seriously don’t understand how your udev rule tells your script WHICH dvd drive is being loaded…can you explain how that gets into the bash script logic?

    1. Hi, techpilot. The $DEVNAME environment variable is set by UDEV and it contains the optical drive, also not sure if it’s exactly what you want but you can set MAIN_FEATURE=true and it will only rip the main feature of a movie.

  67. I turned off the UDEV rule on my machine, and put udevadm info -q env -n /dev/sr0 -x in the beginning of the and it ran fine. So, the “-x” piece would seemingly be the piece you need so that the results of the udevadm command will set environment variables.

  68. The block command is surrounded by backticks in the script – they don’t show up when you insert them into a post.

  69. Are there any better ways to identify movie titles? The python script is terrible and most movies get named incorrectly. This puts me in a position of having to do a LOT of manual work to rename folders and files before placing them in my Plex system.

    Specifically, the python script (which queries Windows Media, seemingly an undocumented database) gets the year of release wrong almost all the time.

    1. Hi, Mark. I wish… there really isn’t anything like the CDDB database for movies that I’ve found, the only thing I’ve come across is for blue-rays you can get it off an XML file on the disk, and for DVDs I don’t know of any way other than the Windows Media API. One thing that may cause the issue you’re having with the year is the release year of the movie is sometimes a year ahead of the DVD. I don’t know if there’s a way to truly make it automatic… either someone needs to step up and make a CDDB like service for movies (which is less likely to be successful because you don’t have a large number of people ripping movies like you did with CDs) or make some sort of interface where the ARM gives you the top 5 matches.

      Also, the OMDB API which the python script relies on has not been accepting queries without a paid key lately so that may be part of the problem. When it’s accepting free queries I get about a 90% success rate, but there are still a few movies I have to rename manually.

      If you do have some better ideas or find a better way to get a match let me know and I’ll try to incorporate them.


      1. Thanks for the response, Ben.

        TMDB is a pretty good online database for movies, but the problem is more one of being able to get data from the DVD itself to use in a query. As you mentioned, BluRay discs have some information buried in a text file that can be extracted – regular DVD’s do not. Disc titles are not always useful, either. As an example, The Terminator, Special Edition has a disc title of something like TERMSE. I had another disc with a title of PI30NNW1. Good Day For It is titled GDFI_DVD. Plenty of not-terribly-helpful titles out there. :)

        Filebot can already leverage TMDB to attempt to get and use the correct naming of a movie. I wonder if there’s a way to just let Filebot do the work?

  70. Ben,

    I am running in to a problem with your Identify script. For some reason, it doesn’t mount the Blu-Ray drive to mnt like your script looks for, I have 2 drives (sr0,sr1) everything else is able to see the drives but since the identify script doesn’t work, the movies keep getting dropped in the unidentified folder.i have included the email output that root gets from the script and the identify portion of the log. I did add the -x to udevadm as suggested in a earlier comment. Let me know if there is another script I should be looking at to resolve this. I am also running Ubuntu 16.04 with the latest patches as of this post. Thanks in advance.

    /opt/arm/ line 109: ((: > 0 : syntax error: operand expected (error token is “> 0 “)

    Starting Identify Script…
    Deleting 0 old log files:
    DEVLINKS=’/dev/disk/by-path/pci-0000:00:12.2-usb-0:1:1.0-scsi-0:0:0:0 /dev/dvdrw /dev/disk/by-uuid/8D332D2ED82ED803 /dev/disk/by-id/usb-HL-DT-ST_BD-RE_WH16NS40_0000000000006417-0:0 /dev/disk/by-label/THE_FORCE_AWAKENS /dev/cdrw’
    identified udf
    found THE_FORCE_AWAKENS on /dev/sr1
    identified udf as video
    Obtained Title The Force Awakens (2016)
    got to here
    HAS_NICE_TITLE is true
    video title is now The Force Awakens (2016)
    video type is fail
    Video Title is The Force Awakens (2016)

    1. Hi, Louis, there’s a discussion of this on GitHub, the OMDb API is no longer free (now costs $1/month), and that’s what the ARM was relying on to identify whether the video was a movie or TV show …when that fails it drops it into unidentified.

      1. Basically, ARM drops everything into Unidentified now. I have written a “handling” script that leverages Filebot to rename the media files correctly and then move them into my Plex media directories so the media server sees them. What I’ve found with Filebot is that the filename of the media itself is important for matching. The more words in the title you have in the filename, the better it matches on the first try.

        My script leverages the name of the directory that the files are dropped into to rename the file itself, then Filebot attempts to identify the file based on its name. I was previously getting about a 50/50 split with accurate matches. I now get closer to about 90/10. And I’ve coded in a “Repair” option that allows me to manually override the directory and filename directly, even after it has been migrated into a holding directory. That way, I can look the movie up myself and give it the correct naming so that Plex will import it correctly.

          1. I’d be happy to, once it’s complete and commented appropriately. I’m still tuning it, and will be making more changes so that it will work for more folks (I use a promotion model to go from Unidentified -> Renamed -> Approved -> Imported).

  71. Ben,

    Let me know if you can’t decrypt this. I don’t want to post in clear text because I want you to tinker and test before possibly making it part of your git repository.

    If you think it’s good to go after testing on your system, feel free to add it in.

    Version: BCPG C# v1.6.1.0


  72. I encounter the exact same problem as Reinhard. It seems indeed to be the case that protected DVDs cannot be read on headless Debian Jessie systems. There is also an unsolved question on SuperUser. I will try to implement Reinhard’s solution and see how it goes.

  73. HELP! Complete newbie fumbling his way through his first vm and first linux experience. I’m going on two weeks, and I think I am really close!

    I would like to use a custom HandBrake preset for H.265 that I setup in the GUI (ghb). I have exported to a .json file. How do I get A.R.M. to use this custom setting? The files rip with MKV just fine, and if I use the standard config file, they will transcode to H.264…but I want H.265 with a quality of 18 and HandBrake does not appear to have a preset for that.

    When I run HandBrakeCLI -z, the custom preset is not listed. I have tried modifying line 91 of the, replacing “–preset..” with –preset-import-file “~/.config/ghb/TechSpot_DVD.json” -i…” I received an error that -i was missing (it wasn’t)

    I also tried modifying the config file settingfrom: HANDBRAKE_CLI=HandBrakeCLI to: HandBrakeCLI –preset-import-file “~/.config/ghb/TechSpot_DVD.json” and I tried changing from: HB_PRESET=”High Profile” to: HB_PRESET=”TechSpot_DVD”, I always get an error in the log that it can’t find TechSpot_DVD.

    In both of the above cases, I tried –preset-import-file and –preset-import-gui. Neither worked. I also tried with “~” and with “/home/ubuntu/…” None of those worked, either.

    Can this be done? Do I need to place the .json file in a different folder? Is there a different file I need to modify (ex: some HandBrake file so with the .json text)?

    Below is a snippet of the log file:
    Encode done!
    HandBrake has exited.
    Transcoding file title01.mkv
    [20:22:05] hb_init: starting libhb thread
    [20:22:05] thread 7f49e9e51700 started (“libhb”)
    Preset import failed, file (“home/ubunto/.config/ghb/TechSpot_DVD.json”)
    HandBrake 1.0.4 (2017040900) – Linux x86_64 –
    4 CPUs detected

    Please help! I think I am sooooo close! :)

    1. Larry,

      The proper way to invoke what you’re asking using purely HandBrakeCLI would be to have:

      [code]–preset-import-file=”/path/to/preset.json” –preset=”My preset”[/code]

      on the command line. So, try setting the profile to the name of your custom preset and then pass the [code]–preset-import-file=”/path/to/preset.json”[/code] portion as an additional command-line argument from the config file.

  74. I am having a tough time getting all of this to work. It may be my hardware setup. I have 3 internal DVD and 1 external BD. When I drop 4 discs in, folders are created and most of the time the logs say the movie has been sent to the transcode quue. Randomly, one of the movies may get transcoded. Most of the time, nothing – especially blu ray. Is there a way to see the HB queue? Please be specific on HOWTO – I’m a*NIX newbie LOL. Any other ideas? Thank you!

    1. Larry,

      Check your “CONFIG” file and see if you have SKIP_TRANSCODE set to “TRUE”. You should also look at the setting for MAINFEATURE as setting this to TRUE will skip transcoding on all but one file (when it does transcode).

  75. Thank you for the quick reply, Mark!

    I tried a fresh config file and a fresh This did not help. I all four combinations of mkv/backup with main feature on and off. I rebooted the VM and Windows each time.

    I seem to consistently get this error in the log file of any blu ray:

    MSG:5069,128,0,”Backup failed”,”Backup failed”
    MSG:5080,516,0,”Backup failed.”,”Backup failed.”
    STAT: TRON_LEGACY ripped in 0 hours, 0 minutes and 7 seconds.
    /opt/arm/ “/media/sf_ARM/ARM/MKV//Tron – Legacy (2010)_20170802_195024” “Tron – Legacy (2010)” “true” “fail” 20170802_195024
    TRON_LEGACY sent to transcoding queue…

    HandBrake does not transcode it, though.

    This is an external blu-ray. Do you think that would make a difference?

    Any ideas what the MSG’s mean?

    Thank you!

    1. Larry,

      Look further up in the log file – I suspect you’ll see an entry that says something about the Shareware features of MakeMKV being disabled because your key is no longer valid. You’ll need to update the key from the MakeMKV web site in order to get it work again. The previous key expired on Sunday.

  76. Hello Benjamin,
    This is a great programme, is there a way to put some feedback on the screen like the bar that goes across the screen, no need to be accurate – just to indicate something is happening – such as “Ripping your DVD” and “Transcoding your DVD”?

      1. Serious question: Why?

        This is intended to be a headless (no monitor) system that requires no user intervention. I could see developing a web application for it that would allow monitoring and control from a remote device, but that’s a project in and of itself.

        1. Hello Mark,
          Thanks for the reply – I’m building a standalone media server which is accesses by web browser and one of the requirements is to rip dvds and put them into the library. (The user and I are well aware of the legal aspects of this and only legally acquired material would be ripped!)

          1. Understood.

            In my limited experience, media servers are similar in that they, too, are headless. Hence, the web access method. So, I still see no need to try and build a system to put notifications on the screen. You -COULD- (if you’re using Linux) use the console notifications to pop generic messages to the screen of things like “Starting content rip”, “Completed disc rip”, etc.

            If you’re looking for some sort of very basic progress indicator, maybe consider using something like Pushbullet which can put notifications into the Chrome browser extension. Mod the scripts (like I did) to send notifications of different things. I use Pushover notifications to send info through to my IFTTT app on my phone. When a disc is done ripping, I get a notice (good time to go change discs). When the transcoding is complete and all content has been moved to its final resting place (which is never the media library), I know that I can get my content renamed and imported.

            I don’t see that I’m X% complete on any given task or disc, but I’m ok with that as long as I know the work is getting done (and I know it’s working because I hear the drives working).

          2. Thanks for the feedback, I’ll look at the Linux console notifications approach (I’m using Debian).

  77. Hi, I am happy to say: everything was finally PERFECT! And then, I ran out of disk space on my VM. I started to go through resizing and gpart, etc…but I figured building a new VM would be faster and probably cleaner.
    I am on my 2nd attempt to get this to work :( I have followed the steps, with no errors. All of the folders are there. I have not changed the config files, etc.
    When I insert any disk…nothing happens. It’s almost like udev isn’t firing. I have rebooted multiple times.
    Any ideas?
    Thank you!

    1. Did you get it working Larry? It’s hard to say, nothing in your system logs? Can you test ripping a disk manually using MakeMKV or Handbrake manually from the command line to make sure that’s working?

  78. Hi there!

    Great tool. I’ve installed it on a (old….) system where I run Lubuntu on. I did fit a BluRay drive inside of it. I did manage to get it working. Thanks for your effort.

    I would like to know if there is another way to get this system running on my Freenas 11 setup. I would be able to create a VM with Bhyve on Freenas 11. In this VM I would run Ubuntu 16.04 LTS. However I cannot add the BluRay drive as an device. Not sure if this question is for you or in the Freenas community.

    1. Hi, Wim. That would be really cool if you could get that to work in FreeNAS, I don’t think it’s currently possible. My guess is bhyve doesn’t have the ability to do this so I’d start there. If bhyve can do it, it should be fairly trivial to add this to the VM on the command line in FreeNAS, or for the FreeNAS devs to add it to the GUI.

  79. I’ve run into a problem which I’d be grat6eful for your help. I now get a DVD ejected almost straightaway after inserting it. The log extract is below which implies MakeMKV is either unli9censed, or out of date. I entered the beta license key but no change, and reinstalled to version 1.10.6 (beta) Linux x64 (I am running Ubuntu 16.04 x64). Still no change. I then purchased a paid key, again no change. Finally I removed the arm directory and linked files, reinstalled the whole app but to no avail, I can’t think of anything else – any assistance gratefully received.


    *** Start config parameters ****
    Timestamp: Sat, 26 Aug 2017 16:30:29 +0100
    HB_PRESET=”High Profile”
    HB_ARGS=”–subtitle scan -F”
    *** End config parameters ****
    Starting Identify Script…
    Deleting 0 old log files:
    DEVLINKS=/dev/dvd /dev/disk/by-id/ata-MATSHITADVD-RAM_UJ875AS_aE01466B /dev/disk/by-path/pci-0000:00:1f.2-ata-1 /dev/disk/by-uuid/2011-11-25-15-52-25-00 /dev/cdrom /dev/disk/by-label/TTSS /dev/dvdrw /dev/cdrw
    identified udf
    found TTSS on /dev/sr0
    identified udf as video
    Obtained Title Tinker Tailor Soldier Spy (2012)
    got to here
    HAS_NICE_TITLE is true
    video title is now Tinker Tailor Soldier Spy (2012)
    video type is fail
    Video Title is Tinker Tailor Soldier Spy (2012)
    Ripping video TTSS from /dev/sr0
    Using mkv method of ripping.
    MSG:1005,0,1,”MakeMKV v1.10.6 linux(x64-release) started”,”%1 started”,”MakeMKV v1.10.6 linux(x64-release)”
    DRV:0,2,999,1,”DVD+R-DL MATSHITA DVD-RAM UJ875AS 1.00″,”TTSS”,”/dev/sr0″
    MSG:5021,260,1,”This application version is too old. Please download the latest version at or enter a registration key to continue using the current version.”,”This application version is too old. Please download the latest version at %1 or enter a registration key to continue using the current version.”,””
    STAT: TTSS ripped in 0 hours, 0 minutes and 7 seconds.
    /opt/arm/ “/mnt/media/ARM/raw//Tinker Tailor Soldier Spy (2012)_20170826_163031” “Tinker Tailor Soldier Spy (2012)” “true” “fail” 20170826_163031
    TTSS sent to transcoding queue…
    Start video transcoding script
    transcoding with a nice title
    directory already exists… adding timestamp
    Transcoding all files.
    STAT: transcoded in 0 hours, 0 minutes and 0 seconds.
    Pushbullet notifications not enabled
    IFTTT notifications not enabled
    Pusover notifications not enabled
    *** Start config parameters ****
    Timestamp: Sat, 26 Aug 2017 16:30:38 +0100
    HB_PRESET=”High Profile”
    HB_ARGS=”–subtitle scan -F”
    *** End config parameters ****
    Starting Identify Script…
    Deleting 0 old log files:
    DEVLINKS=/dev/disk/by-path/pci-0000:00:1f.2-ata-1 /dev/cdrw /dev/dvd /dev/cdrom /dev/disk/by-id/ata-MATSHITADVD-RAM_UJ875AS_aE01466B /dev/dvdrw
    drive seems empty, not ejecting

    1. I’ve seen this sort of thing before and it came down to an issue with the keyfile.

      Check this file: /root/.MakeMKV/settings.conf

      There should be a line that says app_Key=

      The string that follows the equal sign needs to be encapsulated in quotation marks. So the line would look something like this:


      The alphanumeric string is your key file.

      1. Thanks – that seems to have solved the issue – for some reason the settings.conf, update.conf and screen.conf files were all under the /home directory in .MakeMKV. I copied them all to the root/.MakeMKV/ directory and all seems OK.

  80. Hello all, noob here to automatic ripping. I have a perplexing problem. I have installed Ubuntu 16.04.3 LTS running in Virtualbox on my mac (Sierra 10.12.5). I have followed your install instructions step by step. I have setup optical to use host device (Asus blu-ray). I have installed all the software, edited the config file to point to local folders on the host (shared via virtual box to Ubuntu). that is the only change i made in config. I have installed makemkv, handbrake, python, pip, libraries, at, etc. When i test each individual component, they all seem to be working. I can use udevadm command and it reads my DVD (testing with “The Departed DVD).

    However, when i insert the disk, i get nothing! No logs in /opt/arm/logs and no indication that udev is firing off the /etc/init.d/51-automedia.rules. And yes, i did implement the soft link as described in your instructions. How do i troubleshoot when i can’t find any logs to review? I know this is probably something very simple – human error or typo somewhere – but would appreciate any suggestions on how i can get udev to at least kick off the first script?

    I read through all of the comments above and it appears that it may be that my particular setup just won’t read the DVD properly – but i’m sure its something simple that i’m missing?

    Thanks in advance for the help!

  81. Ok, i found out my problem. I read the file and there was another command in that file that isn’t in the instructions listed above:
    cp /opt/arm/arm@.service /etc/systemd/system/

    Once i did this then it started working. Now trying to resolve why makemkv won’t read any DVD i throw at it. Same DVD’s work fine in my host with makemkv (Mac Sierra). But at least i can see the script working and now i have an empty.log file to read! I’m sure it probably has something to do with encryption libraries needed.


    1. I had the same problem. At first, I thought it was the MKV license (I finally figured out that I had to create the .conf file and add the app key line in the file in order for it to be read). I was still having problems, and created a new config file from the copy and it worked. Then I added 1 change at a time to see where it broke. I eventually made all the changes again, and it kept working. Either the config file was corrupt, or I made some kind of syntax error (forgot to add a # to a remark???). I found one line in a previous config copy where I added quotes (“) around and argument that was inside the quote of the HB_ARG= quotes…this made sense :) It got to the 2nd quote (which was the first quote of an argument, and failed. So, don’t add quotes within quotes. I know that’s coding 101, but I did it any way. Best of luck!

  82. I’m wondering if anyone else is having the following issue:

    Once a disc has finished ripping, my drive will eject it only to close the drive tray again within 3-4 seconds, after which it rips the disc again.
    Unless I am supervising the process closely and snatch the disc out of the drive, this creates an infinite ripping loop.

    Obviously this wouldn’t happen with laptop style drives which do not have the capability of automatically closing the drive tray.

  83. amazing blog and project thank you.
    i haven’t attempted it yet and was wondering:
    do you think i could run arm on ubuntu 16.04 lts on virtualbox on windows 7 64bit?
    this is exclusively for dvds.
    are subtitles ripped as well? can they be added in the mkv files?

    overall i suppose my concerns are whether there would be performance and compatibility bottleneckd caused by the VM software.

    many thanks

  84. I had a problem getting the DVD ripper to work from this article until I noticed what seems to be a line missing between lines 7 and 8 of the commands, this line is in the file on github but not in the article above and it solved the problem:

    cp /opt/arm/arm@.service /etc/systemd/system/

    If this has been picked up befoire my apologies.

  85. Hello … I love this thing (concept at least) I’m doing a fresh install of ubutnut server 16.04 lts …. I can’t seem to get past getting this error

    Everything passes and installs but it still reads 8.1.1 and not 9.0.1 … despite it installing 9
    Command “python egg_info” failed with error code 1 in /tmp/pip-build-o3ym7ztc/pycurl/
    You are using pip version 8.1.1, however version 9.0.1 is available.
    You should consider upgrading via the ‘pip install –upgrade pip’ command.
    fausto@Auto-Box:/opt/arm$ pip install –upgrade pip
    Requirement already up-to-date: pip in /home/fausto/.local/lib/python2.7/site-packages

    cool project


  86. Cool, that’s getting better, now just getting this :

    Command “python egg_info” failed with error code 1 in /tmp/pip-build-zZwnxT/pycurl/

  87. EUreka….. !!! this line is missing in the how too above, but in the README file:

    cp arm@.service /etc/systemd/system/



  88. OK … so this is working great . Here’s my question, is there a way to set up makemkv to tip all of the video, including the extras in separate video files?

    Great scripts, thanks

    1. Hi, Tim. Set the parameter MAINFEATURE=false and it will rip everything into separate files. You may also need to play with the MINLENGTH value (minimum number of seconds a video has to be for the ARM to rip it).

      1. Ben,

        I thought the MAINFEATURE piece only worked with BluRay, and only if BD’s were set to backup mode and not straight rip? I have my minlength set to 600 (ten minutes) and will always get “everything” that matches that criteria. With newer BluRay’s, this is actually problematic because of playlist obfuscation where it tries to rip all of the various combinations that are on the disc specifically caused to confuse ripping programs. Sometimes I get three or four files from a BD, sometimes I get 40. And they’re all just about the EXACT same size because of playlist obfuscation.

        I don’t use backup mode for BluRay’s… Maybe that’s why mine works as it does?

  89. So i tried that and the log read something about MAINFEATURE=being set to TRUE and didn’t rip anything. So i reset it and it worked again… and promptly lost the original log (sorry)… also, where is the MINLENGTH set …. i couldn’t find it…. thanks for the help

  90. Hi Ben,
    Thanks so much for this! For some reason every time I run this it always saves the log file as “empty.log” and puts my final transcoded product into “Unidentified” even though in the log files it shows “identified udf as video”, although it is also showing “video type is fail”. Any suggestions? I’ve tested multiple dvds.

    Thanks a lot,

    1. Hi, Trevor. The ARM is failing to identify the video because the OMDB API that ARM uses to identify the video type is no longer free and now requires an API key. See: Had we known this would happen we would have developed against a different API but didn’t know at the time. We may try to change this to use another API that is free in the future but haven’t gotten around to it yet. The only way to get that part working now is to purchase an API key from OMDBAPI, unfortunately.

  91. Hello,
    Sorry for the poor writing in my last couple posts, rereading them now and wondering what was going on at work when I posted. I’ve familiarized myself with the config and followed your instructions, however i can’t seem to get it to rip anything but the main title. It’s working great at that, just doesn’t want to rip anything but the movie. ANy thoughts?

    Thanks for any and all help, this really is a nice set of scripts.


  92. Hi Ben,
    Thanks so much for the quick reply! $1 a month seems pretty reasonable. One more question for you, I have set up my IFTTT trigger and in the logs it shows “IFTTT notification sent” yet I don’t get the email. I’ve double checked my API key is correct and my event is correctly configured. Could there possibly be something wrong with the python script? Or have you had anyone else with this issue?

    Thanks a lot for the help


  93. OK … so this is what I set up … sometimes it wants to do other tracks on the DVD fine … other times it will only rip the main title … I want it to rip everything.

    Anyone have any thoughts?

    ## MakeMKV Parameters ##

    # Minimum length of track for MakeMKV rip (in seconds)



    ## HandBrake Parameters ##

    HB_PRESET=”High Profile”




    HB_ARGS=”–subtitle scan -F”


    ## HandBrake Parameters ##

    HB_PRESET=”High Profile”

    # Extension of the final video file



    1. Can you provide some information on discs that DO work as you’d like and ones that DON’T? This might help to determine whether the issue is with the discs, drives, software, configuration, sun spot activity, etc.

      Be specific about the discs… Titles, formats, multi-disc set, which disc, and so on. Also, be sure to point out what tracks DON’T rip that you believe should.

  94. An alternative method would be to use the “file” command, e. g.

    file -s /dev/sr0 | cut -d “‘” -f2

    That gives you the LABEL on Debian as well and you don’t need to copy anything.

  95. OK … so here’s what I got, These DVDs “The Great Escape (1998)” and “Almost Famous (2001)” ripped fine and grabbed the extras. “Tom Horn (2005)” along with the Godfather 1 2 and 3 did not. I’d expect at least the theatrical trailers as they should be just short videos. I have my min length set at 100.

    THanks for the help


    1. Unfortunately, I don’t remember how the Godfather movies ripped for me. I believe that it was “main feature” only. I don’t have any of the others on your list. Any other examples you want to try?

  96. Ok … so here is the real question. Should it be ripping everything over 100 secs on every DVD or is that the nature of this software, some DVDs simply wont auto rip everything in the menu? In my mind i was expecting the entire contents of every DVD I stuck in. If this is a limitation of running this software in C.L. auto-mode, than so be it. … I just want to make sure I’m not doing something wrong to stop it.

    1. The CLI and GUI versions of MakeMKV work the same way. Have you tried loading a GUI version on a machine and putting one of these discs into the drive to see what that version does? If you turn on some extended logging and such, you should see more details about what it recognizes and why it’s kicking certain things out.

  97. OK .. so I’m running this on a headless server, so no GUI. Per chance do you where the config switch is to turn on extended logging for makemkv or are we talking about the arm log?

  98. Hey So …. thanks for all the help, it appears like it was a P.I.C.N.I.C problem (Problem In Chair Not In Computer)

    Seems it was simply an issue of not trying the right DVD’s … I just did “Gods and Generals” and “Peacful Warrior” along with the Rocky Trilogy and got TONS of dvd extrs stuff … thanks for the help … fantastic scrips

    1. As is? I’m guessing zero.

      If you can solve all of the dependency issues for the software, you could make it work.

  99. I’m having the same problem as Mark. I have SKIP_TRANSCODE=true (the machine I use for ripping is separate from the more powerful machine I use for Handbrake/transcoding) and because of playlist obfuscation, it takes over 12 hours to rip a disk because I get 15 copies of the same file, which of course are 25GB in size. Any suggestions for getting around this?

    BTW . . . great scripts! :) Loving it!

  100. Ben –

    What can I say… Thanks so much.

    I have personally implemented many of your guides in my home lab. Specifically, my two favorite, the Hyperconverged ESXi 6.5 and FreeNAS hybrid and I’ve just added a VM to that environment for ARM.

    I have 2 things that I can’t quite figure out… I don’t want to configure IFTTT or Pushbullet as I have an entire email infrastructure setup in my environment.

    It seems that I’m getting emails when ripping and transcoding finishes… BUT, I don’t know where they are configured.

    After ripping I am getting these types of emails:

    /tmp/arm_disc_info_sr1: line 1: /dev/disk/by-path/pci-0000:02:03.0-ata-2: Permission denied
    mount: /dev/sr1 is write-protected, mounting read-only
    /tmp/arm_disc_info_sr1: line 1: /dev/disk/by-path/pci-0000:02:03.0-ata-2: Permission denied
    warning: commands will be executed using /bin/sh
    job 23 at Fri Oct 6 09:55:00 2017

    I believe they are generated by the AT command that you’re using. As you can see, it doesn’t really say much, but I know enough that the ripping has finished.

    Secondly, after transcoding, I get an email that looks like this (which goes on for a full 900k)…

    dest /MEDIA/_Scratch/_ARM/Unidentified//The Blob (2001) variable created
    Encoding: task 1 of 2, 0.34 % (0.00 fps, avg 0.00 fps, ETA 00h00m41s)Encoding: task 1 of 2, 1.09 % (0.00 fps, avg 0.00 fps, ETA 00h00m30s)Encoding: task 1 of 2, 1.54 % (0.00 fps, avg 0.00 fps, ETA 00h00m34s)Encoding: task 1 of 2, 1.79 % (0.00 fps, avg 0.00 fps, ETA 00h00m40s)Encoding: task 1 of 2, 2.41 % (0.00 fps, avg 0.00 fps, ETA 00h00m35s)Encoding: task 1 of 2, 3.04 % (0.00 fps, avg 0.00 fps, ETA 00h00m35s)Encoding: task 1 of 2, 3.47 % (0.00 fps, avg 0.00 fps, ETA 00h00m36s)Encoding: task 1 of 2, 3.79 % (0.00 fps, avg 0.00 fps, ETA 00h00m38s)Encoding: task 1 of 2, 4.16 % (0.00 fps, avg 0.00 fps, ETA 00h00m40s)Encoding: task 1 of 2, 4.42 % (0.00 fps, avg 0.00 fps, ETA 00h00m41s)Encoding: task 1 of 2, 4.92 % (0.00 fps, avg 0.00 fps, ETA 00h00m39s)Encoding: task 1 of 2, 5.09 % (0.00 fps, avg 0.00 fps, ETA 00h00m43s)Encoding: task 1 of 2, 6.03 % (0.00 fps, avg 0.00 fps, ETA 00h00m39s)Encoding: task 1 of 2, 6.59 % (0.00 fps, avg 0.00 fps, ETA 00h00m38s)Encoding: task 1
    of 2, 7.48 % (0.00 fps, avg 0.00 fps, ETA 00h00m36s)Encoding: task 1 of 2, 8.56 % (0.00 fps, avg 0.00 fps, ETA 00h00m33s)Encoding: task 1 of 2, 9.98 % (0.00 fps, avg 0.00 fps, ETA 00h00m30s)Encoding: task 1 of 2, 11.64 % (0.00 fps, avg 0.00 fps, ETA 00h00m26s)Encoding: task 1 of 2, 13.36 % (0.00 fps, avg 0.00 fps, ETA 00h00m24s)Encoding: task 1 of 2, 14.65 % (0.00 fps, avg 0.00 fps, ETA 00h00m22s)Encoding: task 1 of 2, 15.95 % (0.00 fps, avg 0.00 fps, ETA 00h00m21s)Encoding: task 1 of 2, 17.37 % (0.00 fps, avg 0.00 fps, ETA 00h00m20s)Encoding: task 1 of 2, 18.89 % (0.00 fps, avg 0.00 fps, ETA 00h00m19s)Encoding: task 1 of 2, 19.54 % (0.00 fps, avg 0.00 fps, ETA 00h00m19s)Encoding: task 1 of 2, 19.96 % (0.00 fps, avg 0.00 fps, ETA 00h00m19s)Encoding: task 1 of 2, 21.59 % (0.00 fps, avg 0.00 fps, ETA 00h00m18s)Encoding: task 1 of 2, 23.16 % (0.00 fps, avg 0.00 fps, ETA 00h00m17s)Encoding: task 1 of 2, 24.64 % (0.00 fps, avg 0.00 fps, ETA 00h00m16s)Encoding: task 1 of 2,

    My question is this… Can I simply modify and create something using mutt and the variables in the current notify options for IFTTT and Pushbullet, then update the config for something like “SEND_EMAIL_NOTIFY=true”?

    Second, how do I stop the above emails… LOL. The first one I think someone indicated above that the udev script was looking at “change” and not at “load”, but I’m not sure if that’s related, or how to go about updating that…

    Thanks so much!

    1. Hi, Jacob. Thanks for reading my blog over the years! The emails you are getting are most likely coming from the Linux OS, there’s nothing in ARM that would send out an email… perhaps some process reporting systemd or a logcheck process that’s sending you errors. Do you by chance have the root account on the ARM box forwarded to your real email address? You may be able to look at the headers of the email to track down the process that sends them.

      As for the Permission denied, you may have found a bug, the ARM should probably mount it passing a read only flag.

      For sending out emails, yes you can. You can modify the script exactly as you described using mutt or the mail command. If you think it’s something others would find useful feel free to create a PR on GitHub.


      1. Thanks for the reply Ben! First off, YES, it is definitely something with atq directly that’s sending the email…

        The plot thickens…

        My ripping box has been idle for a week, and this morning I got 25 emails from atq around 3:25 am… All starting with the line “/opt/arm/config”… some of them only have that line, others indicate it’s trying to unmount “/dev/sda5”, which is my root partition, so that’s not good.

        Any hints on where I can look to see what the heck is getting called to prompt this?

        For the second piece… I’ve no idea how to do a PULL request, but I’ll try to figure that out too! Thanks for all the help!

  101. Ben, this is all coming along so nicely!

    Excited for audioeng and my own pull requests to get merged.

    One quick question though… I see in that you make 2 calls to… One is a straight call, the other is piped to batch… why is that? Shouldn’t the first one be sufficient?

    I ask, because I needed to manually rip The Expendables 2 on my windows box, but I want to transfer the MKV files over to my linux box and use the second piece of ARM to do all the rest for me… I figured I could just pass it the right path, and variables, just as you call after the video is ripped by, but the two calls to has me confused.

    As always, thanks for the help!

  102. Running into some issues with ARM. I have it installed ina VM. And when I insert a disc using the backup method. The process begins (tail -f /opt/arm/logs/empty.log) and I can follow along. Then randomly the ripping process stops, and the encoding fails. I cant quite figure out what I’m doing wrong. Below is a chunk of the log. Let me know if you need further log data.

    [00:42:50] hb_init: starting libhb thread
    [00:42:50] thread 7f39aa732700 started (“libhb”)
    HandBrake 1.0.4 (2017040900) – Linux x86_64 –
    4 CPUs detected
    Opening /output/RAW//RATATOUILLE_20171016_225309/BDMV…
    [00:42:50] CPU:
    [00:42:50] – logical processor count: 4
    [00:42:50] hb_scan: path=/output/RAW//RATATOUILLE_20171016_225309/BDMV, title_index=1
    disc.c:352: error opening file BDMV/index.bdmv
    disc.c:352: error opening file BDMV/BACKUP/index.bdmv
    [00:42:50] bd: not a bd – trying as a stream/file instead
    libdvdnav: Using dvdnav version 5.0.1
    libdvdread: Couldn’t find device name.
    libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed
    libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed
    libdvdread: Can’t open file VIDEO_TS.IFO.
    libdvdnav: vm: failed to read VIDEO_TS.IFO
    [00:42:50] dvd: not a dvd – trying as a stream/file instead
    [00:42:50] batch: scanning /output/RAW//RATATOUILLE_20171016_225309/BDMV/MovieObject.bdmv
    [mp3 @ 0x7f39a4004540] Header missing
    [mp3 @ 0x7f39a4004540] Header missing
    [mp3 @ 0x7f39a4004540] Header missing
    [mp3 @ 0x7f39a4004540] Header missing
    Input #0, mp3, from ‘/output/RAW//RATATOUILLE_20171016_225309/BDMV/MovieObject.bdmv’:
    Duration: 00:00:03.81, start: 0.000000, bitrate: 160 kb/s
    Stream #0:0: Audio: mp1
    44100 Hz, stereo, s16p, 160 kb/s
    [00:42:50] hb_stream_open: open /output/RAW//RATATOUILLE_20171016_225309/BDMV/MovieObject.bdmv failed
    [00:42:50] libhb: scan thread found 0 valid title(s)
    *** Start config parameters ****
    Timestamp: Tue, 17 Oct 2017 00:42:50 -0500
    HB_PRESET=”High Profile”
    HB_ARGS=”–subtitle scan -F”
    *** End config parameters ****
    Starting Identify Script…
    Deleting 0 old log files:
    DEVLINKS=/dev/cdrom /dev/disk/by-path/pci-0000:02:03.0-ata-1 /dev/disk/by-id/ata-VMware_Virtual_SATA_CDRW_Drive_00000000000000000001 /dev/dvdrw /dev/dvd /dev/cdrw
    drive seems empty, not ejecting
    No title found.
    HandBrake has exited.
    Transcoding file CERTIFICATE
    [00:42:51] hb_init: starting libhb thread
    [00:42:51] thread 7f01f43c2700 started (“libhb”)
    HandBrake 1.0.4 (2017040900) – Linux x86_64 –
    4 CPUs detected
    Opening /output/RAW//RATATOUILLE_20171016_225309/CERTIFICATE…
    [00:42:51] CPU:
    [00:42:51] – logical processor count: 4
    [00:42:51] hb_scan: path=/output/RAW//RATATOUILLE_20171016_225309/CERTIFICATE, title_index=1
    disc.c:352: error opening file BDMV/index.bdmv
    disc.c:352: error opening file BDMV/BACKUP/index.bdmv
    [00:42:51] bd: not a bd – trying as a stream/file instead
    libdvdnav: Using dvdnav version 5.0.1
    libdvdread: Couldn’t find device name.
    libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed
    libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed
    libdvdread: Can’t open file VIDEO_TS.IFO.
    libdvdnav: vm: failed to read VIDEO_TS.IFO
    [00:42:51] dvd: not a dvd – trying as a stream/file instead
    [00:42:51] batch: scanning /output/RAW//RATATOUILLE_20171016_225309/CERTIFICATE/app.discroot.crt
    [00:42:51] hb_stream_open: open /output/RAW//RATATOUILLE_20171016_225309/CERTIFICATE/app.discroot.crt failed
    [00:42:51] libhb: scan thread found 0 valid title(s)
    No title found.
    HandBrake has exited.

  103. I was wondering if anybody is running into an issue with slow disc read? I have this installed on a machine with 7 disc drives and whenever I put more than 3 discs in at a time I get an “invalid block size” kernel error that really slows down ripping time. Seems to be an mkv issue that I haven found in other forums that has yet to be resolved. I have tried both ubuntu 16.04 and 17.04. Any ideas to avoid this error?

    1. Are the drives on a common controller? Try a separate controller and see if it helps. You could be experiencing congestion on the controller bus.

  104. After looking they seem to be on different controllers. All labelled scsi0-7 respectively. Is this what you are referring to?
    Thanks for the quick replay.

    1. No.

      Each device will need a unique ID for itself, but all devices on a common controller would have the same ID for the controller itself. It’s common for motherboard to use a single controller bus regardless of 3,4,5, or however many device connections are available. If you have an add-on SATA card that you could move a couple of drives to, do that and then try three discs that are still connected as now along with 1-2 more connected to the new controller/card.

  105. Gotcha, then yes, they are all on one controller and this is most likely the issue. One last question, even though discs are recognized as dvds and movies all my log files still go into “empty.log” rather than creating a new log per rip. I have entered an omdb api key but can’t seem to get the log files to be correctly named.

    1. Log files will get unique names based on the name of the DVD/BluRay. If you’re ripping BluRay’s, and they’re going to “EMPTY.LOG”, then something is out of whack. DVD’s are harder to properly identify the name of and are more likely to end up in the wrong log file. BluRay discs should work 100% of the time.

      Even without the API calls that are built into the product for the Windows Media Center calls working, I still get a fairly good percentage of DVD’s getting named correctly. Maybe Ben has changed something that’s causing issues since I lit my system up about six months ago?

  106. Yeah even with BluRay’s I 100% of the time always get “empty.log” as the name. When looking at the logs it correctly ids the movie, as in “ID_FS_LABEL=’Movie_title'” but then doesn’t alter the logfile name. Could the naming of the log be happening before the idfs label identification? I’m not quite sure what’s happening there. I have yet to figure out my “invalid block size”/controller issue, I think the only way to solve is like Mark suggested which is to add on a PCI sata card to mitigate the traffic. Any other suggestions are greatly appreciated.

  107. So I switched it to MKV. However, now it creates about 12 mkv files instead of one large one.

    699M -rw-r–r– 1 root root 699M Oct 19 01:47 title00.mkv
    1.1G -rw-r–r– 1 root root 1.1G Oct 19 02:09 title01.mkv
    197M -rw-r–r– 1 root root 197M Oct 19 02:15 title02.mkv
    128M -rw-r–r– 1 root root 128M Oct 19 02:19 title06.mkv
    148M -rw-r–r– 1 root root 148M Oct 19 02:24 title07.mkv
    189M -rw-r–r– 1 root root 189M Oct 19 02:29 title08.mkv
    293M -rw-r–r– 1 root root 293M Oct 19 02:38 title09.mkv
    594M -rw-r–r– 1 root root 594M Oct 19 03:11 title13.mkv
    557M -rw-r–r– 1 root root 557M Oct 19 03:41 title14

    1. Odds are that the 1.1G file is the one you want and the rest are special features or something. What disc is that specifically?

      1. Ratatouille. When I check the files in playback mode, each one is a separate chapter of the movie… kinda annoying…

        1. If you’re ripping that from BluRay, it should be a little over 5GB in size for a lossless rip. Something in your setup is not right if it’s splitting chapters into individual files.

Leave a Reply