Giter Site home page Giter Site logo

automatic-ripping-machine / automatic-ripping-machine Goto Github PK

View Code? Open in Web Editor NEW
2.3K 2.3K 280.0 25.66 MB

Automatic Ripping Machine (ARM) Scripts

Home Page: https://b3n.org/automatic-ripping-machine

License: MIT License

Python 59.36% Shell 6.00% Mako 0.09% CSS 2.93% JavaScript 6.08% HTML 24.83% Dockerfile 0.72%
automatic blu-ray cd disc dvd emby hacktoberfest handbrake handbrakecli headless makemkv movie python rip ripper transcode

automatic-ripping-machine's Introduction

Automatic Ripping Machine (ARM)

CI Publish Docker Image Docker

GitHub forks GitHub stars GitHub issues GitHub pull requests GitHub contributors GitHub last commit

GitHub license

GitHub release (latest by date) GitHub release Date Python Versions

Wiki Discord

Overview

Insert an optical disc (Blu-ray, DVD, CD) and checks to see if it's audio, video (Movie or TV), or data, then rips it.

See: https://b3n.org/automatic-ripping-machine

Features

  • Detects insertion of disc using udev
  • Determines disc type...
    • If video (Blu-ray or DVD)
      • Retrieve title from disc or OMDb API to name the folder "Movie Title (Year)" so that Plex or Emby can pick it up
      • Determine if video is Movie or TV using OMDb API
      • Rip using MakeMKV or HandBrake (can rip all features or main feature)
      • Eject disc and queue up Handbrake transcoding when done
      • Transcoding jobs are asynchronously batched from ripping
      • Send notifications via IFTTT, Pushbullet, Slack, Discord, and many more!
    • If audio (CD) - rip using abcde (get disc-data and album art from musicbrainz)
    • If data (Blu-ray, DVD, or CD) - make an ISO backup
  • Headless, designed to be run from a server
  • Can rip from multiple-optical drives in parallel
  • Python Flask UI to interact with ripping jobs, view logs, update jobs, etc

Usage

  • Insert disc
  • Wait for disc to eject
  • Repeat

Requirements

  • A system capable of running Docker containers
  • One or more optical drives to rip Blu-rays, DVDs, and CDs
  • Lots of drive space (I suggest using a NAS) to store your movies

Install

For normal installation please see the wiki.

For docker installation please see here.

Troubleshooting

Please see the wiki for troubleshooting.

Contributing

Pull requests are welcome. Please see the Contributing Guide

If you set ARM up in a different environment (hardware/OS/virtual/etc.), please consider submitting a howto to the wiki.

License

MIT License

automatic-ripping-machine's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

automatic-ripping-machine's Issues

omdbapi reopens; but disk still unidentified

I saw that omdbapi has reopened for free with less than 1000 queries per day.
I got a free key and put in into the config file; however, Atomic Blonde is still coming back as unidentified.
I didn't see anything in the log file saying omdb api failed and a quick look at qetvideotype.py doesn't seem to output anything to the log either.

At this point; I'm kinda lost at to what should be occurring or even the scripts are even calling getvideotype.py.

Thoughts?

DVD decryption error with VirtualBox on MacBook host

I have performed identical installations (with Vagrant) on a PC and a MacBook Pro with an internal SuperDrive. The MacBook can only rip unprotected DVDs, and fails others while the PC handles them fine. This isn't an issue with the A.R.M. but with Macs, and possibly only VirtualBox. I was wondering if anyone else has seen this though?

Two encode jobs get started at the same time

Ripping Blurays, had the same problem with HDVDs, it appears the part of the script that calls Handbreak doens't check if Handbreak is already encoding so I constantly have two jobs running which makes things take a lot longer.

Not sure what you need from me to troubleshoot things.

Support for Pushover notifications

I really like the Pushbullet and IFTTT notifications. Pushover.net is another popular notification service.

My proposal:

Add the following config parameters:

# Pushover API User and Application Key
# Leave User key empty or comment out to disable Pushover notifications
PO_USER_KEY="<User key>"
PO_APP_KEY="<application key>"

Add the following to notify.sh:

#Notification via Pushover
#Trigger onl if variable is set
if [ -z "$PO_USER_KEY" ]; then
        echo "Pusover notifications not enabled" >> "$LOG"
else
        echo "Sending Pushover notification" >> "$LOG"
        curl -s --form-string "token=$PO_APP_KEY"  --form-string "user=$PO_USER_KEY" --form-string "message=$MSG" https://api.pushover.net/1/messages.json
        echo "Pushover notification sent" >> "$LOG"
fi

More info available here: https://pushover.net/faq#library-shell

DVD's won't rip

I've been using ARM for a week to rip Blu-Rays and that is working perfectly. I Just tried to rip a few DVD's today and the system won't do anything with a DVD. It just grabs the DVD name and then ends because it says it can't find a file to transcode. I am able to rip a DVD manually with HandbrakeCLI so I'm pretty sure that's working OK.

What can I check?

Here's one of the logs:

