Page 8 of 9

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Mon Dec 06, 2010 10:20 pm
by bytheedge
mac.jedi wrote: bytheedge!

The next version will allow sources to be passed via the Finder or another script. Personally, when I'm ready to encode, I just run the Service from the menu bar.

If a .rec file is a supported source for Handbrake, it could easily be added. Let me know and I'll include it in the next version. To DIY, open the batchEncode.sh file located in the Batch Encode.action bundle. You'd want to add "rec" to the find commands located in the "searchFor..." function.

Thanks!

mac.jedi
Ok, edited batchEncode.sh and that picks up the file and encodes it.

Thansk

bte

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Thu Dec 16, 2010 6:02 am
by Affrae
Hi mac.jedi

You appear to state in the Batch Ripping section that a system with more one Optical Drive can simultanmeously rip more than one disk using Fairmount.

I don't seem to be able to get that to occur. In fact I have to quit Fairmount after each rip so that the Service kicks in again. Otherwise, Fairmount takes over the mounting of the disk and the Service does not get a chance to do its magic.

Is there something else I should be setting or looking out for?

Apologies if I misread your notes.

Taa,

Aff

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Mon Dec 20, 2010 3:14 pm
by Gunthermic
You running the most receant version that is posted 1.0.5?

Are you using batch Rip or the Dispatcher to run?

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Mon Dec 20, 2010 9:50 pm
by mac.jedi
ANNOUNCEMENT: BATCH RIP ACTIONS UPDATED

Update 2010-12-20

Release Notes
Batch Rip Actions for Automator 1.0.6

Everything
  • Provides general fixes that enhance the stability, compatibility and functionality of Batch Rip Actions for Automator.
Batch Rip.action - UPDATED
  • Improved compatibility with MakeMKV.
  • Removed the built-in delay for multiple optical drives. This functionality has been moved to Batch Rip Dispatcher.
  • Added a timeout setting which allows the Action to skip a disc if Fairmount has trouble reading its content.
  • Updated the Sanity Check feature to provide additional feedback if setup isn't configured properly … with any luck you won't even see it.
  • EXPERIMENTAL: Added support for MakeMKV's full BD backup feature which copies the entire Blu-ray disc structure. May not work with certain discs or drives.
  • Changes the Finder Color Labels of the disc folders to Yellow if copied successfully; Red if the Action encounters an error. Useful for Hazel or other scripting apps.
  • Added "Search for Title" feature which allows for searching themoviedb.org or thetvdb.com for the correct titles of your source discs. Copies will be named with the titles selected. Useful for automatically adding iTunes tags later.

Batch Encode.action - UPDATED
  • Added secondary encode option for DVD/SD sources. Two encode types are now available for both HD and SD sources.
  • Added support for HandBrake's Device Presets. Encode settings can now be selected for compatibility with Apple devices.
  • Added support for direct "input" to encode the given source(s). You can use the Service "Batch Rip • Batch Encode (Finder)" to pass sources to this action. You can also select items in the Finder and run the Service on the selected items. See the Batch Encode (Finder) Service below for more info.
  • Updated the Sanity Check feature to provide additional feedback if setup isn't configured properly … with any luck you won't even see it.
  • Added additional feedback on title duration. Provides a list of titles/durations if scan failed to find a title within the min/max duration set in the Action.
  • Added a notification if the Action failed to scan the source for title info.
  • Changed the way cnID numbers are allocated. cnID's are now generated by a random number calculation, rather than sequentially.
  • Added option to keep MakeMKV temp files. These files contain all the original audio and subtitle tracks. Warning: You could run outta disk space pretty fast.
  • Added additional support for Finder Color Labels. Source folders change to Green while processing; Red if the Action encounters an error; Gray if it's done. Output files (m4v or mkv) change to Green if they're done, and Red if the action sees an error with the file. Useful for Hazel or other scripting apps.
  • Updated the Verbose mode to provide additional information during processing.
  • Added Content Ratings, Long Description and Chapter Title support to the Add iTunes Tags feature.
  • Changed the way MakeMKV accesses optical drives while processing.
  • Added a "File Integrity Test" to verify that MKV and MP4 output files are valid. Provides notification if files fail verification.
  • Added a test to check available disk space on destination volume. Provides notification if drive has less capacity than the source. The action will skip sources that exceed capacity.
