Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Thanks gunthermic.

Yes, I've got Hazel set up in a very similar way to you to do all of the moving, adding to iTunes archiving etc.
 
anyone have the problem of adding TV tags to tv shows such as:
Parenthood (2010).

thetvdb lists it as Parenthood (2010). But when I have my filename:
Parenthood (2010) - S03E01.m4v
OR
Parenthood 2010 - S03E01.m4v

It cant find it to tag. Any tricks?

----------

Files
Orange - labeled file means it failed during tagging process.
Red - Means File integerity failed(rarely see this)
Green - Movie encoded and tagged correctly(doesn't mean all tagged info is correct or complete)

Folders
Grey - movie encode process done?

I cant remember them all. I have Hazel handle all that, so i dont even pay attention to them anymore. LOL

I have Hazel move all movie files that are orange to a Hold Folder, becuase those movies need my attention beforeing addign to iTunes. Once I am done fixing/tagging, then I change color label and Hazel once again moves files and adds to iTunes.

Believe if your not using Hazel, you're only using half the potential of all these scripts. Put in DVD select movie name, and lit it do it's thing.. I do nothing after selecting movie name, except fix the ones that have an error. To include moving them to my NAS for storage, changing color labels. I change mine to blue after adding, so that Hazel even copies them to a drive for my cloud based solution so I can can access them anywhere I want them.

I actually wonder how I did anything WITHOUT hazel.
 
Not really a solution and not sure if this helps, but I name and organise my TV shows as follows:

For each show, e.g. Dexter, I have a single folder called "Dexter", and inside that I have separate folders called "Season 01", "Season 02", etc. Then files within these folders are called "Dexter - S01E01" etc. No years in the filenames, and I believe this is the standard way to label and organise TV shows.

mac.jedi's actions seem to work fine with this structure.
 
Not really a solution and not sure if this helps, but I name and organise my TV shows as follows:

For each show, e.g. Dexter, I have a single folder called "Dexter", and inside that I have separate folders called "Season 01", "Season 02", etc. Then files within these folders are called "Dexter - S01E01" etc. No years in the filenames, and I believe this is the standard way to label and organise TV shows.

mac.jedi's actions seem to work fine with this structure.

The problem here is that thetvdb show is 'Parenthood (2010)' as 'Parenthood' is something else. So in order for the tags to work, it needs to lookup 'Parenthood (2010)'.

I am wondering if the script ignores the ()
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5)

I've done a few shows with this naming structure in the past and Add TV Tags should have no issues tagging the files. FYI, It doesn't exclude the paren's in the search term.

I just did a few tests renaming files and running the service. Both Parenthood (2010) - S01E01.m4v and Battlestar Galactica (2003) - S01E01.m4v tagged normally. Can anyone else reproduce HackerJL's issue?
 
anyone have the problem of adding TV tags to tv shows such as:
Parenthood (2010).

thetvdb lists it as Parenthood (2010). But when I have my filename:
Parenthood (2010) - S03E01.m4v
OR
Parenthood 2010 - S03E01.m4v

It cant find it to tag. Any tricks?

I looked into this further and there seems to be an issue with the tvdb's data for Parenthood (2010) Season 3, either damaged, not updated or incomplete. The other seasons work fine.
 
I'm having some trouble encoding mkv files that haven't been created with the Batch Rip action. I think it might be connected with the default audio language setting. Could this be correct?

Also, if I have a mix of SD (from DVD rips) and HD mkv files in my Batch Rip Movies folder, what settings should I choose in the Batch Encode action? Can I select for both SD and HD encoding?

Final question is with regard to color labels of files. Can you give us a list of what the different color labels of files in the Batch Rip and Batch Encode folders mean? I know that green labels mean that the files have been processed correctly, but I'm also getting orange-labelled encoded files in the Batch Encode folder, and grey-labelled source folders in the Batch Rip folder.

Many thanks for your help mac.jedi.

While you're solving problems mac.jedi, can you help with this please?
 
While you're solving problems mac.jedi, can you help with this please?