Starting Identify Script...
Deleting 0 old log files:
DEVLINKS=/dev/disk/by-path/pci-0000:00:14.1-ata-2 /dev/disk/by-id/ata-HL-DT-ST_BDDVDRW_UH12NS30_K96F2P84706 /dev/dvd /dev/disk/by-label/HOME2 /dev/disk/by-uuid/1999-08-03-13-11-14-00 /dev/cdrw /dev/dvdrw /dev/cdrom
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:14.1/ata2/host1/target1:0:1/1:0:1:0/block/sr0
DEVTYPE=disk
ID_ATA=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_BUS=ata
ID_CDROM=1
ID_CDROM_BD=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_DVD=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_TRACK_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
ID_FOR_SEAT=block-pci-0000_00_14_1-ata-2
ID_FS_LABEL=HOME2
ID_FS_LABEL_ENC=HOME2
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
ID_FS_UUID=1999-08-03-13-11-14-00
ID_FS_UUID_ENC=1999-08-03-13-11-14-00
ID_MODEL=HL-DT-ST_BDDVDRW_UH12NS30
ID_MODEL_ENC=HL-DT-ST\x20BDDVDRW\x20UH12NS30\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PATH=pci-0000:00:14.1-ata-2
ID_PATH_TAG=pci-0000_00_14_1-ata-2
ID_REVISION=1.03
ID_SERIAL=HL-DT-ST_BDDVDRW_UH12NS30_K96F2P84706
ID_SERIAL_SHORT=K96F2P84706
ID_TYPE=cd
MAJOR=11
MINOR=0
SUBSYSTEM=block
TAGS=:uaccess:seat:systemd:
USEC_INITIALIZED=3158497
identified udf
found HOME2 on /dev/sr0
identified udf as video
Obtained Title Home Alone 2 - Lost in New York (2015)
VIDEO_TYPE is movie and NEW_YEAR is 1992
Year mismatch found. New video title is Home Alone 2 - Lost in New York (1992)
got to here
HAS_NICE_TITLE is true
video title is now Home Alone 2 - Lost in New York (1992)
video type is movie
Starting video_rip.sh
Video Title is Home Alone 2 - Lost in New York (1992)
Ripping video HOME2 from /dev/sr0
Media is DVD and Main Feature parameter in config file is true. Bypassing MakeMKV.
DEST is /home/arm/movies/output/raw/Home Alone 2 - Lost in New York (1992)_20180120_183951
STAT: HOME2 ripped in 0 hours, 0 minutes and 0 seconds.
/opt/arm/video_transcode.sh "/home/arm/movies/output/raw/Home Alone 2 - Lost in New York (1992)_20180120_183951" "Home Alone 2 - Lost in New York (1992)" "true" "movie" "20180120_183951" "/opt/arm/logs/HOME2.log"
Home Alone 2 - Lost in New York (1992) sent to transcoding queue...
Start video transcoding script
transcoding with a nice title
directory already exists... adding timestamp
Transcoding all files.
$VIDEO_TYPE is movie, $MAINFEATURE is true, $HAS_NICE_TITLE is true, $EMBY_SUBFOLDERS is false
Moving a single file.
Checing for existing file...
No file found. Moving "/home/arm/movies/output/unidentified/Home Alone 2 - Lost in New York (1992)_20180120_183951/Home Alone 2 - Lost in New York (1992).mkv to /home/arm/movies/output/final/Home Alone 2 - Lost in New York (1992).mkv"
Emby Refresh False. Skipping library scan
STAT: Home Alone 2 - Lost in New York (1992) transcoded in 0 hours, 0 minutes and 0 seconds.
Pushbullet notifications not enabled
IFTTT notifications not enabled
Pusover notifications not enabled
Sending EMail notification
EMail notification sent

ARM broke after upgrades

I'm not 100% where the issue lies because like an idiot I upgraded ARM and MakeMVK at the same time with out testing in between.

Previous to the upgrade discs were ripping fine.

I've attached the log. I'm not 100% certain if the issue is HandbreakCLI, MakeMKV or ARM itself.

ARM is seeing a disc has been inserted and is calling MakeMKV. MakeMKV appears to rip the disc successfully. The failure occurs at the transcoding portion.

I've re-compiled my HandbreakCLI just in case but that hasn't helped.

Log attached:
failedRip.log

I'm thinking the issue is this:

[20:11:26] hb_scan: path=/mnt/ripTemp/raw//LOGICAL_VOLUME_ID_20171121_192805/CERTIFICATE, title_index=1
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv

Some quick digging turned up that this might be a Handbreak issue?

Stop disc being re-read

Is there a way to stop the DVD from automatically closing itself?

I'm finding that discs are being ripped multiple times if I don't go and take it out quickly enough. It seems like the disc drawer is automatically closing after a period of time and then the script just rips it and queues it for transcoding again.

Is there anyone to prevent the DVD drive auto closing? and is it possible to tell ARM not to rip a disc it already has a .log file for ?

thanks.

Notify when done ripping to FLAC?

This software is really great, but I have a lot of discs I need to convert and I'd like to have some system of notification when it's done. Each disc takes a different amount of time and I basically need to babysit it for a couple hundred discs. Is there a file I can modify to notify Pushbullet when a rip is done?

Disc type detection fails in LXC / Container environments

I've spent a few weeks trying to get ARM's current HEAD to work in a Proxmox / LXC stack, and I've traced it down to a recent systemd merge being the culprit (#76). Containers don't properly execute udev rules, so running udevadm at script runtime is effectively useless in this situation.

The workaround I came up with is effectively to rollback to the last tag before that merge (v1.4.0) and use the old udev execution method to pass through the requisite ID_ labels into the container / wrapper script, but that's obviously less than ideal, so I would propose possibly making an alternate flow with either a flag or a different entry point that allows for retaining the traditional functionality. You could also potentially automatically detect this case by querying for the existence of the udev rules in the environment during execution, and using those (falling back to udevadm if they're not available).

I realise this is a fairly niche use case, but there's a fair number of homelabbers that use Proxmox, and a workaround like the above should (hopefully) be fairly simple to implement!

Further detail on my workaround: https://www.reddit.com/r/homelab/comments/7bgtu9/a_simple_solution_for_getting_automated_ripping/

Nothing ripped; Throws disc out some seconds after inserting.