Batch Rip Dispatcher - UPDATED
  • Changed the way Batch Rip Dispatcher sends source input to the Batch Rip Action.
  • Added a dialog visible when multiple optical drives are present. Prompts the user to launch while waiting for additional discs to mount. This feature can be disabled by using the auto-run option in the Batch Rip Service.
  • Improved the Reset and Enable functions. Reset now clears all existing discs from its record. Clicking Enable now immediately scans for mounted discs and sends them as input to Batch Rip.
Add Movie Tags - UPDATED
  • Added feature to preserve/set the cnid tag of the movie files.
  • Added support for adding Chapter Titles from tagchimp.
  • Original files are now moved to the Trash, rather than kept in its original location as a duplicate. Note: The "Replace existing file" option remains unchanged.
Add TV Tags - UPDATED
  • Added feature to preserve/set the cnid tag of the movie files.
  • Original files are now moved to the Trash, rather than kept in its original location as a duplicate. Note: The "Replace existing file" option remains unchanged.
Rename TV Source Folders - NEW ACTION
  • This action searches thetvdb.com for shows matching the query and renames items to the selected search result and user specified season and disc number.
NEW SERVICES

Batch Rip • Add Chapter Names (Custom)
  • This service has two functions: 1) Will export an editable chapter text file with timecodes and title placeholders from the selected file. 2) When run again, will import and add chapter titles from a text file named "thefilename.chapters.txt" located in the same directory as the movie file.
Batch Rip • Add Chapter Names (Filename)
  • This service will search tagChimp for chapter titles matching the movie file's filename and add them to the file.
Batch Rip • Add Chapter Names (Search)
  • This service will search tagChimp for titles matching a search query and return matching titles. If chapters are found for the selected title, they will be added to the movie file.
Batch Rip • Add cnID to Selected (Same).workflow
  • This service add the same cnID number to selected movie files. Useful for SD/HD encodes.
Batch Rip • Add cnID to Selected (Unique).workflow
  • This service add a unique cnID number to each selected movie files.
Batch Rip • Add HD Flag.workflow
  • This service enables the HD flag in iTunes for HD encoded movie files.
Batch Rip • Rename TV Source Folders.workflow
  • This service searches thetvdb.com for shows matching the query and renames the selected items to the search results and user specified season and disc numbers.
Batch Rip • Rename & Add Custom Title Tag.workflow
  • This service allows you to enter a custom title for your movie file. The service will rename the file and add the title as iTunes metadata to the file.
Batch Rip • Batch Encode (Finder).workflow
  • This service will encode the selected source files with the Batch Encode action. Accepts input from Hazel or other scripts. You can also select items in the Finder and run the Service on the selected items.
  • To run the workflow from Terminal or from a script you'll need to use the following commands to input files to the "automator" command line tool. Here's an example of how to process a single source:

    Code: Select all

    automator -i "/Users/username/Movies/The Office (US) - S1D1" "/Users/username/Library/Services/Batch Rip • Batch Encode (Finder).workflow"
  • To input multiple files, you'll need to pipe the input files as a list with each source on its own line. Here's an example:

    Code: Select all

    echo -e "/Users/username/Movies/The Office (US) - S1D1\n/Users/username/Movies/The Office (US) - S1D2" | automator -i - "/Users/username/Library/Services/Batch Rip • Batch Encode (Finder).workflow"
    The important thing to note is that the sources are quoted in one string. The echo command is given the option "-e" and between each source path is the command "\n", which is a newline character. The automator tool's input command "-i" is given the " - " as input, which means it will use the standard input piped into it as input to the workflow.

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Thu Dec 23, 2010 7:45 am
by tahitibub
Hi Mac.Jedi,

Thanks for your fantastic work.

One thing : how could I setup the batch.encode script in order to automatically encode french and english audio of any DVD (SD) in an MKV container ? Same question for subtitles/caption ...

Regards

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Dec 28, 2010 8:23 pm
by Bog
Mac.jedi... the best tutorial I have ever seen! Thank you.

I am using Batch Rip scripts 1.06 and when I ran it against an ISO image I had already created by clicking the Batch Encode from finder when selecting the ISO. I see the following in the terminal window...

Are the syntax errors normal?

Code: Select all

