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.
mrwiggles
Posts: 3
Joined: Tue Nov 24, 2009 3:04 am

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

Post by mrwiggles »

This workflow is mostly working great for me. However, I've run into a problem that I can't resolve. Would love some help on this one.

I've ripped Ken Burns 'The National Parks' series using AnyDVDHD to all the Bluray discs into my Batch Rip TV folder. I ran the .cmd file to generate the show length summary info.txt file that gets put in each the ripped disc folders. However, when I run the Batch Encode Service, I get a message that it can't process the shows as they are not longer than the minimum track time setting. I've checked the minimum time in the Automator Service 'Batch Encode' and I have it set for 30m minimum and 160m maximum. As each disc only has one episode that matches this length setting, I don't see why it's not working. The Terminal output is below. Also, any reason why I'm getting a mkdir 'Permission Denied' Error? I've set the hard disk where all these files live to ignore permissions.

Thanks for any help with this one.

-mw

Code: Select all

Last login: Sun Jan 31 07:09:23 on ttys000
/tmp/batchEncodeTmp.sh ; exit;
Lasa:~ michael$ /tmp/batchEncodeTmp.sh ; exit;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchEncode.sh v1.0.4

  Start: Sun Jan 31 07:11:40 PST 2010
  Input directory 1: /Volumes/Metta/Media Ripping Projects/Batch Rip Movies
  Input directory 2: /Volumes/Metta/Media Ripping Projects/Batch Rip TV
  Output directory: /Volumes/Metta/Media Ripping Projects/Batch Encode
  Use optical Drive: No
  Encode HD Sources: Yes
  Auto-add movie tags: No
  Retire Existing File: No
  Growl me when complete: Yes
  Use tsMuxer: No
  Encode TV Shows between: 30-180 mins
  Encode Movies between: 15-180 mins
  Preferred Audio Language: English
  Will Encode: MKV/1080p, 720p

  WILL PROCESS THE FOLLOWING VIDEOS:
mkdir: /NATIONALPARKS_D1: Permission denied
  NATIONALPARKS_D1 : (TV Show)
mkdir: /NATIONALPARKS_D2: Permission denied
  NATIONALPARKS_D2 : (TV Show)
mkdir: /NATIONALPARKS_D3: Permission denied
  NATIONALPARKS_D3 : (TV Show)
mkdir: /NATIONALPARKS_D4: Permission denied
  NATIONALPARKS_D4 : (TV Show)
mkdir: /NATIONALPARKS_D5: Permission denied
  NATIONALPARKS_D5 : (TV Show)
mkdir: /NATIONALPARKS_D6: Permission denied
  NATIONALPARKS_D6 : (TV Show)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: NATIONALPARKS_D1 

*Scanning Folder: 'NATIONALPARKS_D1'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: NATIONALPARKS_D1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: NATIONALPARKS_D2 

*Scanning Folder: 'NATIONALPARKS_D2'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: NATIONALPARKS_D2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: NATIONALPARKS_D3

*Scanning Folder: 'NATIONALPARKS_D3'
  No tracks on this DVD are longer then the minimum track time setting
Fumo
Posts: 1
Joined: Thu Feb 04, 2010 4:56 pm

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

Post by Fumo »

Hello !
First thing, thanks a lot for this amazing work. It's really useful, easy to handle and I really like the use you made of automator.
I just have a question about languages : I have a lot of french films, and it seems it's an issue to tag them cause I have no idea of the english title (if any) and I'd prefer to keep the french title. I looked a bit but it seems that so far the api you're using for searching films through the database only exists in english :| Could you please tell me if I'm wrong (I'm quite new to apis so I may have missed it) ?
And if they ever release one, will it be this function I'll have to change :

Code: Select all

curl -s "http://api.themoviedb.org/2.1/Movie.search/en/xml/8d7d0edf7ec73435ea5d99d9cba9b54d/$searchTerm" > "${tmpFolder}/${searchTerm}.xml"
(actually switching the address to the fr one wherever it is used) ?

If you have no time to answer I'll understand, it's just out of curiosity =)