With the original config checked into the repo. Same folders and so on.

*** Start config parameters ****
ARM_CHECK_UDF=true
GET_VIDEO_TITLE=true
SKIP_TRANSCODE=false
RAWPATH="/mnt/media/ARM/raw/"
MEDIA_DIR="/mnt/media/ARM/Media/Movies/"
LOGPATH="/opt/arm/logs/"
LOGLIFE=1
SET_MEDIA_PERMISSIONS=false
CHMOD_VALUE=777
MINLENGTH="600"
RIPMETHOD="mkv" 
MKV_ARGS=""
HB_PRESET="High Profile" 
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
MAINFEATURE=false
HB_ARGS="--subtitle scan -F"
PLEX_SUPPORT=false
EMBY_REFRESH=false
EMBY_SUBFOLDERS=true
EMBY_SERVER=""
EMBY_PORT="8096"
EMBY_CLIENT="ARM"
EMBY_DEVICE="ARM"
EMBY_DEVICEID="ARM"
EMBY_USERNAME=""
EMBY_USERID=""
IFTTT_EVENT="arm_event"
LOG=$LOGPATH$LOGFILE
*** End config parameters ****
Starting Identify Script...
Deleting 0 old log files: 
DEVLINKS=/dev/cdrom /dev/cdrw /dev/disk/by-id/ata-Slimtype_DVD_A_DS8A5SH_103280075052 /dev/disk/by-label/PAUL_BLART_MALL_COP /dev/disk/by-uuid/2009-06-13-07-20-10-77 /dev/dvd /dev/dvdrw
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:11.0/ata2/host1/target1:0:0/1:0:0:0/block/sr0
DEVTYPE=disk
ID_ATA=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_BUS=ata
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_DVD=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_TRACK_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_FS_LABEL=PAUL_BLART_MALL_COP
ID_FS_LABEL_ENC=PAUL_BLART_MALL_COP
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
ID_FS_UUID=2009-06-13-07-20-10-77
ID_FS_UUID_ENC=2009-06-13-07-20-10-77
ID_MODEL=Slimtype_DVD_A_DS8A5SH
ID_MODEL_ENC=Slimtype\x20DVD\x20A\x20\x20DS8A5SH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=XA15
ID_SERIAL=Slimtype_DVD_A_DS8A5SH_103280075052
ID_SERIAL_SHORT=103280075052
ID_TYPE=cd
MAJOR=11
MINOR=0
SUBSYSTEM=block
TAGS=:seat:systemd:uaccess:
UDISKS_PRESENTATION_NOPOLICY=0
USEC_INITIALIZED=63842
identified udf
found PAUL_BLART_MALL_COP on /dev/sr0
identified udf as video
failed to get title Traceback (most recent call last):
  File "/opt/arm/getmovietitle.py", line 69, in <module>
    disc_title = clean_for_filename(getdvdtitle())
  File "/opt/arm/getmovietitle.py", line 31, in getdvdtitle
    dvd_title = doc['METADATA']['MDR-DVD']['dvdTitle']
KeyError: 'dvdTitle'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/arm/getmovietitle.py", line 71, in <module>
    disc_title = clean_for_filename(getbluraytitle())
  File "/opt/arm/getmovietitle.py", line 39, in getbluraytitle
    with open(args.path + '/BDMV/META/DL/bdmt_eng.xml', "rb") as xml_file:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/dev/sr0/BDMV/META/DL/bdmt_eng.xml'
got to here
HAS_NICE_TITLE is false
video title is now PAUL_BLART_MALL_COP
video type is unknown
Video Title is PAUL_BLART_MALL_COP
Ripping video PAUL_BLART_MALL_COP from /dev/sr0
Using mkv method of ripping.
STAT: PAUL_BLART_MALL_COP ripped in 0 hours, 0 minutes and 2 seconds.
/opt/arm/video_transcode.sh "/mnt/media/ARM/raw//PAUL_BLART_MALL_COP_20170204_181206" "PAUL_BLART_MALL_COP" "false" "unknown" 20170204_181206
PAUL_BLART_MALL_COP sent to transcoding queue...
Start video transcoding script
transcoding without a nice title
Transcoding all files.
STAT: PAUL_BLART_MALL_COP transcoded in 0 hours, 0 minutes and 0 seconds.
Pushbullet notifications not enabled
IFTTT notifications not enabled
*** Start config parameters ****
ARM_CHECK_UDF=true
GET_VIDEO_TITLE=true
SKIP_TRANSCODE=false
RAWPATH="/mnt/media/ARM/raw/"
MEDIA_DIR="/mnt/media/ARM/Media/Movies/"
LOGPATH="/opt/arm/logs/"
LOGLIFE=1
SET_MEDIA_PERMISSIONS=false
CHMOD_VALUE=777
MINLENGTH="600"
RIPMETHOD="mkv" 
MKV_ARGS=""
HB_PRESET="High Profile" 
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
MAINFEATURE=false
HB_ARGS="--subtitle scan -F"
PLEX_SUPPORT=false
EMBY_REFRESH=false
EMBY_SUBFOLDERS=true
EMBY_SERVER=""
EMBY_PORT="8096"
EMBY_CLIENT="ARM"
EMBY_DEVICE="ARM"
EMBY_DEVICEID="ARM"
EMBY_USERNAME=""
EMBY_USERID=""
IFTTT_EVENT="arm_event"
LOG=$LOGPATH$LOGFILE
*** End config parameters ****
Starting Identify Script...
Deleting 0 old log files: 
DEVLINKS=/dev/cdrom /dev/cdrw /dev/disk/by-id/ata-Slimtype_DVD_A_DS8A5SH_103280075052 /dev/disk/by-label/PAUL_BLART_MALL_COP /dev/disk/by-uuid/2009-06-13-07-20-10-77 /dev/dvd /dev/dvdrw
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:11.0/ata2/host1/target1:0:0/1:0:0:0/block/sr0
DEVTYPE=disk
ID_ATA=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_BUS=ata
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_DVD=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_TRACK_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
ID_FS_LABEL=PAUL_BLART_MALL_COP
ID_FS_LABEL_ENC=PAUL_BLART_MALL_COP
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
ID_FS_UUID=2009-06-13-07-20-10-77
ID_FS_UUID_ENC=2009-06-13-07-20-10-77
ID_MODEL=Slimtype_DVD_A_DS8A5SH
ID_MODEL_ENC=Slimtype\x20DVD\x20A\x20\x20DS8A5SH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=XA15
ID_SERIAL=Slimtype_DVD_A_DS8A5SH_103280075052
ID_SERIAL_SHORT=103280075052
ID_TYPE=cd
MAJOR=11
MINOR=0
SUBSYSTEM=block
TAGS=:seat:systemd:uaccess:
UDISKS_PRESENTATION_NOPOLICY=0
USEC_INITIALIZED=63842
identified udf
found PAUL_BLART_MALL_COP on /dev/sr0
identified udf as video
failed to get title Traceback (most recent call last):
  File "/opt/arm/getmovietitle.py", line 69, in <module>
    disc_title = clean_for_filename(getdvdtitle())
  File "/opt/arm/getmovietitle.py", line 31, in getdvdtitle
    dvd_title = doc['METADATA']['MDR-DVD']['dvdTitle']