For MKVs gathered from another source, it could be anything. Can you do em' with the HB GUI?

Yes, check both SD and HD checkboxes to encode both types of sources. Batch Rip will handle them accordingly.

Descriptions of the finder label colors were in the release notes for version 1.0.6, I've listed them below. At some point I added orange to indicate that the tagging succeeded, but chapters failed … which happens a lot with tagchimp, he's a stupid monkey ;)

*EDIT: I rechecked the code and it looks like the encoded file changes to orange if:
1. tmdb couldn't find any metadata for the movie (also changes the source folder to orange)
2. cover art failed integrity test (also changes the source folder to orange)
3. couldn't find chapter names


FINDER LABELS:
Batch Rip
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.

Batch Encode
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.
 
Last edited:
You are a scholar and a gentleman.

Yes, I can use the Handbrake GUI. I just prefer your workflow if possible. Less hassle :)
 
You are a scholar and a gentleman.

Yes, I can use the Handbrake GUI. I just prefer your workflow if possible. Less hassle :)

Thanks! I updated my post above, had orange wrong.

For your mkv's, the only thing I can think of to try is using a custom encode setting that would just use the first audio track found. You'd want to duplicate and save a new Service specifically for these files.

Something like a basic AppleTV2 preset should work:
Code:
-e x264  -q 20.0 -r 29.97 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m

See the tutorial for more info on using custom settings.
 
I came up with a silly little shell script for Hazel, to generate a list of my movies that have been encoded and added to iTunes. It updates every time I add a new file, and is saved to my Dropbox so that I can access it anywhere.

I set it to monitor my Encoded movies folder on my external hard disk, and set a rule that if modified in the last 1 minute, then run the following shell script.

Code:
ls /Path_to_your_movies_folder/ | sed -e 's/\.m4v//g' > /Path_to_your_Dropbox/Movies.txt

Simple, but quite handy. I hope others of you find it useful.
 
These scripts have been a great aid in automating my DVD ripping process for use on my Apple devices (iPad 2, Apple TV 2, and iPhone 4).

One feature I have been trying to figure out how to add (with little success because of my limited scripting knowledge) is the ability to include closed captioning as soft-subs in the encodes.

The majority of my rips are TV series I have on DVD and all include closed captions. Being able to auto-select the CC track and encode it would be of huge benefit to me (due to often watching these in noisy environments on the go).

Being closed captions, they require no conversions. I just need to be able to have it auto-select the correct track in the Batch Encode script.

Any advice on this would be greatly appreciated.

Currently, the only way to do this would be to create a new Batch Encode Service with a custom encode setting.

Note: this will override Batch Encode's support for forced subtitles and native language dubbing.

You'll need to use the "--subtitle" flag to include the subtitle tracks.

Batch Encode won't be able to auto-select the cc track so you'll either have know the subtitle track number in advance; or include multiple track numbers.

EXAMPLE (using ATV2 preset):
Code:
-e x264  -q 20.0 -r 29.97 --pfr  -a \${audioTrack},\${audioTrack} -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m --subtitle 1,2,3,4,5,6

Tip: If you're doing a whole season or series, they'll most likely be the same track number.

For more info on getting the track number see the HB wiki: https://trac.handbrake.fr/wiki/Subtitles

I hope this helps!

Thanks!

mac.jedi
 
Hi Mac.Jedi,

It's been a long time I didn't came back to this thread and I'm pleased to see you continue to develop this script, but I've got two questions regarding this new version :

- is it now possible to set the script in order to encode 2 or 3 different audio languages (and the corresponding subtitles), for example French and English, if they can be found in the DVD images (xxx.dvdmedia) ?

- is it possible to make a MKV file from a DVD image ?

Kind regards

Hi tahitibub!

Sorry, the default is still one audio language and one subtitle track … unless you use the custom encode setting option where you can add as many tracks as you'd like. FYI, I'm an American, so I can barely understand one language :) jk

I typically use the "preferred audio language" along with the "use default audio" option to produce a file with the discs default audio language and subtitles if it's not in my native language. It will also look for forced-subs if short segments are in another language.

