Automatic Ripping Machine

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 / Blue 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’s completely headless and fully automatic requiring no interaction or manual input to complete it’s tasks (other than inserting the disc).  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.  Instructions to get it installed on Ubuntu 14.04 LTS follows.

Automatic Ripping Machine (Supermicro MicroServer) under my desk

ARM Setup & Equipment

Blu-Ray Hardware and VMware Settings

The ARM is an Ubuntu 14.04 LTS VM (currently having an issue on 16.04 because of the new udev/systemd killing tasks) running under a VMware server.  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  ($45) 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.

Regions…

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 http://tdb.rpc1.org. Errors likely to follow.”,”Drive %1 has RPC protection that can not be bypassed. Change drive region or update drive firmware from http://tdb.rpc1.org. 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/BluRay drives 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 https://en.wikipedia.org/wiki/DVD_region_code#/media/File:DVD-Regions_with_key-2.svg

Notice that North America is not 0.

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

You can only change this setting 4 or 5 times then it gets stuck.

Install Ubuntu Packages

Installing MakeMKV

Download and install MakeMKV by following the directions here: http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224 (I did not do the optional libavcodec).  Essentially the steps are as follows:

Setup MakeMKV License

I think MakeMKV will run on a trial basis for awhile.  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 free open source software but MakeMKV saves so much time and is more reliable compared to anything else I’ve tried.

Grab the latest license key from: http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053

Note that I’ve been running MakeMKV as root, this is a bad idea, I’m sure it could run as an underprivileged user but I didn’t try… this is still at an experimental stage.  All the following documentation and setup assumes that you’re running it as root.  I’m not that worried since this VM is dedicated to this task and nothing else.

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

Install HandBrake CLI

Mount Samba/CIFS Media Share

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.  Since I hard-coded the location to be /opt/arm in the scripts I suggest putting them in /opt/arm.

Figure out how to restart udev, or reboot the VM.  You should be set.

Automatic Ripping Machine Usage

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

How it Works?