Last login: Fri Dec 24 18:26:15 on ttys000
/Users/brian/Library/Application\ Support/Batch\ Rip/batchEncodeTmp.sh ; exit;
macbook:~ brian$ /Users/brian/Library/Application\ Support/Batch\ Rip/batchEncodeTmp.sh ; exit;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchEncode.sh v1.0.6

  Start: Tue Dec 28 15:34:31 AST 2010
  Input directory 1: /Users/brian/Movies/Batch Rip Movies
  Input directory 2: /Users/brian/Movies/Batch Rip TV
  Output directory: /Users/brian/Movies/Batch Encode
  Use optical Drive: No
  Encode HD Sources: No
  Keep MKV Temp Files: No
  Auto-add movie tags: Yes
  Retire Existing File: No
  Growl me when complete: Yes
  Encode TV Shows between: 20-120 mins
  Encode Movies between: 80-180 mins
  Native Language: eng (en)
  Use Disc's Default Audio Language: Yes
  Will Encode: DVD2/Apple TV 2

  WILL PROCESS THE FOLLOWING VIDEOS:
/Users/brian/Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh: line 586: [[: 720
720
720
720
720
720
720: syntax error in expression (error token is "720
720
720
720
720
720")
/Users/brian/Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh: line 586: [[: 480
480
480
480
480
480
480: syntax error in expression (error token is "480
480
480
480
480
480")
  BLUE_PLANET_S1D1 : (TV Show)

/Users/brian/Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh: line 586: [[: 720
720
720
720
720
720
720: syntax error in expression (error token is "720
720
720
720
720
720")
/Users/brian/Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh: line 586: [[: 480
480
480
480
480
480
480: syntax error in expression (error token is "480
480
480
480
480
480")
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: BLUE_PLANET_S1D1 

*Scanning File: 'BLUE_PLANET_S1D1'
  Will encode the following tracks: 1, 2 


HandBrake svn3715 (2010122801) - Darwin x86_64 - http://handbrake.fr

*Creating BLUE_PLANET_S1D1-1.m4v
  Video Track: 1, Duration: 00:48:42, Size: 720x480
  Audio Track: 1, English (AC3) (2.0 ch) (iso639-2: eng)
  Subtitle Tracks:
    + 1, Closed Captions (iso639-2: eng) (Text)(CC)

Using Universal/DVD-toolArgs: -e x264  -q 20.0 -a 1,1 -E ca_aac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic  -m --subtitle scan --subtitle-burn --subtitle-forced scan --native-language eng -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Jan 11, 2011 5:31 pm
by mac.jedi
Bog wrote:Mac.jedi... the best tutorial I have ever seen! Thank you.

I am using Batch Rip scripts 1.06 and when I ran it against an ISO image I had already created by clicking the Batch Encode from finder when selecting the ISO. I see the following in the terminal window...

Are the syntax errors normal?
Bog! No those errors aren't normal. It looks like the Action is having trouble parsing the resolution info it gets from the HandBrakeCLI scan. The code it's having problems with is when trying to determine if the disc is HD or SD. I've never tried using an ISO image as a source, so I can't be sure what is causing the errors. If the title encodes fine then there's probably nothing to worry about. I'll see if I can recreate the error and post a fix in a future version.

Thanks!

mac.jedi

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Thu Jan 20, 2011 8:40 am
by MarkeMark
Hi,

This is a great tool, thanks for your hard work.

I have a couple of problems with the latest version.

1 - When I insert a disc and Fairmount starts up it now copies the whole DVD to my harddrive which can take over 8 hours sometimes. I'm sure this didn't use to happen otherwise I would of looked for another solution.

2 - If I check the "Use MarkeMKV DVD" box in the Batch Rip workflow I get this message.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchRip.sh v1.0.6

Start: Thu 20 Jan 2011 08:27:51 GMT
TV Show Output directory: /Volumes/2TB DRIVE/Batch Rip/TV
Movie Output directory: /Volumes/2TB DRIVE/Batch Rip/Movies
Use only MakeMKV: Yes
Encode HD Sources: No
Full BD Backup: No (experimental)
Growl me when complete: Yes
Eject discs when complete: Yes
Skip disc if not decrypted in: 120 seconds
Copy TV Shows between: 20-120 mins (for MakeMKV)
Copy Movies between: 80-180 mins (for MakeMKV)

WILL COPY THE FOLLOWING DISCS:
SPACED (DVD-ROM : TV Show)

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

*Processing DVD-ROM: SPACED
ERROR: No tracks found or failed to scan source.
Check disc, application, and settings in Automator.

Cheers,

Mark :)

2 audio tracks, different language

Posted: Wed Feb 09, 2011 1:22 pm
by elexx
Hey,
first of all I want to thank you for this great awesome tutorial!!

but i've a question: is it possible to encode a ripped medium with 2 audio tracks? the first track should be my native language and the second should be english

manually I scanned the medium got the audiotrack numbers (ie 2 = deu, 1 = eng) and executed handbakecli with the following parameters: "--format "mkv" --encoder ffmpeg --quality 1 --markers --audio 2,1 --aencoder copy,copy"
i've tried the custom dvd(1) settings ("--audio deu,eng" .. and so on) but without success, i only got english as an audio track

(and please excuse my bad english :oops: )

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Mar 01, 2011 5:56 am
by brownpaw
So this is a pretty awesome set of tools... however, seems to be a lot of people requesting custom encode options. Why not allow it to load presets created in the Handbrake GUI?

I also have a question. Would there be any way to support functionality to rip directly from the DVD using Handbrake in the workflow instead of moving it over with Fairmount? Fairmount takes anywhere from 2-6 hours to copy a DVD, while Handbrake can typically do each encode in about 40 minutes directly off the optical drive.

Thanks

BUG in Get Source Info from Handbrake.action

Posted: Sat Mar 05, 2011 6:18 pm
by ScooterComputer
Because HandBrakeCLI grabs stdin, the script will prematurely exit after the first file is scanned. Have to get Handbrake using a different input, so just pop an 'echo "" | ' at the front of line 29 of main.command and problem solved.

Found the solution here:
http://stackoverflow.com/questions/2708 ... pt-to-exit
so credit where due.

-scott

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Thu Mar 24, 2011 1:58 pm
by JMan01
I have been using this script for the last year or so with great success when it comes to the DVD aspect of it (thanks so much for the hard work on it!!)

I recently decided how nice it would be to start converting Blu-Ray movies (have a Synology NAS with lots of extra space) so I purchased an external Plextor PX-B120U reader and attached it to my iMac. Unfortunately when I use it with the batch rip automator workflow it does not work. I sees that it exists but never gets to the point that it is prompting me if it is a Movie or TV show. Manually running the MakeMKV or just browsing it in finder work. I have upgraded the firmware of the unit to 1.08 but that has not fixed anything as well.

Any recommendations of how to proceed? Is anyone using this Plextor model without this issue (not against returning it if it's only this model that is the issue) Any help would be appreciated. I can manually convert them but I have been so spoiled on this script I would love to be use it for Blu-Rays. I am running the latest version of all the required software.

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Sat Mar 26, 2011 4:15 am
by neo8820
I have a disk with 3 titles over 20 minutes. In the batch rip automater file I changed the min movie parameter to 20 minutes. Also, in the batch encode I changed the min param to 20 minutes. However, it's only ripping/encoding the 1st title. What am I doing wrong?

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Mon Apr 11, 2011 4:18 am
by christuf
Hi - awesome app... use it every day, so thank you so much!

It's been throwing a API error for TV shows recently - has something changed, or is something wrong at my end?

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Apr 12, 2011 3:18 am
by matthewmongan
this is by far the most useful toll I have come across in a long time. however, for the past few weeks I have been getting an error every time I use "add tv tags".

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Apr 12, 2011 4:21 pm
by MacuserJ
Is the issue with the TV tags the fact that "thetvdb.org" database doesn't seem to exist but rather "thetvdb.com" does?

If this is the issue how to fix it? I'm too much of a novice for that part.

Also-thanks mac.jedi--this has been so helpful!

ETA: Ooops-sorry, looks like the 12/2010 updates fixed this issue (if not before).

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Apr 19, 2011 6:15 pm
by matthewmongan
I have uninstalled and reinstalled the 12/2010 update. still receiving the error for "add tv tags."

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Sun Jul 24, 2011 9:53 pm
by emkaybop
Just upgraded to Lion. Tag and Rename Movies just asks for confirmation about the movie name and then exits. Everything was working perfectly when running Snow Leopard.

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Mon Jul 25, 2011 2:29 pm
by jbuk2
emkaybop wrote:Just upgraded to Lion. Tag and Rename Movies just asks for confirmation about the movie name and then exits. Everything was working perfectly when running Snow Leopard.
I have the exact same issue. Only happens when running Mac OS 10.7 Lion.

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Jul 26, 2011 9:34 pm
by mgriffin34
Same problem here. Dialog pops up, then nothing happens. Was working perfectly in 10.6.7, died after updating to Lion.

I've tried re-installing (1.0.6).

The console reports
com.apple.automator.xpc.workflowServiceRunner: Could not connect the action buttonPressed: to target of class NSApplication

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Wed Jul 27, 2011 10:07 pm
by mac.jedi
emkaybop wrote:Just upgraded to Lion. Tag and Rename Movies just asks for confirmation about the movie name and then exits. Everything was working perfectly when running Snow Leopard.
Sorry it's been a while; I haven't had much time to work on this. I upgraded a test machine, but haven't had a chance to test everything yet.

If you've already upgraded to Lion, you can make the following changes to get the rename/tag Services working again.

You'll need to change the lines that read

Code: Select all

copy the result as list to {button_pressed, text_returned}
to

Code: Select all

copy the result as list to {text_returned, button_pressed}
This line appears in the following files:

Rename Movie Items.action
main.command
Line-32

Rename TV Source Folders.action
main.command
Line-31 & Line-47

Batch Rip.action
main.command
Line-62 & Line-144

Add Movie Tags.action
main.command
Line-139

Add Movie Poster.action
main.command
Line-35

Batch Rip • Rename & Add Custom Title Tag.workflow
(This file is located in ~/Services, open with Automator)
Line-10


To edit these files, you'll need to navigate to your ~/Library folder which has been hidden in Lion.

In Finder, Choose Go > Go to Folder (Cmd+Shift+G)
When prompted, Type: ~/Library/Automator
Press Return
Select and Right-Click on the Action you wish to edit and Choose "Show Package Contents"
Navigate to Contents > Resources
Right-Click on the main.command file and Choose "Open With"; Choose TextEdit.
Make your changes and Save the Document.

NOTE: In TextEdit, you can use Find & Replace (Option+Command+f)
Find: {button_pressed, text_returned}
Replace: {text_returned, button_pressed}


I hope this helps!

Thanks,

mac.jedi

ANNOUNCEMENT: BATCH RIP ACTIONS UPDATED to 1.0.7

Posted: Sun Jul 31, 2011 6:27 pm
by mac.jedi
ANNOUNCEMENT: BATCH RIP ACTIONS UPDATED

Update 2011-07-31

Release Notes
Batch Rip Actions for Automator 1.0.7

Everything
  • Compatible with Mac OS X Lion 10.7
  • Provides general fixes that enhance the stability, compatibility and functionality of Batch Rip Actions for Automator
Batch Rip.action - UPDATED
  • Improved compatibility with MakeMKV v1.6.12 and Mkvtoolnix v4.9.1.
Batch Encode.action - UPDATED
  • Improved compatibility with MakeMKV v1.6.12 and Mkvtoolnix v4.9.1.
Thanks,

mac.jedi

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Aug 02, 2011 7:55 pm
by dr.glyndwr
Not working for me, I'm afraid. None of the top-level tasks seem to do anything; if I open Batch Rip - Batch Rip.workflow in Automator, I see the message

"The action "Batch Rip" could not be loaded because it could not be located; try reinstalling the action."

All the other services seem to rely on this one, so none of them load either.

I'm running Lion and I can see 27 items under ~/Library/Services. I definitely installed 1.0.7 of the automator actions pack.

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Tue Aug 02, 2011 9:39 pm
by mac.jedi
dr.glyndwr wrote:Not working for me, I'm afraid. None of the top-level tasks seem to do anything; if I open Batch Rip - Batch Rip.workflow in Automator, I see the message

"The action "Batch Rip" could not be loaded because it could not be located; try reinstalling the action."

All the other services seem to rely on this one, so none of them load either.

I'm running Lion and I can see 27 items under ~/Library/Services. I definitely installed 1.0.7 of the automator actions pack.
The Actions should be located in ~/Library/Automator. If they aren't there, try reinstalling with a standard install.

Re: How-To: Automate DVD & Blu-Ray (Backup, Encoding & Taggi

Posted: Wed Aug 03, 2011 7:32 am
by dr.glyndwr
mac.jedi wrote:The Actions should be located in ~/Library/Automator. If they aren't there, try reinstalling with a standard install.
I've got 11 items under there, including one called Batch Rip.action.

I trashed those files and the ones in ~/Library/Services and did another install. Confirmed again that I have 11 actions in /Automator and 27 workflows in /Services. Double-clicking Batch Rip.workflow still gives me the "action could not be found" error though.

Possibly related: my Mac has two drives, an SSD holding / and a HDD holding /Users (with the home directory location changed under System Preferences). Is there a path related issue, maybe? That got me curious so I had a nose through the raw workflow files. For example, I opened Batch Rip.workflow in TextMate and I can see two instances of:

Code: Select all

<string>/Users/robertREDACTED/Library/Automator/Batch Rip.action</string>
(I REDACTED what I think might be your surname, there!)

I changed those paths to my own username and now Batch Rip.workflow opens fine in Automator. I have to go to work now, but I'll test more tonight with an actual DVD.