KeyError: 'dvdTitle'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/arm/getmovietitle.py", line 71, in <module>
    disc_title = clean_for_filename(getbluraytitle())
  File "/opt/arm/getmovietitle.py", line 39, in getbluraytitle
    with open(args.path + '/BDMV/META/DL/bdmt_eng.xml', "rb") as xml_file:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/dev/sr0/BDMV/META/DL/bdmt_eng.xml'
got to here
HAS_NICE_TITLE is false
video title is now PAUL_BLART_MALL_COP
video type is unknown
Video Title is PAUL_BLART_MALL_COP
Ripping video PAUL_BLART_MALL_COP from /dev/sr0
Using mkv method of ripping.
STAT: PAUL_BLART_MALL_COP ripped in 0 hours, 0 minutes and 2 seconds.
/opt/arm/video_transcode.sh "/mnt/media/ARM/raw//PAUL_BLART_MALL_COP_20170204_181228" "PAUL_BLART_MALL_COP" "false" "unknown" 20170204_181228
PAUL_BLART_MALL_COP sent to transcoding queue...
Start video transcoding script
transcoding without a nice title
Transcoding all files.
STAT: PAUL_BLART_MALL_COP transcoded in 0 hours, 0 minutes and 0 seconds.
Pushbullet notifications not enabled
IFTTT notifications not enabled

Failure mails from mbox:

From root@somewhere Sat Feb 04 18:12:31 2017
Envelope-to: root@somewhere
Delivery-date: Sat, 04 Feb 2017 18:12:31 +0100
Subject: Output from your job        7
To: root@somewhere
From: root <root@somewhere>
Date: Sat, 04 Feb 2017 18:12:31 +0100