When UDEV detects a disc insert/eject as defined by /lib/udev/rules.d/51-automedia.rules it runs /opt/arm/identify.sh which identifies the type of media inserted and then calls the appropriate scripts.  (if you never 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.

emby_beethovens_last_night

Data Discs (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 don’t like and the two get wrongly lumped 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.

Well, hope you enjoy the ARM.

War Games DVD in Tray

 

Gridcoin Mining for Science

GridcoinA cryptocurrency that’s actually productive!  I came across Gridcoin (Ticker: GRC) the other day.

Gridcoin helps with cancer and malaria research as well as studying astronomy and solving math problems.

BOINC LogoIt caught my eye because Bitcoins and most cryptocurrencies require miners to spend a lot of computing power mining hashes that aren’t really useful.  Some argue that this is wasting gigawatts of energy each day.  Gridcoin mining actually pays miners to do useful computing by teaming up with BOINC (Berkeley Open Infrastructure for Network Computing).  BOINC is a way for people to donate the idle time on their computer for various research or grid computing projects.  Gridcoin uses a DPOR (Distributed Proof of Research) mechanism to reward miners by paying out Gridcoin based on the work they do on approved BOINC projects.

Asteriod

Miners can choose to work on a variety of projects.  Solving math problems ranging from computing primes to cracking Enigma messages; researching cures for diseases like cancer and malaria and simulating protein folding; astronomy projects researching asteroids, searching for pulsar stars, mapping the milky way; and various other projects like monitoring wildlife.

Unlike Bitcoin which require specialized ASICS to mine efficiently, because there are a variety of BOINC projects they will most likely be better for general purpose computing hardware.  Some projects are better suited for CPU, some for AMD GPUs, some for NVIDIA, Android devices, etc.  You pick the projects based on the type of hardware you already have.

GRCWithTextOnBottomI don’t see Gridcoin as being very profitable (monetarily) for miners-however, this is a fantastic idea and I hope we see more projects that reward miners for doing actual useful computing!

If you want to get started mining Gridcoin start out by following the directions on the Gridcoin.co Pool.

I’ve been mining for three weeks with a VM (given 8 vCPUs) with the Xeon D-1540 and so far have around 430 coins.  With the current exchange that’s $2.67.  Enough to buy two cheeseburgers.

GRC: SDBycsHrreXXhFAm1nZiYa7SGobBzkVbSH

visual

 

Immigration into the United States

Idaho has been having some issues with immigration lately, my thoughts:

Immigration is a good thing.  It would be un-American to discriminate against any person based on his religion, national origin, ethnic group, operating system preference, etc.. We should be welcoming to all people with good character who are willing to become Americans. That is, as Theodore Roosevelt said:

Picture of President Theodore Roosevelt
President Theodore Roosevelt

In the first place, we should insist that if the immigrant who comes here in good faith becomes an American and assimilates himself to us, he shall be treated on an exact equality with everyone else, for it is an outrage to discriminate against any such man because of creed, or birthplace, or origin. But this is predicated upon the person’s becoming in every facet an American, and nothing but an American…There can be no divided allegiance here. Any man who says he is an American, but something else also, isn’t an American at all. We have room for but one flag, the American flag… We have room for but one language here, and that is the English language… and we have room for but one sole loyalty and that is a loyalty to the American people.

Mexico Flag flown in Spokane

We should not abandon prudence when bringing in immigrants, but judge each person based on their character.  There are those who are flying non-U.S. flags, committing crimes, breaking laws, disrespectful, not seeking employment, not trying to learn English, not willing to take up arms to defend America, these should not have entered U.S. soil in the first place.

I, for one, welcome immigrants from any birthplace who have good character and work diligently and are willing to take an oath to defend this country.  But we, in the United States, are clearly lacking in our ability to judge incoming immigrants and refugees and need to address that first.

Once we’re able to distinguish between those with good intentions and those who have no business entering the U.S., we need a better plan to integrate them into society.  The current plan doesn’t seem to be working out so well.  Locating a bunch of refugees together into ghettos isn’t helpful–I don’t see how this will not result in another class of government dependent people and also resentment from Americans because of their lack of assimilation.  Let them integrate into the rest of America and learn our language and culture, give them jobs.

Let them become Americans.

 

Why I Still Prefer Paper Statements

Paper vs Online Statements

I suppose sending the actual statement as an attachment in an email isn’t an option?  If security is a concern encrypt it to my PGP key.

FreeNAS Mini XL, 8 bay Mini-ITX NAS

Catching up on email, I saw a Newsletter from iX Systems announcing the FreeNAS Mini XL (the irony).  On the new FreeNAS Mini page it looks just like the FreeNAS mini but taller to accommodate 8-bays.

Available on Amazon starting at $1,500 with no drives.

Here’s the Quick Start Guide and Data Sheet.

The pictures show what appears to be equipped with the Asrock C2750d4i motherboard which has an 8-core Atom / Avoton processor.  With the upcoming FreeNAS 9.10 (based on FreeBSD 10) it should be able to run the bhyve hypervisor as well (at least from CLI, might have to wait until FreeNAS 10 for a bhyve GUI) meaning a nice all-in-one hypervisor with ZFS without the need for VT-d.   This may end up being a great successor to the HP Microserver for those wanting to upgrade with a little more capacity.

The case is the Ablecom CS-T80 so I imagine we’ll start seeing it from Supermicro soon as well.  According to Ablecom it has 8 hotswap bays plus 2 x 2.5″ internal bays and still managed to have room for a slim DVD/Blu-Ray drive.

ablecom_cs_t80It’s really great to see an 8-bay Mini-ITX NAS case that’s nicer than the existing options out there.  I hope the FreeNAS Mini XL will have an option for a more powerful motherboard even if it means having to use up the PCI-E slot with an HBA–I’m not really a fan of the Marvell SATA controllers on that board, and of course a Xeon-D would be nice.

 

 

Ting Fiber Internet in Sandpoint

 

We’re Getting Fiber in Sandpoint!  Thanks Ting!

Ting Fiber

I just pre-ordered 1 gigabit up / 1 gigabit down!

After years of being in the dark ages in rural North Idaho with nothing but slow DSL, high latency cable, with the only reliable option being Verizon Wireless.  We now have real internet!

Sandpoint is finally getting it’s first fiber internet service from Ting!  Keep up to date on the latest news on Ting’s Sandpoint Blog

Ting Logo

Ting Fiber Internet Pricing

Ting is offering 1Gb symmetrical for $89/month, and 5Mb symmetrical for for $19/month!

If you live in the City of Sandpoint, Kootenai, Ponderay, or Dover, here’s the place to pre-order Ting Internet.

Static IPs are also available for $19/month for 1 or $25/month for 5.

 

Dell Hacked: Watch Out For Social Engineering Scams

Dell Support Social Engineer

The last few days I have been getting a lot of calls from “Unknown Caller” for which I didn’t pick up.  This morning I got a call from a number in the 845 area code so I answered.

It was my friendly Dell Support rep from India!

Hello, this is Dell support, we detected some malware activity on your computer.
They had detected malware on my machine.  Oh no!  All I needed to do was go to this url to scan for viruses.  I put the call on speaker phone and my coworkers and I played along hoping to figure out what we could about the operation–until we told him I had a Mac and then he knew we were on to him.

Dell Data Breached

The guy had all my information: my name, the phone number I gave Dell, and even knew the Dell model I had and about a tech support call I made last year to replace a bad motherboard.  He even had an Indian accent just like Dell Support!

I can see how some people would fall for this, this is known as “social engineering” where an attacker attempts to social engineer someone into going to a website to “scan your computer for malware” which of course will turn up positive (and may actually install malware).  Then “Dell Support” will charge a fee to remove the malware that was just installed.

Since Dell isn’t as forthcoming as they should be, I thought I’d post this, because it’s obvious the hackers have been able to obtain data from Dell.  At the very least Dell support data has been compromised which makes the scam sound more convincing.

One thing I am disappointed in is that Dell hasn’t told me that my information has been compromised despite being aware of a breach since the last 7 months!  As far as I know Dell hasn’t made any effort to notify their customers of the attack.  But they should.