I haven't worked a lot with disc images like ISO's so I can't tell ya off hand, but I'm sure you could get it to work as a source if you wanna get your hands dirty with the code.
 
Currently, the only way to do this would be to create a new Batch Encode Service with a custom encode setting.

Note: this will override Batch Encode's support for forced subtitles and native language dubbing.

You'll need to use the "--subtitle" flag to include the subtitle tracks.

Batch Encode won't be able to auto-select the cc track so you'll either have know the subtitle track number in advance; or include multiple track numbers.

EXAMPLE (using ATV2 preset):
Code:
-e x264  -q 20.0 -r 29.97 --pfr  -a \${audioTrack},\${audioTrack} -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m --subtitle 1,2,3,4,5,6

Tip: If you're doing a whole season or series, they'll most likely be the same track number.

For more info on getting the track number see the HB wiki: https://trac.handbrake.fr/wiki/Subtitles

I hope this helps!

Thanks!

mac.jedi

Thanks mac.jedi,

That's kind of what I expected. What I've been trying to do is add a subroutine to the batchEncode.sh that would store the Closed Caption track as a variable which I could then use in the custom encode settings

For example:

Code:
-e x264  -q 20.0 -r 29.97 --pfr  -a \${audioTrack},\${audioTrack} -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic -m --subtitle ${closedCaptions}

I've been able to figure out that I can run
Code:
./HandbrakeCLI -i ~/SourceFolder --scan

which gives me a listing of the subtitle tracks (amongst other things) in the following format:

Code:
  + subtitle tracks:
    + 1, English (Closed Caption) (iso639-2: eng) (Bitmap)(VOBSUB)
    + 2, Espanol (iso639-2: spa) (Bitmap)(VOBSUB)
    + 3, Closed Captions (iso639-2: eng) (Text)(CC)

I just need to figure out the following now:

a) How I parse that data into something useful (i.e. determine which track is the English Closed Caption track and pull the track number)
b) How I then actually write the sub-routine that will perform this and add it to the batchEncode.sh
 
Well, I was able to get it figured out....I think. I still need to wait until I get home this afternoon to be able to test it. I added a line to the ProcessArgs function which was already doing most of the work for me.

Any advice or warnings on this would be appreciated.