Thanks again for the work !
st0ney
Posts: 1
Joined: Sat Feb 13, 2010 1:59 am

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

Post by st0ney »

Thanks for all your hard work on getting this together. I'm sure you are sick of answering questions by now in the various forums this is posted in, but......... I am having a hard time getting this to work correctly. I pretty much have the ripping down. Although I have to wait about 5 minutes between each disc, don't know why but oh well. The main problem is with encoding. I can't seem to get anything to encode. I always get an error saying that "No tracks on this DVD are longer then the minimum track time setting".

Any help would be greatly appreciated.

Code: Select all

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
batchEncode.sh v1.0.4

  Start: Fri Feb 12 18:37:05 PST 2010
  Input directory 1: /Users/jeffstonebraker/Movies/Batch Rip Movies
  Input directory 2: /Users/jeffstonebraker/Movies/Batch Rip TV
  Output directory: /Users/jeffstonebraker/Movies/Batch Encode
  Use optical Drive: No
  Encode HD Sources: No
  Auto-add movie tags: Yes
  Retire Existing File: Yes
  Growl me when complete: Yes
  Use tsMuxer: No
  Encode TV Shows between: 0-120 mins
  Encode Movies between: 0-180 mins
  Preferred Audio Language: English
  Will Encode: SD/DVD, 720p

  WILL PROCESS THE FOLLOWING VIDEOS:
  Jurassic Park (1993) : (Movie)
  The Bourne Identity (2002) : (Movie)
  FRIENDS_SEASON9_DISC4 : (TV Show)
  FRIENDS_SEASON_8_DISC1 : (TV Show)
  FRIENDS_SEASON_8_DISC2 : (TV Show)
  FRIENDS_SEASON_8_DISC3 : (TV Show)
  FRIENDS_SEASON_8_DISC4 : (TV Show)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: Jurassic Park (1993) 

*Scanning Folder: 'Jurassic Park (1993)'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: Jurassic Park (1993)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: The Bourne Identity (2002) 

*Scanning Folder: 'The Bourne Identity (2002)'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: The Bourne Identity (2002)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: FRIENDS_SEASON9_DISC4 

*Scanning Folder: 'FRIENDS_SEASON9_DISC4'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: FRIENDS_SEASON9_DISC4
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: FRIENDS_SEASON_8_DISC1 

*Scanning Folder: 'FRIENDS_SEASON_8_DISC1'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: FRIENDS_SEASON_8_DISC1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: FRIENDS_SEASON_8_DISC2 

*Scanning Folder: 'FRIENDS_SEASON_8_DISC2'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: FRIENDS_SEASON_8_DISC2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: FRIENDS_SEASON_8_DISC3 

*Scanning Folder: 'FRIENDS_SEASON_8_DISC3'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: FRIENDS_SEASON_8_DISC3
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESSING: FRIENDS_SEASON_8_DISC4 

*Scanning Folder: 'FRIENDS_SEASON_8_DISC4'
  No tracks on this DVD are longer then the minimum track time setting


PROCESSING COMPLETE: FRIENDS_SEASON_8_DISC4
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  End: Fri Feb 12 18:37:19 PST 2010
logout

[Process completed]

ecowood
Posts: 19
Joined: Sat Feb 14, 2009 11:09 am

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

Post by ecowood »

Hi anyone able to help modify the Batch Rip Automator Service to replace Fairmount/VLC with Mac DVD Ripper Pro (MDRP) or RipIt?
balufudus
Posts: 5
Joined: Thu Feb 11, 2010 7:46 pm

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

Post by balufudus »

Hi all,
I love Handbrake and have been using it for the past couple weeks now to manually encode my DVDs.

I downloaded the automation package and initially got it to work up to the part where I save my changes to the Batch Rip services file.

