ansible-nas icon indicating copy to clipboard operation
ansible-nas copied to clipboard

Rip CDs and DVDs automatically when inserted

Open LunkRat opened this issue 6 years ago • 8 comments

Flagging this feature enhancement idea: Automatic CD and DVD ripping.

Since our laptops, tablets, and phones lack optical drives, it would be extremely convenient to have the optical drive of the Ansible NAS rip CDs and DVDs directly to the media shares automatically on insertion, and then eject when finished. This could be done using clever scripted abcde and handbrake-cli.

Most Ansible NAS boxes will lack a GUI, and you don't necessarily want to have to SSH into your box to rip a CD with a command-line interface. I envision that you pop in the CD and 5 minutes later it ejects and you see it in your music share. Hands-free.

If I ever get this working I will submit a PR. If anyone beats me to it, let us all know here.

LunkRat avatar Feb 08 '19 02:02 LunkRat

Nice idea for those that still own CDs and optical drives! Please do submit a PR if you get anywhere with this. 👍

davestephens avatar Feb 08 '19 12:02 davestephens

I've great success running this on a Linux Mint machine: https://github.com/automatic-ripping-machine/automatic-ripping-machine

manikmakki avatar Mar 07 '19 05:03 manikmakki

@manikmakki ARM looks amazing and if you look at my original comment it is exactly what I envisioned. I am going to experiment with this and if I add it to my Ansible-NAS I will submit a PR.

LunkRat avatar Mar 08 '19 19:03 LunkRat

I wonder if there would be a lower-tech way of doing this with a simple shell script based on Safecopy (see https://askubuntu.com/questions/15827/recovering-files-from-a-corrupt-cd-dvd). Something that has safecopy --stage1 /dev/cdrom /mnt/scratch/cd1.iso as the main ingredient?

scotws avatar Jun 22 '19 10:06 scotws

Possibly someone could look at VortexBox and duplicate how it does it. I've used it in the past and it works really well.

REF: https://wiki.vortexbox.org/what_is_vortexbox

Some discussion at https://www.reddit.com/r/HomeServer/comments/89rxq1/ripping_dvds_and_cds_on_headless_linux_server/ just pointed me to the MakeMKV docker file which looks promising: https://github.com/jlesage/docker-makemkv

bcurran3 avatar Oct 15 '19 03:10 bcurran3

One hurdle would be that cd-rom/dvd devices are not generally available to containers in Docker that I am aware of. In the interest of keeping software in containers, LXC/LXD does allow passing a cd-rom through to a container, so perhaps an AutomaticRippingMachine LXC container could be created?

This would be a heck of a lot more work to do via Ansible than just pulling an image via Docker and setting a couple of env variables, though.

ideologysec avatar Dec 27 '19 22:12 ideologysec

Looks like mounting the optical drive is more or less the same complexity as sharing a normal data folder https://docs.cancergenomicscloud.org/docs/mount-a-usb-drive-in-a-docker-container

As for whether ARM or similar software will recognise when a CD/DVD is inserted or not is another matter. This might be a path to explore though, a simple cron every minute on the container to check whether data in the mounted directory has changed or not might help (sadly, this is the resolution limit on cron >_<) but this is far from ideal. This project may help though https://github.com/rix1337/docker-ripper (uses https://hub.docker.com/r/jlesage/makemkv/ ) although this software is in Beta with free keys currently and may cease functioning at any point and require payment.

animeai avatar Feb 18 '20 11:02 animeai

I've got a MakeMKV container in use that works well but I have not tried it for auto-ripping. I will be doing a PR in the future and will look into changing it to autorip if I can.

bcurran3 avatar Apr 26 '20 02:04 bcurran3