ansible-nas
ansible-nas copied to clipboard
Rip CDs and DVDs automatically when inserted
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.
Nice idea for those that still own CDs and optical drives! Please do submit a PR if you get anywhere with this. 👍
I've great success running this on a Linux Mint machine: https://github.com/automatic-ripping-machine/automatic-ripping-machine
@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.
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?
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
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.
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.
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.