How-To: Automate DVD & Blu-Ray (Backup, Encoding & Tagging)

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
jellegard
Posts: 32
Joined: Tue Apr 27, 2010 10:26 pm

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

Post by jellegard »

i have been using mac.jedi's Automator scripts and after some initial minor problems i got the Batch Rip Movies to work (Automator was looking for FairMount in Applications>Fairmount>Fairmount.app instead of just Applications>FairMount.app). i do get an error at the end of the copy:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchRip.sh v1.0.4

Start: Thu Apr 29 12:39:31 MST 2010
TV Show Output directory: /Users/elle/Movies/Batch Rip TV
Movie Output directory: /Users/elle/Movies/Batch Rip Movies
Use only MakeMKV: No
Encode HD Sources: No
Growl me when complete: No
Eject discs when complete: No
Preferred Audio Language: English

WILL COPY THE FOLLOWING DISCS:
ROY_ORBISON_SCN

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

*Scanning DVD-ROM: ROY_ORBISON_SCN
Copying /Volumes/ROY_ORBISON_SCN
2010-04-29 13:08:10.591 osascript[14285:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.

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


PROCESSING COMPLETE
End: Thu Apr 29 13:08:15 MST 2010
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2010-04-29 13:08:16.025 osascript[14314:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
logout

[Process completed]


i have no idea what that output means, and hopefully it won't cause problems later, but the files seem to play fine. but if anyone knows what the output means above i would like to know. so i used the script to get about 12 movies into the Batch Rip Movies folder. then i used the Rename Movie Items on the copied movies by highlighting the 12 movie folders on the Batch Rip Folder and then Ctrl + <click> to get the contextual menu to appear, down to Services and pick the script. worked flawlessly. found every movie in a matter of moments and now have the folders properly named with <Movie Name (year)> convention. so far so good (i hope).

now the problem. when i highlight these same folders that are now properly named and do the Ctrl + <click>, go to Services i do NOT see "Batch Rip•Batch Encode Workflow" so i manually encoded one of the folders using Handbrake to create a WMV file and manually put it into the Batch Encode Folder and then i highlighted the WMV file, Ctrl + <click> to bring up contextual menu, down to Services and there isn't "Btach Rip•Add Movie Tags (Search)" choice there. So i launched Automator, Navigated to the script just mentioned to get the metadata for iTunes, get Automator to launch the script, i drag the MKV file to Automater and hit run - NOTHING.

can someone please tell me what i am doing wrong with the 2nd 1/2 of this process of getting my library processed? really appreciate any and all help...

john.
wysinawyg
Posts: 19
Joined: Wed Apr 07, 2010 1:03 pm

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

Post by wysinawyg »

Might it bet that BatchEncode isn't contextual? I don't ever Ctrl + <click>, just go up to "Finder" in the toolbar, pull down the dropdown and select BatchEncode from there. It appears in a separate bit to Tag etc. and I don't think it is contextual as it does everything in the Batch Rip Movies and Batch Rip TV regardless of what you highlight.
eNut
Posts: 1
Joined: Sun Jun 27, 2010 6:55 pm

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

Post by eNut »

peaslaker wrote:I've been spending some time working with your very useful batch encode action and think I have uncovered a problem with custom settings.

<snip>

regards

peaslaker
I discovered this same problem and digging a little further off peaslaker's research, have a fix for it. Here is a link to a fixed Batch Encode.action you can put in your ~/Library/Automator folder and a patch file for mac.jedi to resolve the issue.

http://dl.dropbox.com/u/128343/Batch%20 ... action.zip
http://dl.dropbox.com/u/128343/BatchEncode.patch

eNut
Knersis
Posts: 9
Joined: Mon Jan 05, 2009 1:14 am

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

Post by Knersis »

Hi Guys,

Over the last 6 or so weeks I've been getting more and more issues with the Batch Rip - Add Movie Tags(Filename).

I get the following error:

Error: Add Movie Tags

Error: Cover art failed integrity test
No artwork was added.

This used to work fine, but has recently been giving me this problem.

Thanks
W
Apple_Doc
Posts: 4
Joined: Wed Jun 06, 2007 8:58 am

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

Post by Apple_Doc »

I can confirm I’m getting the same “failed integrity test” error. This message appears in several of the AppleScripts, and as such I’m not sure what is triggering the failures. This is especially odd since tagging the same movies from a few months ago didn’t generate the error then.
joshnerl
Posts: 3
Joined: Thu Feb 04, 2010 3:07 pm

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

Post by joshnerl »

I'll jump on the "failed integrity test" bandwagon. I tagged a movie 2 weeks ago and it worked fine, then tried it again last week and it failed. I can't any of my runs to work in the "rename and tag movie items" script.
redtail
Posts: 1
Joined: Sat Jul 10, 2010 7:59 am

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

Post by redtail »

Another user confirming the behaviour.
The most likely explanation is that themoviedb.org has changed some code and the script can no longer scrape poster images from it. Is there any possibility of a fix, mac.jedi? These scripts are very useful.

Thanks.
PurdueGuy
Posts: 2
Joined: Fri Mar 26, 2010 9:31 pm

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

Post by PurdueGuy »

Hey guys, count me in too for the artwork errors. I've been using MetaX to add that lately.

Mac.jedi hasn't been active on this or other Mac forums for a while (over 6 months).
Does anyone know if the source code is available anywhere?
wysinawyg
Posts: 19
Joined: Wed Apr 07, 2010 1:03 pm

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

Post by wysinawyg »

While I still use the BatchEncode bits of this (with custom files due to the box for advanced strings being broken) I'm now ripping with RipIt (have to pay but I came across some discs where fairmount etc. just wasn't cutting it) and tagging with iDentify 2 (http://identify2.arrmihardies.com/ which works and doesn't truncate episode descriptions as I was finding with the scripts).
tahitibub
Posts: 4
Joined: Thu Jul 15, 2010 7:56 am

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

Post by tahitibub »

Does anybody knows how to setup mac.jedi's Batch Encode Service in order to encode all audio-tracks provided on the original DVD and to setup audio preferred language different than english (french for me) ?
tahitibub
Posts: 4
Joined: Thu Jul 15, 2010 7:56 am

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

Post by tahitibub »

Hi,

Is there any people in here ?!

I found where to set prefered language different than english : you have to edit ~Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh

Anybody knows how to encode two different audio tracks (eg : english and french) and how to set rate of audio encoding ?

Anybody knows how to keep in touch with this script's author (Robert Yamada) ?

Best Regards.
wysinawyg
Posts: 19
Joined: Wed Apr 07, 2010 1:03 pm

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

Post by wysinawyg »

tahitibub,

I'm not sure you can set preferred language with Handbrake as AFAIK the CLI can't query the DVD to find out which track is which.

For doing multiple audio tracks (in my case to pull out director's commentaries) I ended up with two batchEncode.sh files. Run with the first one which takes two audio tracks and then the second which only takes one. If you try to take more audio tracks than there are the script just crashes so you need to do the double pass.

I don't have my settings in front of me but its fairly easy to find if you've got as far as the batchEncode.sh file. Once you find the presets you'll find part of the string has "1,1 FAAC 160,320" or something vaguely like that. The 1,1 is telling it to take the first audio track and encode it twice (one stereo one surround) and then any settings after that where there are two numbers together are things like the bitrate. If you want track 2 as well you just do "1,1,2,2 FAAC 160,320,160,320" or whatever, basically just repeat the two numbers.

To put French first (assuming its normally the second track) I presume you could put "2,2,1,1 ..." but as I say Handbrake can't auto detect so it would be hit or miss if the French track can move around. You can always create lots of batchEncode.sh files though to deal with the possibilities.

Hope that helps.
tahitibub
Posts: 4
Joined: Thu Jul 15, 2010 7:56 am

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

Post by tahitibub »

Hi wysinawyg,

Thanks for your reply which as been a greatfull help for me.

I've found a solution, which is not the best one, but a beginning : encoding into a mkv file the first 3 audio and subtitles tracks.

So line #923 which were like this :
( AC3/DVD ) toolArgs="-e x264 -q 20.0 -a ${audioTrack},${audioTrack} -E ca_aac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic --decomb --detelecine -m -x cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6";;

became like this :
( AC3/DVD ) toolArgs="-e x264 -q 20.0 -a 1,2,3 -E ca_aac,ca_aac,ca_aac -B 160,160,160 -6 auto,auto,auto -R Auto,Auto,Auto -D 0.0,0.0,0.0 -s 1,2,3 -f mkv -X 720 --loose-anamorphic --decomb --detelecine -m -x cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6";;

If I were a programmer, I'd have perhaps modified mac.jedi's script in order to set the languages we want to keep, but I'm not able to do it.

If someone can do it ...
wysinawyg
Posts: 19
Joined: Wed Apr 07, 2010 1:03 pm

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

Post by wysinawyg »

I'm afraid not me, I'm a total hack. Did you mean to drop the AC3 surround track?

You will also find that if you try to encode anything with less than three audio tracks it will fail to encode at all. As above, my solution is just to have a number of different batchEncode.sh files with different settings and pick the right one depending on what I want.
olivier
Posts: 1
Joined: Thu Aug 12, 2010 7:36 pm

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

Post by olivier »

I want to convert existing Divx/XVid AVIs to MP4 but everytime I get this:
batchEncode.sh v1.0.4

Start: Do 12 Aug 2010 21:37:35 CEST
Input directory 1: /Users/huebler/Movies/Batch Rip Movies
Input directory 2: /Users/huebler/Movies/Batch Rip TV
Output directory: /Users/huebler/Movies/Batch Encode
Use optical Drive: No
Encode HD Sources: No
Auto-add movie tags: No
Retire Existing File: No
Growl me when complete: No
Use tsMuxer: No
Encode TV Shows between: 10-120 mins
Encode Movies between: 80-180 mins
Preferred Audio Language: English
Will Encode: SD

ERROR: No videos found
Check input search directories ($movieSearchDir, $tvSearchDir)
logout
Is there a way to enable AVIs as well for encoding?

Cheers,
Olivier
jamiepda
Posts: 1
Joined: Mon Dec 28, 2009 2:01 pm

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

Post by jamiepda »

Note regarding the Image Integrity problem-

It doesn't look like it is a problem with the script, I think that the API on the TV db is messed up. I posted a question to the dev forum there: http://forums.thetvdb.com/viewtopic.php?f=8&t=4446
lowlight
Posts: 3
Joined: Thu Sep 30, 2010 11:17 pm

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

Post by lowlight »

Bump on if there is a way to use this script to convert AVI's automatically or if someone can recommend something else that will do the trick. I've tried transcodemachine and breakfast but both seem to be out of date and don't work.

Can anyone help out a newbie?
mac.jedi
Enlightened
Posts: 108
Joined: Thu Apr 24, 2008 11:17 pm

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

Post by mac.jedi »

ANNOUNCEMENT: BATCH RIP ACTIONS UPDATED

Sorry everyone, I've busy with other projects. I've been updating things for my own use over the past year, but haven't had a chance to post any updates … better late than never?!

Update 2010-11-23

Release Notes
Batch Rip Actions for Automator 1.0.5

Everything
  • Mkvtoolnix is no longer included in the package. You'll need to install Mkvtoolnix.app to your Applications folder. You can download version 4.4.0 from: http://jonthn.free.fr/MKVtoolnix/
Batch Rip.action - UPDATED
  • • Provides general fixes that enhance the stability, compatibility and functionality of Batch Rip … in other words, I forgot to write them all down.
    • Updated Action UI to include a selectable path to MakeMKV
    • Fixed compatibility issues with later releases of MakeMKV
    • Added DiscIdent functionality to auto-name DVD titles
Batch Encode.action - UPDATED
  • Provides general fixes that enhance the stability, compatibility and functionality of Batch Encode … in other words, I forgot to write them all down.
  • Fixed compatibility issues with later releases of MakeMKV
  • Fixed issues with Custom Encode Args
  • Updated default encode settings for latest Apple devices
  • Added support for setting a Native Language preference. Used for audio and subtitle tracks.
  • Added subtitle support. Default encode settings will now burn in forced subtitles in your native language; or all subtitles if the main audio language is not your native language.
  • Added a 'Use Default Audio' option. If selected, will use the sources main audio language. Useful if the majority of your discs are in your native language. If the main audio language is not your native language, the action will automatically burn-in subtitles in your native language if available.
  • Added support for BDSup2Sub. Automatically finds forced PGS subs, converts them to VOBSUB and remuxes the files for input to HandBrakeCLI. You'll need to install BDSup2Sub.jar to your Applications folder. You can download the latest version from: http://forum.doom9.org/showthread.php?t ... up2sub+mac
  • Updated Action UI to include a selectable path to MakeMKV, Mkvtoolnix and BDSup2Sub.jar
  • Added support for additional input file types including avi, mp4, m4v, mov, mpg.
ooorrr
Posts: 2
Joined: Sun Dec 05, 2010 8:19 am

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

Post by ooorrr »

So I'm excited to try out automating rip-and-storing of a pile of DVD's, but I'm hitting an error that some folks have mentioned above, and I'm hitting it consistently: every time I try to run batch_rip, I get an error:

Code: Select all

Last login: Sat Dec  4 23:14:26 on ttys001
/tmp/batchRipTmp.sh ; exit;
mini:~ scott$ /tmp/batchRipTmp.sh ; exit;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchRip.sh v1.0.5

  Start: Sun Dec  5 00:11:47 PST 2010
  TV Show Output directory: /Users/scott/Movies/Batch_Rip_TV
  Movie Output directory: /Users/scott/Movies/Batch_Rip_Movies
  Use only MakeMKV: No
  Encode HD Sources: No
  Growl me when complete: Yes
  Eject discs when complete: Yes
  Copy TV Shows between: 20-120 mins (for MakeMKV)
  Copy Movies between: 80-180 mins (for MakeMKV)

  WILL COPY THE FOLLOWING DISCS:
    COMEDIANS_OF_COMEDY_TROUBADOUR

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

*Scanning DVD-ROM: Comedians of Comedy 
Copying /Volumes/COMEDIANS_OF_COMEDY_TROUBADOUR 
ditto: can't get real path for source
chmod: /Users/scott/Movies/Batch_Rip_Movies/Comedians of Comedy: No such file or directory

Note that I tried renaming the Batch Rip Movies (and TV) folders with underscores, but it didn't make a difference (I changed the pointers in the automation). I've tried with several different DVD's, still no luck. No unusual drives or anything like that, and the machine is pretty clean. I'm usually pretty savvy at figuring my way through these parts, but no luck on this one. Is this a common problem with a clearer fix than I'm finding?

Oh, and here's my donation back, such as it is: there's a typo in the tutorial - step 1 of "Creating Your Batch Rip Service" should point to ~/Library/Services, not ~/Library/Automation.
mac.jedi
Enlightened
Posts: 108
Joined: Thu Apr 24, 2008 11:17 pm

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

Post by mac.jedi »

ooorrr wrote:So I'm excited to try out automating rip-and-storing of a pile of DVD's, but I'm hitting an error that some folks have mentioned above, and I'm hitting it consistently: every time I try to run batch_rip, I get an error:

Code: Select all

Last login: Sat Dec  4 23:14:26 on ttys001
/tmp/batchRipTmp.sh ; exit;
mini:~ scott$ /tmp/batchRipTmp.sh ; exit;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchRip.sh v1.0.5

  Start: Sun Dec  5 00:11:47 PST 2010
  TV Show Output directory: /Users/scott/Movies/Batch_Rip_TV
  Movie Output directory: /Users/scott/Movies/Batch_Rip_Movies
  Use only MakeMKV: No
  Encode HD Sources: No
  Growl me when complete: Yes
  Eject discs when complete: Yes
  Copy TV Shows between: 20-120 mins (for MakeMKV)
  Copy Movies between: 80-180 mins (for MakeMKV)

  WILL COPY THE FOLLOWING DISCS:
    COMEDIANS_OF_COMEDY_TROUBADOUR

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

*Scanning DVD-ROM: Comedians of Comedy 
Copying /Volumes/COMEDIANS_OF_COMEDY_TROUBADOUR 
ditto: can't get real path for source
chmod: /Users/scott/Movies/Batch_Rip_Movies/Comedians of Comedy: No such file or directory

Note that I tried renaming the Batch Rip Movies (and TV) folders with underscores, but it didn't make a difference (I changed the pointers in the automation). I've tried with several different DVD's, still no luck. No unusual drives or anything like that, and the machine is pretty clean. I'm usually pretty savvy at figuring my way through these parts, but no luck on this one. Is this a common problem with a clearer fix than I'm finding?

Oh, and here's my donation back, such as it is: there's a typo in the tutorial - step 1 of "Creating Your Batch Rip Service" should point to ~/Library/Services, not ~/Library/Automation.
Hi ooorrr!

The folder names don't matter … spaces are fine to use. This issue is usually because either Fairmount or VLC is not installed properly, Fairmount is having trouble reading the Disc and mounting it as a Disk Image, or the drive access is slow and the Action continues before Fairmount has finished remounting the disc. I've got a beta of the next version of Batch Rip which helps troubleshoot these errors.

Try launching Fairmount manually. Once the Disc is mounted as a Disk Image, try copying the VIDEO_TS folder via the Finder to your one of your Batch Rip folders. Let me know how it goes.

Thanks,

mac.jedi
ooorrr
Posts: 2
Joined: Sun Dec 05, 2010 8:19 am

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

Post by ooorrr »

Hi mac.jedi - thanks for the fast response.

I was able to launch and use Fairmount manually for both discs (and some others), copied the content without trouble, and was able to batch encode smoothly. I've made sure that the automation script is pointing to the actual Fairmount in the Applications folder, rather than leaving the default Fairmount.app placeholder, and both Fairmount and VLC are in the /Applications directory.

Any other ideas? Honestly, once I realized it's just a minute's worth of work, it's not a big deal - I'm just working with a handful of discs anyway - but thought it would be worth fixing.

Thanks!
bytheedge
Posts: 3
Joined: Mon Dec 06, 2010 6:02 pm

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

Post by bytheedge »

Hi mac.jedi

This is a great collection of skips, thanks for those and the excellent set up guide.

I would like to use the encoding script to also work on files I download from my Topfield 5810 PVR, the format for these is .rec, is it easy to edit the scripts to support this file type? I'm not asking for a change to your version but if you think it's easy to edit the scripts, is it one line of code or would I need to put in a section for .rec?

Also is it feasible to add the encode script as a folder action so it automatically picks up files dropped into the folder or is it best left being run at a set time by iCal?

Many thanks

bte
mac.jedi
Enlightened
Posts: 108
Joined: Thu Apr 24, 2008 11:17 pm

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

Post by mac.jedi »

bytheedge wrote:Hi mac.jedi

This is a great collection of skips, thanks for those and the excellent set up guide.

I would like to use the encoding script to also work on files I download from my Topfield 5810 PVR, the format for these is .rec, is it easy to edit the scripts to support this file type? I'm not asking for a change to your version but if you think it's easy to edit the scripts, is it one line of code or would I need to put in a section for .rec?

Also is it feasible to add the encode script as a folder action so it automatically picks up files dropped into the folder or is it best left being run at a set time by iCal?

Many thanks

bte
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
Deleted User 11865

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

Post by Deleted User 11865 »

bytheedge wrote:I would like to use the encoding script to also work on files I download from my Topfield 5810 PVR, the format for these is .rec, is it easy to edit the scripts to support this file type? I'm not asking for a change to your version but if you think it's easy to edit the scripts, is it one line of code or would I need to put in a section for .rec?
The first thing to do would be to determine what kind of files they are, and whether HandBrake supports them (never heard of .rec, but it could be a special extension for a regular MPEG-TS or something). Open one of the files in HandBrake and post the contents of the Acitvity Log (see red banner) in a post, in code blocks:

Code: Select all

[code]Activity Log contents
[/code]
bytheedge
Posts: 3
Joined: Mon Dec 06, 2010 6:02 pm

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

Post by bytheedge »

Thanks for the replies.

Handbrake does work with .rec files. I'll have a go at editing the script myself and see how I get on.
Post Reply