/opt/arm/config
/opt/arm/identify.sh: line 109: ((: > 0 : syntax error: operand expected (error token is "> 0 ")

& 
Message 7:
From root@somewhere Sat Feb 04 18:13:08 2017
Envelope-to: root@somewhere
Delivery-date: Sat, 04 Feb 2017 18:13:08 +0100
Subject: Output from your job        6
To: root@somewhere
From: root <root@somewhere>
Date: Sat, 04 Feb 2017 18:13:08 +0100

rmdir: failed to remove '/mnt/media/ARM/raw//PAUL_BLART_MALL_COP_20170204_181228': No such file or directory
warning: commands will be executed using /bin/sh
job 8 at Sat Feb  4 18:13:00 2017

Vagrant/Ansible/Docker setup

Since the recommended way of installing is in a virtual machine, why not create a Vagrantfile coupled with an Ansible playbook that sets up a complete machine? If the setup is done with Ansible, it should even be possible to create a Docker image based on that. Being able to start a virtual A.R.M. with just a single command would simplify the install a lot.

Feature Request: Log audio rips individually rather than in "empty.log"

Currently, all audio cd rips are logged in the empty.log file. This makes it difficult to troubleshoot individual cd-rips when performing simultaneous processes, and it prevents audio-cd rip logs from being flushed in the standard log cleaning process.

I am working on a feature enhancement to create the individual log files for audio rips with roughly the same methodology used for video rips. Implementation checks for the required tools (abcde-musicbrainz-tool and.or cd-discid) with a failover to the existing methodology. Current preference is for a Musicbrainz ID, but either methodology is functional, and serves the purpose.

Low Quality Artwork For Music

So I've attempted to solve this myself with no luck, but the artwork that is acquired at the time of ripping a CD is like 250x250 in size. When viewing on a 55" 4k/1080p display, it really doesn't look good. It's better right now to just disable the artwork and let the tools like Plex/Emby to download them for me.

I would prefer to have the artwork grabbed at the time of the rip, but it really needs to be a minimum of 800x800... 1000x1000 resolution would be preferable.

Bluray files are left behind after transcode

Script properly rips BDs and transcodes them. Once transcode is complete the RAW BD data is left behind the RAW BD data is still left behind in 'arm\raw'.

Didn't have this issue with HDVDs or a regular DVD I've ripped.

Data destination directory is hardcoded in data_rip.sh

The destination directory for data discs is hard to coded to /mnt/media/ARM/Media/Data/${TIMESTAMP}_${ID_FS_LABEL} in data_rip.sh. There should be a config option to set it to any directory like for ripped videos.

Auto grab MakeMKV app_key

NOT AN ISSUE

I've created a little script that will grab the latest app_key from the MakeMKV Forum and update the MakeMKV config file with it.

mmkvcode

All instructions needed are on that page / README file.

Feel free to try it out, Any issues let me know either here or create an issue on the repo ๐Ÿ‘

Log / Notification Doesn't Include Title Name

While working with ARM today, I found that the log only contains the title for the MakeMKV portion of the job, and not for the HandBrakeCLI/transcode portion.

The variable ${ID_FS_LABEL} is used to contain the title name and is used in several scripts - video_rip.sh, video_transcode.sh - and while it's usage in video_rip.sh does result in the title being included in the log message, it doesn't when used in video_transcode.sh - I'm not sure if this is because the variable is becoming unset between one script and the next or what - I'm rather new to shell scripting.

It's not a breaking inconsistency, just triggers a bit of OCD :-)

Help wanted! If you have multiple drives test PR 76

If someone with multiple drives can test PR #76 (which switches ARM from udev to systemd) it would be much appreciated (I only have one drive so can't test it) to make sure nothing has broken when ripping multiple titles simultaneously before I merge it in.

To test:

# git fetch origin pull/76/head:systemd
# git checkout systemd
# cp "[email protected]" /etc/systemd/system/

( there were also updates to 51-automedia.rules, so if you didn't symlink to /lib/udev/rules.d/ you'll need to copy that file there as well )

# reboot

Option to include all subtitles

Option to add all subtitles to the mkv file -- but still make the "forced" one default (not sure if this is even possible).

Minor (non-fatal) bug: Error reported to email (root@localhost) when non-audio CD is inserted

When I insert a non-audio CD I get a report in root's email:
/opt/arm/config
/opt/arm/identify.sh: line 109: ((: > 0 : syntax error: operand expected
(error token is "> 0 ")

This is a non-fatal, very minor bug. It probably only bothers me because I'm a "clean log" purist. :)

Environment is (from uname -a)
Linux localhost 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu server 16.04.1 LTS running on an older MSI laptop. Error reproduces on VirtualBox version of the same implementation.

I have looked through identify.sh and reworked line 109 and will submit a pull request for evaluation. The fix seems to eliminate the logged error while still properly identifying audio vs. non-audio discs.

Subtitles are not being ripped

First of all, great work, this looks ideal for my purposes (backing up my DVD collection). I do have one issue though and something that i've struggled with in the past and that is forced subtitles for foreign/alien languages.

I've run a test DVD (Da Vinci code) through and both with and without transcoding the subtitles are not there (there should be some 12mins in). At first i thought this was Handbrake stripping these off but then i had a look at the main rip before handbrake transcoding and they are missing from there too.

Any advice?

Udev rules causing systemd-udev-settle.service to timeout

Hello, I am running Ubuntu 17.04. I noticed after installation that the systemd-udev-settle.service was timing out as my ZFS mounts weren't coming up. It appears that the udev rules aren't specific enough and are passing all block change events to the arm service, instead of just those related to the CD drives. I looked at the cdrom_id udev rules and noticed we can add some specificity. I fixed it by changing the udev rules to this:

ACTION=="change", SUBSYSTEM=="block", TAG+="systemd", KERNEL=="sr[0-9]*|vdisk*|xvd*", ENV{DEVTYPE}=="disk", RUN+="/bin/systemctl start arm@%k.service"

I can submit a PR if needed.

arm_wrapper.sh failed with exit code 1 on Ubuntu 16.10

Looking for some guidance here. I'm putting the disk in (Bluray and DVD) and not getting anything except errors in various log files.
Ubuntu 16.10
Attempted with USB Bluray drive and SATA dvd-rw drive but getting same results on both devices
Installed per README instruction
After inserting disk, I see the following error in /var/log/syslog (often it will show the failed with exit code 1 twice in a row).

syslog: systemd-udevd[8698]: Process '/opt/arm/arm_wrapper.sh' failed with exit code 1.

If I manually trigger arm_wrapper.sh as root, I get the following message:

root@docker:/opt/arm# ./arm_wrapper.sh
warning: commands will be executed using /bin/sh
job 5 at Wed Feb  8 15:43:00 2017

I also receive mail (body below)

/opt/arm/config
device node not found
/opt/arm/identify.sh: line 109: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
eject: tried to use `/dev/' as device name but it is no block device
eject: tried to use `/media/' as device name but it is no block device
eject: tried to use `/mnt/' as device name but it is no block device
eject: tried to use `./' as device name but it is no block device
eject: unable to find or open device for: `'

Output of /opt/arm/logs/empty.log after manually kicking off arm_wrapper.sh

*** Start config parameters ****
ARM_CHECK_UDF=true
GET_VIDEO_TITLE=true
SKIP_TRANSCODE=false
RAWPATH="/mnt/media/ARM/raw/"
MEDIA_DIR="/mnt/media/ARM/Media/Movies/"
LOGPATH="/opt/arm/logs/"
LOGLIFE=1
SET_MEDIA_PERMISSIONS=false
CHMOD_VALUE=777
MINLENGTH="600"
RIPMETHOD="mkv"
MKV_ARGS=""
HB_PRESET="High Profile"
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
MAINFEATURE=false
HB_ARGS="--subtitle scan -F"
PLEX_SUPPORT=true
EMBY_REFRESH=false
EMBY_SUBFOLDERS=true
EMBY_SERVER=""
EMBY_PORT="8096"
EMBY_CLIENT="ARM"
EMBY_DEVICE="ARM"
EMBY_DEVICEID="ARM"
EMBY_USERNAME=""
EMBY_USERID=""
IFTTT_EVENT="arm_event"
LOG=$LOGPATH$LOGFILE
*** End config parameters ****
Starting Identify Script...
Deleting 0 old log files:
unable to identify


*** Start config parameters ****
ARM_CHECK_UDF=true
GET_VIDEO_TITLE=true
SKIP_TRANSCODE=false
RAWPATH="/mnt/media/ARM/raw/"
MEDIA_DIR="/mnt/media/ARM/Media/Movies/"
LOGPATH="/opt/arm/logs/"
LOGLIFE=1
SET_MEDIA_PERMISSIONS=false
CHMOD_VALUE=777
MINLENGTH="600"
RIPMETHOD="mkv"
MKV_ARGS=""
HB_PRESET="High Profile"
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
MAINFEATURE=false
HB_ARGS="--subtitle scan -F"
PLEX_SUPPORT=true
EMBY_REFRESH=false
EMBY_SUBFOLDERS=true
EMBY_SERVER=""
EMBY_PORT="8096"
EMBY_CLIENT="ARM"
EMBY_DEVICE="ARM"
EMBY_DEVICEID="ARM"
EMBY_USERNAME=""
EMBY_USERID=""
IFTTT_EVENT="arm_event"
LOG=$LOGPATH$LOGFILE
*** End config parameters ****
Starting Identify Script...
Deleting 0 old log files:
unable to identify

HDDVDs are being identified as UDF DATA instead of Video

Tested with Anchorman and Beowulf HDDVD.

Here is the log for Beowulf:

*** Start config parameters ****
ARM_CHECK_UDF=true
GET_VIDEO_TITLE=true
SKIP_TRANSCODE=false
RAWPATH="/mnt/media/ARM/raw/"
MEDIA_DIR="/mnt/media/ARM/Media/Movies/"
LOGPATH="/mnt/media/ARM/logs/"
LOGLIFE=1
SET_MEDIA_PERMISSIONS=false
CHMOD_VALUE=777
MINLENGTH="600"
RIPMETHOD="backup"
MKV_ARGS="--profile=/opt/arm/default.mmcp.xml"
HB_PRESET="High Profile"
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
MAINFEATURE=true
HB_ARGS="--subtitle scan -F -e x265 -q 20 -E copy:*"
PLEX_SUPPORT=false
EMBY_REFRESH=false
EMBY_SUBFOLDERS=true
EMBY_SERVER=""
EMBY_PORT="8096"
EMBY_CLIENT="ARM"
EMBY_DEVICE="ARM"
EMBY_DEVICEID="ARM"
EMBY_USERNAME=""
EMBY_USERID=""
IFTTT_EVENT="arm_event"
LOG=$LOGPATH$LOGFILE
*** End config parameters ****
Starting Identify Script...
Deleting 0 old log files: 
DEVLINKS=/dev/cdrom /dev/dvd /dev/disk/by-label/BEOWULFD1_NA /dev/disk/by-uuid/38322A3800000000 /dev/disk/by-id/ata-VMware_Virtual_SATA_CDRW_Drive_01000000000000000001 /dev/disk/by-path/pci-0000:02:04.0-ata-2
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:11.0/0000:02:04.0/ata4/host3/target3:0:0/3:0:0:0/block/sr0
DEVTYPE=disk
ID_ATA=1
ID_ATA_FEATURE_SET_PM=1
ID_ATA_FEATURE_SET_PM_ENABLED=1
ID_BUS=ata
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_DVD=1
ID_CDROM_HDDVD=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_HDDVD=1
ID_CDROM_MEDIA_SESSION_COUNT=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_TRACK_COUNT=1
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
ID_FOR_SEAT=block-pci-0000_02_04_0-ata-2
ID_FS_LABEL=BEOWULFD1_NA
ID_FS_LABEL_ENC=BEOWULFD1_NA
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
ID_FS_UUID=38322A3800000000
ID_FS_UUID_ENC=38322A3800000000
ID_MODEL=VMware_Virtual_SATA_CDRW_Drive
ID_MODEL_ENC=VMware\x20Virtual\x20SATA\x20CDRW\x20Drive\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PATH=pci-0000:02:04.0-ata-2
ID_PATH_TAG=pci-0000_02_04_0-ata-2
ID_REVISION=00000001
ID_SERIAL=VMware_Virtual_SATA_CDRW_Drive_01000000000000000001
ID_SERIAL_SHORT=01000000000000000001
ID_TYPE=cd
MAJOR=11
MINOR=0
SUBSYSTEM=block
TAGS=:seat:uaccess:systemd:
USEC_INITIALIZED=1457315
identified udf
found BEOWULFD1_NA on /dev/sr0
identified udf as data

HD and SD versions of Blu Rays

I guess this would be considered more of a feature request then bug but I was wondering how i would be able to make an HD and an SD version of a blu ray with this process. My streaming box isn't very powerful so when I'm traveling I use the SD versions of movies.

Rocky not ripping

I have DVDs of Rocky I-VI (don't judge me, they're great movies). Anyways, I and II are not ripping. Any recommendations for how I can debug it? I did verify that ID_CDROM_MEDIA_TRACK_COUNT_AUDIO
and ID_FS_TYPE were both empty

*** Start config parameters ****
ARM_CHECK_UDF=true
GET_VIDEO_TITLE=true
SKIP_TRANSCODE=false
ARMPATH="/nfs/apple_patch/PlexMedia/Movies/New/"
RAWPATH="/nfs/apple_patch/PlexMedia/Movies/New/Raw/"
MEDIA_DIR="/nfs/apple_patch/PlexMedia/Movies/"
LOGPATH="/opt/arm/logs/"
LOGLIFE=1
SET_MEDIA_PERMISSIONS=false
CHMOD_VALUE=777
MINLENGTH="600"
RIPMETHOD="mkv"
MKV_ARGS=""
HB_PRESET="High Profile"
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
MAINFEATURE=false
HB_ARGS="--subtitle scan -F"
PLEX_SUPPORT=false
EMBY_REFRESH=false
EMBY_SUBFOLDERS=true
EMBY_SERVER=""
EMBY_PORT="8096"
EMBY_CLIENT="ARM"
EMBY_DEVICE="ARM"
EMBY_DEVICEID="ARM"
EMBY_USERNAME=""
EMBY_USERID=""
IFTTT_EVENT="arm_event"
LOG=$LOGPATH$LOGFILE
*** End config parameters ****
Starting Identify Script...
Deleting 0 old log files:
DEVLINKS=/dev/disk/by-id/ata-HL-DT-ST_DVD+_-RW_GHB0N_K4KF1LD5346 /dev/disk/by-id/wwn-0x1207980033x
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sr0
DEVTYPE=disk
ID_ATA=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_BUS=ata
ID_CDROM=1
ID_MODEL=HL-DT-ST_DVD+_-RW_GHB0N
ID_MODEL_ENC=HL-DT-ST\x20DVD+\x2f-RW\x20GHB0N\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=A1B1
ID_SERIAL=HL-DT-ST_DVD+_-RW_GHB0N_K4KF1LD5346
ID_SERIAL_SHORT=K4KF1LD5346
ID_TYPE=cd
ID_WWN=0x1207980033x
ID_WWN_WITH_EXTENSION=0x1207980033x
MAJOR=11
MINOR=0
SUBSYSTEM=block
TAGS=:seat:systemd:uaccess:
USEC_INITIALIZED=2667
unable to identify


*** Start config parameters ****

Launch scripts from systemd instead of udev

On my machine I get some I/O errors whenever I insert a disc (probably because I'm using a cheap slim-SATA to regular SATA adapter for the optical drive). As a consequence udev fails to launch the script as it won't wait until the drive is ready. The solution was to use systemd instead. This should probably be the default because having the script called from udev is not very robust when there is even a small delay. Tested and works on Ubuntu 17.04.

The udev rule:

ACTION=="change", SUBSYSTEM=="block", TAG+="systemd", RUN+="/bin/systemctl start arm@%k.service"

The %k substitution passes on the device name to [email protected] which can use it as instance argument %i:

[Unit]
Description=Automatic Ripping Machine

[Service]
Type=oneshot
ExecStart=/opt/arm/arm_wrapper.sh %i

[Install]
WantedBy=multi-user.target

arm_wrapper.sh then gets the disc info from udevadm, writes it into a temporary file and passes it on to the identify and ripper scripts:

DEVNAME=$1
udevadm info --query=env "/dev/$DEVNAME" > /tmp/arm_disc_info
echo bash /opt/arm/identify.sh /opt/arm/config /tmp/arm_disc_info | at now

In identify.sh:

export DISC_INFO=$2
source $DISC_INFO

Pip3 install error UBuntu 16.10

I'm a noob but I have followed precisely every step(wiped system clean and verified) but I get this error when I reach the step: pip3 install -r requirements.txt

root@ubuntu:/opt/arm# pip3 install -r requirements.txt
Collecting pycurl>=7.43.0 (from -r requirements.txt (line 1))
Using cached pycurl-7.43.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/tmp/pip-build-mkcaaprp/pycurl/setup.py", line 103, in configure_unix
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-mkcaaprp/pycurl/setup.py", line 823, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/tmp/pip-build-mkcaaprp/pycurl/setup.py", line 497, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/tmp/pip-build-mkcaaprp/pycurl/setup.py", line 71, in __init__
    self.configure()
  File "/tmp/pip-build-mkcaaprp/pycurl/setup.py", line 107, in configure_unix
    raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mkcaaprp/pycurl/
root@ubuntu:/opt/arm#

Logic inside config file

There is an if statement at the end of the config file, what is the purpose of that and can it be moved elsewhere? Generally you wouldn't want a config file to contain business logic, only variables and values.

In trying to parse the config file using Python everything I have tried is choking on this if logic.
I don't know enough about bash scripting to know, but I know that all I have ever seen is an empty.log file so I am wondering if this is running for anyone?

# Determine logfile name
# use the label of the DVD/CD or else use empty.log
# this is required for udev events where there is no media available
# such as ejecting the drive

if [ -n "$ID_FS_LABEL" ]; then
        LOGFILE=${ID_FS_LABEL}".log"
        elif [[ -n "$ID_CDROM_MEDIA_TRACK_COUNT_AUDIO" && $(which abcde-musicbrainz-tool) ]]; then
                LOGFILE=$(abcde-musicbrainz-tool --device "$DEVNAME" | cut -f1 -d ' ')".log"
        elif [[ -n "$ID_CDROM_MEDIA_TRACK_COUNT_AUDIO" &&  $(which cd-discid) ]]; then
                LOGFILE=$(cd-discid "$DEVNAME" | cut -f1 -d ' ')".log"
else
        LOGFILE="empty.log"
fi

# Set full logfile path
LOG=$LOGPATH$LOGFILE

ARM Won't Transcode

I'm not sure if this is related to Issue #104, but I just installed ARM again (after using it perfectly a few months ago) on a fresh Ubuntu install. The MakeMKV part works great, and I now have a small pile of folders in my raw folder. But, the transcode script either fails out or never gets called, as HandbrakeCLI never runs and nothings ends up in the Unidentified folder.

Anyone have any ideas? What logs or whatnot can I add to help clarify?

failed to get title - No module named 'pydvdid'

I've run pip3 install against the requirements.txt and it confirms that pydvdid is installed but for some reason the log is showing that when getmovietitle.py run, it fails because the module pydvdid doesn't exist. Any ideas?

Remove requirement to run as root

I assume this is possible, but it will be difficult when it comes to mounting. But I get nervous when directories are being mkdir'd and rm'd as root.

Web Status?

I am finding myself very much wanting to know how many discs I have queued up for transcoding, and how much space I have on my drive where the raw RIPs are stored.

I have put together the following Python script to provide this basic info, as well as displaying the empty.log file that seems to be where all activity is logged, in reverse order so newest is at top.

https://gist.github.com/audioeng/fd36d74cf5ee7e2eb3ca7e910f74d39e

Run it as the same user that ARM is running as, root in my case so I use sudo. Go to /info/ URI for the Info page with queue, it auto refreshes every 60 seconds.

If anyone else likes this, I can probably make this into a PR, but I don't want to clean it up too much unless others find value in it.

Screenshot:
screen shot 2017-09-21 at 12 33 49 am

Data UDF discs should route to data_rip.sh

Per https://b3n.org/automatic-ripping-machine/#comment-4666 UDF formatted data DVDs without video should call the data_rip.sh script instead of sending to video_rip.sh. I suppose the same problem could occur for Blu-Ray, DVD, and CDs.

DVD Movies can be identified by the presence of a VIDEO_TS folder, not sure if there's a way to identify Blu-Ray Movies or Audio CDs.

Here's output of udevadm info -q env -n /dev/sr0 for a UDF formmatted DVD that contains no video. I don't see a way to distinguish it from Movie DVDs using udev parameters.

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
DEVNAME=/dev/sr0
DEVPATH=/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sr0
DEVTYPE=disk
ID_ATA=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_BUS=ata
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_RW=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_DVD_R=1
ID_CDROM_MEDIA_SESSION_COUNT=2
ID_CDROM_MEDIA_SESSION_NEXT=2
ID_CDROM_MEDIA_STATE=appendable
ID_CDROM_MEDIA_TRACK_COUNT=2
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_FOR_SEAT=block-pci-0000_00_1f_2-ata-2
ID_FS_LABEL=Mar_31_2016
ID_FS_LABEL_ENC=Mar\x2031\x202016
ID_FS_TYPE=udf
ID_FS_USAGE=filesystem
ID_FS_UUID=1002062420554446
ID_FS_UUID_ENC=1002062420554446
ID_MODEL=PLDS_DVD+
-RW_DS-8ABSH
ID_MODEL_ENC=PLDS\x20DVD+\x2f-RW\x20DS-8ABSH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PATH=pci-0000:00:1f.2-ata-2
ID_PATH_TAG=pci-0000_00_1f_2-ata-2
ID_REVISION=AD11
ID_SERIAL=PLDS_DVD+_-RW_DS-8ABSH_23HW67363943P51UDA00
ID_SERIAL_SHORT=23HW67363943P51UDA00
ID_TYPE=cd
MAJOR=11
MINOR=0
SUBSYSTEM=block
TAGS=:systemd:seat:uaccess:
USEC_INITIALIZED=1159718

Instead of using HandBrakeCLI profiles, use a custom command line

The default profiles are very limited and HandBrakeCLI have problems to use custom profiles. I use a custom line to encode my data and I would love to have an option to cast the options that I want to use to encode my files instead of using default profiles

For reference, these are my parameters:

HandBrakeCLI -i /file/input.mp4 -o /file/out.mp4 -E fdk_faac -B 96k -6 stereo -R 44.1 -e x264 -q 27 -x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all

Distributed encoding

I have been thinking a lot about ARM lately as I am happily using it to automate the daunting task of ripping my DVD library.

The most time consuming part is obviously encoding video.
ARM does a great job of queuing up these tasks to run on a single computer.

I have been thinking of how we could easily "kick this up a notch" by parallelizing this encoding if a user has multiple hosts available.

I found this post about a distributed solution for handbrake which has my gears turning (pun intended, as this solution uses gearman to manage a queue of tasks to assign to workers) https://tim.purewhite.id.au/2010/09/handbrake-encoding-cluster/

Here are my thoughts which I would love some feedback on.

Main ARM machine, which is where all the ripping occurs and will manage tasks. Can also host encoding if desired.

Worker processes running as docker containers, making it easy to deploy additional workers to handle additional encoding tasks. The docker containers would utilize network storage for the raw ripped data and output to network storage, so they would only require CPU, memory, and networking. By using docker, they could be run on Synology NAS, ESXI or Xen hosts, Macs, Windows, etc.

Thoughts? I'm just thinking about this, don't have really any knowledge of gearman or anything. Just thinking it would have some amazing potential to speed things along.

If anyone else has done any research in this area I would be happy to hear about it.

Need java :(

Unfortunately, it looks like MakeMKV needs Java for certain Blu-rays.
"This disc requires Java runtime (JRE), but none was found. Certain functions will fail, please install Java. See http://www.makemkv.com/bdjava/ for details.",

Details are at http://www.makemkv.com/bdjava/

i ran the following command:
sudo apt install default-jre
and confirmed it fixed the problem.

Need to add the command to the install instructions...

Sample Configs Folder

Create a sample configs folder with several working configurations that work out of the box

root user used for everything

The root user is used for everything in here, including some rm and rm -rf commands. Please also do note that in the README. Run commands with as few as possible rights, e.g. with own user arm.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.