Code:
processToolArgs() # Sets HandBrake encode settings based on input/output type
{
	# strategic echo to add space
	echo ""
	encodeType="$1"
	inputFile="$2"
	scanFileCmd="\"$handBrakeCliPath\" -i \"$inputFile\" -t $aTrack --scan /dev/null 2>&1"
	scanFile=`eval $scanFileCmd`
	audioInfo=`echo "$scanFile" | egrep "\+ [0-9],.*$nativeLanguage.*Hz" | egrep '(DTS|AC3)' | grep "5.1" | egrep -m1 "" | sed 's|^.*\+ ||'`
	closedCaptions=`echo "$scanFile" | egrep "\+ [0-9],.*$nativeLanguage.*Text" | sed 's|^.*\+ ||' | sed 's|,.*||'
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5)

Might just work … well done! One thing I noticed in your custom hb encode string is that you need to make sure you escape all the variable's dollar signs ($) with a "\". Example: \${closedCaptions}.

Good luck!
 
It worked perfectly. Thank you again for your help mac.jedi.

Rips are now occurring seamlessly with instant soft subtitles.
 
Unable to use automated?

I came across this thread last night after deciding to finally rip my DVD collection to my HTPC Mac Mini - and wow I could not be more impressed with the work put in here, outstanding job mac.jedi. Thank you!

I have one issue that I have been unable to figure out - I cannot run the ripping functions in automated mode. I edited the Batch Rip and Batch Rip (Finder) services to "Run Automatically". I enabled eject and enabled the Dispatcher workflow. My plan was to just insert disks (SD movies only), let them rip to default folder, eject, repeat throughout the day without any other input from me and then weed through to rename and encode later. If I leave "Run Automatically" off everything works fine, I just have to choose movie and skip the naming step. But as soon as I try one with auto on, no dice.

I do not receive any error, it tries for the time listed in the workflow (120sec default) then ejects the disk. It appears to me that during the time Fairmount is initially working it's expecting some input before proceeding. I disabled the "Search for Show/Movie Titles" and my default video kind is set to movie - still no luck.

Any ideas?
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5)

chazwhiz said:
I came across this thread last night after deciding to finally rip my DVD collection to my HTPC Mac Mini - and wow I could not be more impressed with the work put in here, outstanding job mac.jedi. Thank you!

I have one issue that I have been unable to figure out - I cannot run the ripping functions in automated mode. I edited the Batch Rip and Batch Rip (Finder) services to "Run Automatically". I enabled eject and enabled the Dispatcher workflow. My plan was to just insert disks (SD movies only), let them rip to default folder, eject, repeat throughout the day without any other input from me and then weed through to rename and encode later. If I leave "Run Automatically" off everything works fine, I just have to choose movie and skip the naming step. But as soon as I try one with auto on, no dice.

I do not receive any error, it tries for the time listed in the workflow (120sec default) then ejects the disk. It appears to me that during the time Fairmount is initially working it's expecting some input before proceeding. I disabled the "Search for Show/Movie Titles" and my default video kind is set to movie - still no luck.

Any ideas?

I haven't tried that option in a while, I'll check it tonight if no one else comments.

A possible workaround might be to use the CD/DVD control panel in System Preferences, but I don't remember if you have the option to run an Automator workflow. If you can't, I think you can have it run a script to launch the Service. Are you doing one disc at a time or do you have multiple drives?

Thanks!

mac.jedi
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5)
Are you doing one disc at a time or do you have multiple drives?
mac.jedi

Only one disk at a time. So the idea would be to launch the rip workflows using the System pref instead of the dispatcher script?
 
Only one disk at a time. So the idea would be to launch the rip workflows using the System pref instead of the dispatcher script?

Yeah, but unfortunately the more I think about it, I don't think that would solve anything. Getting it to run isn't a problem since dispatcher is launching it. It's really just the "run automatically" option that's not working. I'll need to test it to see if I can recreate the problem. I'll let you know what I find.

Thanks!

mac.jedi
 
I came across this thread last night after deciding to finally rip my DVD collection to my HTPC Mac Mini - and wow I could not be more impressed with the work put in here, outstanding job mac.jedi. Thank you!

I have one issue that I have been unable to figure out - I cannot run the ripping functions in automated mode. I edited the Batch Rip and Batch Rip (Finder) services to "Run Automatically". I enabled eject and enabled the Dispatcher workflow. My plan was to just insert disks (SD movies only), let them rip to default folder, eject, repeat throughout the day without any other input from me and then weed through to rename and encode later. If I leave "Run Automatically" off everything works fine, I just have to choose movie and skip the naming step. But as soon as I try one with auto on, no dice.

I do not receive any error, it tries for the time listed in the workflow (120sec default) then ejects the disk. It appears to me that during the time Fairmount is initially working it's expecting some input before proceeding. I disabled the "Search for Show/Movie Titles" and my default video kind is set to movie - still no luck.

Any ideas?

I found the problem. There is a subroutine in the batchRip.sh file that uses discident.com (founded by RipIt.app) to get the disc's title from their API. It appears the site is down, maybe for good. I'll keep an eye on it and make a change in a future update. Until then, you can edit the batchRip.sh file manually:

  1. Navigate to /Library/Automator.
  2. Select the Batch Rip.action file.
  3. Right-Click and Choose > Show Package Contents.
  4. Navigate to /Contents/Resources/batchRip.sh
  5. Open batchRip.sh in a plain text editor
  6. All you need to do is comment out line 359, Edit line 359 to read:
    Code:
    #getNameFromDiscIdent=$(discIdentQuery "$sourcePath")
  7. Save your file, you'll need admin privileges to save the file.

I hope this helps!

Thanks,

mac.jedi
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.