I've never been able to run Batch Rip Dispatcher from the services menu; all the services associated with the automation are displayed but grayed out so that I have no ability to run them. I saw earlier messages about a way to change the user privileges on the Automator folder and did change my user to read/write privileges but not to owner (I was unable to do that ---the option to make my user was also grayed out). The only way that I've seen the Dispatcher screen asking me to enable it was by opening the workflow file from Automator and clicking the RUN button in the automater screen (top right corner).

After seeing the dispatcher screen from doing this, I thought I was good to go and tried to run the text that Mac.Jedi instructed.

I saw the screen that prompts you to for which disk type it is (i.e., movie or TV) once but since then haven't been able to get anything to happen. I should add that I can't get any actions to work when I put a DVD in; I tried to manual apply the automation after I put a disk in but to no avail.

Can anyone help?

Thanks.
junkmail
Posts: 2
Joined: Mon Mar 02, 2009 4:03 pm

launchctl errors -- Auto-eject not working during rips

Post by junkmail »

First off, THANK YOU! I've been using your scripts since before the Automator actions. LOVE IT!

I tried upgrading from the old script based system to the Automator actions today and am having difficulty. I'm using a Mac Book, Core 2 Duo running OS 10.6. I've installed the Automator actions version 1.0.4, and updated VLC and Fairmount. I've set up the BatchRip.BatchRipService to enable Growl and Eject disc. When I insert a disc, everything works, except for the following error:

launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist) failed: -10


This error seems to occur up front in the ripping, and at the end of the process. From what I can tell, and I'm no programmer, something is not toggling correctly in my overrides.plist. I'm guessing here, but it would seem that the BatchRip script temporarily shuts down the Dispatcher, rips the DVD, and then restarts the Dispatcher. I think in my case it isn't reading in the options I've set for the Dispatcher when it starts back up again. I'll put the entire log at the end of my post for the curious...

The rips are happening just fine. I'm getting a Growl notification. But I'm not getting a disc eject. Anyone have any suggestions?

Thanks!




Last login: Sat Feb 27 17:27:35 on ttys000
/tmp/batchRipTmp.sh ; exit;
doug-fabels-macbook-pro:~ dfabel$ /tmp/batchRipTmp.sh ; exit;
launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist) failed: -10

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

Start: Sat Feb 27 17:32:06 MST 2010
TV Show Output directory: /Users/dfabel/Movies/Batch Rip TV
Movie Output directory: /Users/dfabel/Movies/Batch Rip Movies
Use only MakeMKV: No
Encode HD Sources: No
Growl me when complete: Yes
Eject discs when complete: Yes
Preferred Audio Language: English

WILL COPY THE FOLLOWING DISCS:
Beauty and the Beast

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

*Scanning DVD-ROM: Beauty and the Beast
Skipped because folder already exists
Note: Rename existing folder if this is a new disc with the same name


PROCESSING COMPLETE
launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist) failed: -10
End: Sat Feb 27 17:32:53 MST 2010
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

logout

[Process completed]
balufudus
Posts: 5
Joined: Thu Feb 11, 2010 7:46 pm

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

Post by balufudus »

balufudus wrote:Hi all,
I love Handbrake and have been using it for the past couple weeks now to manually encode my DVDs.

I downloaded the automation package and initially got it to work up to the part where I save my changes to the Batch Rip services file.

I've never been able to run Batch Rip Dispatcher from the services menu; all the services associated with the automation are displayed but grayed out so that I have no ability to run them. I saw earlier messages about a way to change the user privileges on the Automator folder and did change my user to read/write privileges but not to owner (I was unable to do that ---the option to make my user was also grayed out). The only way that I've seen the Dispatcher screen asking me to enable it was by opening the workflow file from Automator and clicking the RUN button in the automater screen (top right corner).

After seeing the dispatcher screen from doing this, I thought I was good to go and tried to run the text that Mac.Jedi instructed.

I saw the screen that prompts you to for which disk type it is (i.e., movie or TV) once but since then haven't been able to get anything to happen. I should add that I can't get any actions to work when I put a DVD in; I tried to manual apply the automation after I put a disk in but to no avail.

Can anyone help?

Thanks.
Hey all, did some more digging around and realized that I'm *NOT* on snow leopard. All set now.
splodgecat
Posts: 9
Joined: Fri Sep 25, 2009 6:58 am

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

Post by splodgecat »

ecowood wrote:Hi anyone able to help modify the Batch Rip Automator Service to replace Fairmount/VLC with Mac DVD Ripper Pro (MDRP) or RipIt?
I've tried using RipIt as I was attracted to the automation and slickness. I love how it ejects the DVDs when finished. This way I can run the entire thing headless (i.e. my gf can watch TV) and I insert the next disc when the previous is spat out.

I KNOW that the fairmount script aims to do all of this too - but I have a Hackintosh and my dvd drive is flaky when using fairmount. It is reliable only when using RipIt

HOWEVER

Whilst singing the praises of RipIt - it has about a 90% success rate with my discs. I've had several films and tv series which it CLAIMS to rip correctly but then cannot be read by Handbrake CLI. When i then use fairmount on these discs they convert perfectly. My advice - stick with fairmount as much as you can.
mrwiggles
Posts: 3
Joined: Tue Nov 24, 2009 3:04 am

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

Post by mrwiggles »

Mac.Jedi seems to have disappeared from this thread. I'm stuck with the 'none of your tracks meet the minimum time' problem per my post way back in Nov 2009. Never got an answer. I guess that's the problem with abandoned software and support.

I'm thinking I'll need to uninstall Mac.Jedi's scripts and workflow and just revert to my original methods. Unfortunate.

-mw
drh
Posts: 1
Joined: Thu Mar 11, 2010 10:12 am

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

Post by drh »

I'm pretty sure this is a stupid question and I'm embarrassed that after reading through several pages, I'm the only one that appears to be asking this.

The one positive being, I have followed the guide and everything has worked first time, but despite this, I'm sure the author didn't intend some of the steps to be executed so manually.

My query is, after spending so much time getting some excellent scripts generated to automate the procedure (as much as is feasibly possible), it seems strange to me to have to load Automator up every time I want to run the encode script??

1. If I put a DVD in the drive, the script kicks in and asks me for the media type which is great, after selecting the right category, it proceeds to rip the DVD fine.
2. I then go to "Batch Rip Movies" folder and right click the folder and I have a choice in the Services menu to run the "Batch Rename Movie Items", so far so good, this also works fine.

3. Then I'm confused, there is no easy option to proceed to the encode stage. Its not an option in Services if I right click the Movie Folder as I did to rename in step 2, so I have to load up Automator, click open an existing workflow, choose the Batch Encode script and click Run to carry on with the process!?!?!?

I realise the instructions describe automating this procedure through iCal, but I've not got a need to do that just at the minute, so it seems a little long winded to run the "Batch Encode" process through Automator.

One other point I would like to make regarding the instructions, even though I seemed to get everything to work, I found them a little vague at certain points (which I hate to say on what otherwise was the most concise post I have ever read!)
An example:
I got all the way down to the "Using Batch Rip Dispatcher" section. In step.1, it says "Choose Application Menu > Services > "Batch Rip • Batch Rip Dispatcher" to run the service.".
I had no idea where to find an "Application Menu". If I load Automator, there is no "Application Menu" in any of Automator's pull down menu's. The "Choose a template for your workflow" window that appears when you first run automator has an "Application" option, but when you click this, you just end up with a blank screen to start creating a workflow, so to proceed to ">Services>" from there doesn't seem to be correct. The only way I managed to get past this part of the tutorial was to use the "open an existing workflow" option in Automator and browse to the "Batch Rip Dispatcher", open and run this from Automator.

I feel a bit of a fool because clearly no-one else had trouble following the guide, but I read over that several times wondering what I had missed to make sense of the instruction "Choose Application Menu > Services > "Batch Rip • Batch Rip Dispatcher" to run the service.".


Update:
Since posting this, I have opened the "Batch Encode" script in automator and made it into an application to make it a bit easier to access, but I am still intrigued as to how the tutorial was supposed to have me use it other than through iCal.
Should it have been an option from the service menu when right clicking a file/folder like the other scripts?!?
icaruscollapse
Posts: 25
Joined: Fri Mar 30, 2007 3:42 am

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

Post by icaruscollapse »

I haven't really seen anything one way or the other in this thread about soft subtitles (Except one person talking about experimenting with them).

I'm looking to start ripping my blu-rays to use in Plex, but I like the soft subtitles idea, which I know is supported in .mkv files. While I can get these workflows going, a lot of it is over my head, so I don't really know where soft subtitles come into play, so I have a couple questions.

1) When MakeMKV rips from a blu-ray image, those are soft subtitles, correct?

2) If yes, how do I get those soft subs into the 1080p mkv?

3) Somewhat unrelated question: I have friends that download 1080p rips from various, which I'm not looking to do, but I know that the quality on them is outstanding. Can I expect to see the same quality from a workflow like this?

Sorry for all the questions, but I don't want to drop $300 on an external BR drive only to find that it doesn't fit my needs.

Thanks a million!
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

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

Post by mkelley »

Here's what I do to get subtitles in my blu-ray mkv rips on my PC (now, if these are "soft" I can't tell you, but they are the same quality as on the disc, they take up a fraction amount of room, and are on a separate track).

1) Rip the disc to my hard drive with AnyDVD HD.
2) Encode the movie (largest m2ts file) using Handbrake (I passthrough the AC3 and/or DTS track)
3) Use txMuxer to extract the PGS English stream of subtitles from that m2ts file.
4) Use BDSup2Sub to convert the PGS to an IDX stream
5) Remux the IDX stream with the MKV stream using mkvmerge

These are the best and easiest way I know to get subs in an MKV container -- literally takes seconds on my i7 machine and, of course, superb quality (since no re-encoding is going on). Unlike some who use SupRip there isn't any conversion needed (which is time consuming and nearly always leaves things out). If you want you can even force subs in this manner (option in txMuxer).

All software is freeware except for AnyDVD HD.

Using the right settings (High preset with CR set to 22) I don't see any difference even on my 9' HDTV between the original and the encode (so, yes, it's that good).
Deleted User 11865

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

Post by Deleted User 11865 »

mkelley wrote:Here's what I do to get subtitles in my blu-ray mkv rips on my PC (now, if these are "soft" I can't tell you, but they are the same quality as on the disc, they take up a fraction amount of room, and are on a separate track).
Non-soft subs can be called "hard" subs, "burned in" subs, etc. They are encoded in the video. So your subs that are on a separate track are "soft" subs.
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

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

Post by mkelley »

Thanks (I'm still such an idiot about all this -- amazing to me that I can get what I want, but it's mostly due to help from great folks such as yourself).
icaruscollapse
Posts: 25
Joined: Fri Mar 30, 2007 3:42 am

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

Post by icaruscollapse »

Thanks for the reply!

Two more quick questions...

Using your workflow, is it (relatively) easy to keep a commentary track in as well, so I can keep the regular audio as default, but if I feel like listening to commentary I can switch the track?

Also, using the CR of 22, how big do your files end up being? (Assuming you're doing 1080p encodes... Otherwise the info won't really be a big help to me)

Looks like I'm gonna pick up a Blu-Ray drive tomorrow, I think this is exactly what I want...
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

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

Post by mkelley »

My workflow? (I hope you're talking to me -- I've made the mistake of assuming someone else was in the past and was wrong). If it's me, then yes, you can include whatever tracks you want (and then switch as needed). The easiest way to do this is inside of Handbrake -- just add other tracks in addition to passing through the AC3 or DTS track (you can also do this post Handbrake with mkvmerge but I like Handbrake's options better. Remember if the commentary is in AC3 or DTS you can always pass it through unchanged as well, and probably want to).

The audio tracks are separate from the captions. And if you want, you can have more than one caption track, too, just in case you live in a multi-lingual household <g>.

On my full encodes (yep, they are 1080 of course -- I'm usually watching on my 9' screen and anything less wouldn't make sense) my own average is around 4.5GB per two hour movie. But I've had some three hour movies clock in at 2GB, and I've had some 90 minute ones go over 6GB. I've got around 100 movies encoded so far and they are taking up around 500GB worth of space (so you'd think 5GB would be an average, but these movies are averaging longer than 2 hours).
Deleted User 11865

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

Post by Deleted User 11865 »

mkelley wrote:My workflow? (I hope you're talking to me -- I've made the mistake of assuming someone else was in the past and was wrong).
Read the topic's first post ;-)
mkelley
Bright Spark User
Posts: 389
Joined: Fri Dec 25, 2009 2:00 am

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

Post by mkelley »

Ooops -- Mac thread, right?

My bad (as he slowly slinks off into the sunset). Feel free to delete any or all of my responses here (I just use the "Read Unread Posts" but I *must* pay more attention to the forum).
peaslaker
Posts: 4
Joined: Thu Mar 04, 2010 3:35 pm

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

Post by peaslaker »

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

My code string for custom SD DVD was looking something like this:

Code: Select all

-e x264  -q 19.25 -a 1,1 -E ca_aac,ac3 -6 dpl2,auto -R 48,auto -D 0.0,0.0 -f mp4 --loose-anamorphic -m -x weightp=0:me=umh:b-adapt=2:8x8dct=0:direct=auto
The verbose log for the action shows that the x264 advanced parameters are not being passed correctly, because the parameters argument is pre-processed to remove all the colons.

Code: Select all

Using Custom/DVD-toolArgs: -e x264  -q 19.25 -a 1,1 -E ca_aac,ac3 -6 dpl2,auto -R 48,auto -D 0.0,0.0 -f mp4 --loose-anamorphic -m -x weightp=0 me=umh b-adapt=2 8x8dct=0 direct=auto
...

[23:55:57] job configuration:
[23:55:57]  * video track
[23:55:57]    + decoder: mpeg2
[23:55:57]      + bitrate 8500 kbps
[23:55:57]    + frame rate: same as source (around 25.000 fps)
[23:55:57]    + loose anamorphic
[23:55:57]      + modulus: 0
[23:55:57]      + storage dimensions: 720 * 576 -> 720 * 576, crop 2/2/0/0
[23:55:57]      + pixel aspect ratio: 1031 / 720
[23:55:57]      + display dimensions: 1031 * 576
[23:55:57]    + encoder: x264
[23:55:57]      + options: weightp=0
[23:55:57]      + quality: 19.25 (RF)
[23:55:57]  * audio track 0
[23:55:57]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[23:55:57]      + bitrate: 384 kbps, samplerate: 48000 Hz
[23:55:57]    + mixdown: Dolby Pro Logic II
[23:55:57]    + encoder: ca_aac
[23:55:57]      + bitrate: 160 kbps, samplerate: 48000 Hz
[23:55:57]  * audio track 1
[23:55:57]    + decoder: English (AC3) (5.1 ch) (track 1, id 80bd)
[23:55:57]      + bitrate: 384 kbps, samplerate: 48000 Hz
[23:55:57]    + AC3 passthrough

From this log, the salient bit shown in HandbrakeCLI's own output is:

Code: Select all

[23:55:57]    + encoder: x264
[23:55:57]      + options: weightp=0                                           <----------- note all the missing parameters
Re-running the same job without invoking custom parameters, I get the correct result:

Code: Select all

Using AC3/DVD-toolArgs: -e x264  -q 20.0 -a 1,1 -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 

[00:06:48]    + encoder: x264
[00:06:48]      + options: cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6
[00:06:48]      + quality: 20.00 (RF)
In ~/Library/Automator/batch\ Encode.action/Contents/Resources/batchEncode.sh you remove the colons from the custom strings:

Code: Select all

parseVariablesInArgs() # Parses args passed from main.command
{
  
... snip ...
   
   # fix spaces in paths
   movieSearchDir=`echo "$movieSearchDir" | tr ':' ' '`
   tvSearchDir=`echo "$tvSearchDir" | tr ':' ' '`
   outputDir=`echo "$outputDir" | tr ':' ' '`
   handBrakeCliPath=`echo "$handBrakeCliPath" | tr ':' ' '`
   videoKindOverride=`echo "$videoKindOverride" | tr ':' ' '`
   libraryFolder=`echo "$libraryFolder" | tr ':' ' '`
   retiredFolder=`echo "$retiredFolder" | tr ':' ' '`
   customDvdArgs=`echo "$customDvdArgs" | tr ':' ' '`
   custom720pArgs=`echo "$custom720pArgs" | tr ':' ' '`
   custom1080pArgs=`echo "$custom1080pArgs" | tr ':' ' '`
   customSdArgs=`echo "$customSdArgs" | tr ':' ' '`
}
I didn't want to go arbitrarily changing your code because I'd probably break what you were fixing with this code in the first place. Got me looking further into the batch encode action and it seems a shame that the custom settings can't make use of all the good work you've done to get appropriate consideration of dts and ac3 soundtracks.

So... somewhere extrapolated along the axis of "ideally" to "pragmatically" I've set my big batch encode running with my params overwriting yours in an "ugly hacks'r'us" approach.

In the more general sense, I've had a good sniff around the code and can come up with suggestions or offers of assistance, depending.

regards

peaslaker
ecowood
Posts: 19
Joined: Sat Feb 14, 2009 11:09 am

Re: Can't get Real Path for Source

Post by ecowood »

I have had mixed success with the batch Rip. Most of the time it will report it can't find the source but a few times I have been able to get it to work. Probably 1 out of 20 discs have worked. Is this because my home folder is on an external drive?

For all the movies where BatchRip failed I have able to open fairmount and successfully load the movie and copy to my hard disk.

Code: Select all

Last login: Tue Mar 23 09:37:49 on console
/tmp/batchRipTmp.sh ; exit;
You have mail.
John-Reeds-Mac-mini:~ minimac$ /tmp/batchRipTmp.sh ; exit;

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

  Start: Tue 23 Mar 2010 12:50:16 WST
  TV Show Output directory: /Volumes/Home WD 4TB/minimac/Movies/Batch Rip TV
  Movie Output directory: /Volumes/Home WD 4TB/minimac/Movies/Batch Rip Movies
  Use only MakeMKV: No
  Encode HD Sources: No
  Growl me when complete: Yes
  Eject discs when complete: Yes
  Preferred Audio Language: English

  WILL COPY THE FOLLOWING DISCS:
    2001_A_SPACE_ODYSSEY

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

*Scanning DVD-ROM: 2001_A_SPACE_ODYSSEY 
Copying /Volumes/2001_A_SPACE_ODYSSEY 
ditto: can't get real path for source
chmod: /Volumes/Home WD 4TB/minimac/Movies/Batch Rip Movies/2001_A_SPACE_ODYSSEY: No such file or directory

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


PROCESSING COMPLETE
Disk /Volumes/2001_A_SPACE_ODYSSEY ejected
End: Tue 23 Mar 2010 12:51:44 WST
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

logout

[Process completed]

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

Re: Can't get Real Path for Source

Post by PurdueGuy »

ecowood wrote:I have had mixed success with the batch Rip. Most of the time it will report it can't find the source but a few times I have been able to get it to work. Probably 1 out of 20 discs have worked. Is this because my home folder is on an external drive?

For all the movies where BatchRip failed I have able to open fairmount and successfully load the movie and copy to my hard disk.

Code: Select all

Last login: Tue Mar 23 09:37:49 on console
/tmp/batchRipTmp.sh ; exit;
You have mail.
John-Reeds-Mac-mini:~ minimac$ /tmp/batchRipTmp.sh ; exit;

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

  Start: Tue 23 Mar 2010 12:50:16 WST
  TV Show Output directory: /Volumes/Home WD 4TB/minimac/Movies/Batch Rip TV
  Movie Output directory: /Volumes/Home WD 4TB/minimac/Movies/Batch Rip Movies
  Use only MakeMKV: No
  Encode HD Sources: No
  Growl me when complete: Yes
  Eject discs when complete: Yes
  Preferred Audio Language: English

  WILL COPY THE FOLLOWING DISCS:
    2001_A_SPACE_ODYSSEY

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

*Scanning DVD-ROM: 2001_A_SPACE_ODYSSEY 
Copying /Volumes/2001_A_SPACE_ODYSSEY 
ditto: can't get real path for source
chmod: /Volumes/Home WD 4TB/minimac/Movies/Batch Rip Movies/2001_A_SPACE_ODYSSEY: No such file or directory
[Process completed]

Have you tried using directories/drives without spaces in the name? If they aren't properly escaped, that can cause issues. Granted, it would usually never work, but might be worth a try.

You might change the drive name to "Home_WD_4TB" and the folder to "Batch_Rip_Movies". I use "Rip.Movies" and the like.
After the other scripts are done, I have another script the replaces the "_" and "." with spaces (although it doesn't replace the "." for the extension.
ecowood
Posts: 19
Joined: Sat Feb 14, 2009 11:09 am

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

Post by ecowood »

Renamed my drives without spaces but still getting same error message. I am might try returning my home folder to the internal drive of my Mac mini and see if that works.

Thanks for your suggestion.
dugie
Posts: 1
Joined: Thu Apr 01, 2010 8:58 pm

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

Post by dugie »

I need help too.

I've read may entries on how to switch the preffered audio and I did. Changed the audioLanguage="Deutsch". Okay, but it doesn't work.
My goal is to get this order of Audio in my file: Deutsch stereo mix down, Deutsch Ac3 pass, English AC3 but am unable ...
I know I can circumvent this by using the -a 2,2,1 ca_aac,ac3,ac3 ... hardcoded into the endcoding.sh but is this the only way?
Would be much cooler if handbrakeCLI could figure out which number stands for what language - at least the gui does so.

At the moment I get a strange error message:

*Scanning Optical: 'MyMovie'
/Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh: line 472: /Volumes/MyMovie/MyMovie_titleInfo.txt: Read-only file system
/Library/Automator/Batch Encode.action/Contents/Resources/batchEncode.sh: line 472: echo: write error: Broken pipe
Will encode the following tracks: 5
Starhawk
Experienced
Posts: 90
Joined: Sun Feb 24, 2008 8:27 pm

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

Post by Starhawk »

Not sure if this is a bug with Add TV Tags or something Im doing incorrectly, but It seems that when you highlight multiple episodes, and you have DVD order checked in the workflow, that the Add TV Tags workflow will use the DVD order information for the first selected item, but will then go to Aired order for the rest. I am having this issue with the Season 1 of Star Trek: TNG. The only solution is to tag each episode individually.
Starhawk
Experienced
Posts: 90
Joined: Sun Feb 24, 2008 8:27 pm

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

Post by Starhawk »

Also, when using the "Rename TV & Tag TV Items" workflow, Im setting up like the following:

Star Trek The Next Generation - S01E
add number after
Start at 1
Two Digit Numbers
Nothing in between

with the goal to output:

Star Trek The Next Generation - S01E01.m4v
Star Trek The Next Generation - S01E02.m4v
... and so on

I actually get this as a result:
Star Trek The Next Generation - S01E01EStar Trek The Next Generation - S01E01.m4v
Star Trek The Next Generation - S01E02EStar Trek The Next Generation - S01E02.m4v.

Also if I dont use the option to replace the file, it will give a result with a random number at the end for example:

Star Trek The Next Generation - S01E01EStar Trek The Next Generation - S01E01-56021.m4v
Post Reply