My Perfect Process:Movie+TV D/L, Convert, UnRar, Rename, Tag

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

UPDATED: 11-18-11 - Includes updated workflows and added Growl messages for when files added to Library folders. Also updated to reflect new versions of software releases. Also added pricing to apps so you can get a feel of cost since these have changed in last year. For the free apps, if the creator has a donation option please consider that if you like their app. Note all of this below.

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

First, just want to thank Mr. Noodle for this ridiculously awesome piece of software. Ill be honest, when i bought the parts to make my hackintosh, i didn't want to pay for any software. I tried to setup my process using a combination of Automator and Folder Monitoring. After spending two days trying to make it work and dealing with the flakey Folder Monitoring feature of OSX, I decided to give Hazel another shot. A few hours later, I had the perfect process created that does everything for me automatically all thanks to Hazel. Gadly forking over $22 as I have not found a lot of software worth the price charged but this software is worth every penny.

Anyway, here is my current process.

Pre-Setup
1) Download the following Programs/Scripts. Note many of these (from Batch Rip Actions and below) are used to encode DVD and HD files. If you do not plan on doing this or want to stick with TV shows, you can ignore.

Also, I am attaching an export of my Hazel rules: http://www.mediafire.com/download.php?419un3ujn12udtn

Also now includes are my modified TVnamer config files (described below): http://www.mediafire.com/download.php?1d9db47h3b7lcb8

Programs
[$21.95] Hazel 2.3.10 (Working on updating to 3.0)
[Free] TVnamer 2.2: Need to use my fixed version here - http://www.mediafire.com/download.php?q9fnx1f9emjeb66 [Original Source - https://github.com/dbr/tvnamer/]
[Free / $2.99] Lingon 1.2: http://sourceforge.net/projects/lingon/files/ NOTE: New version is much easier to use and can be found on app store, yes now costs money.
[Free] Transmission 2.4.2: http://www.transmissionbt.com/
[Free] UnRarx: http://www.unrarx.com/
[$19.99] iFlicks 1.4.3: http://www.iflicksapp.com/
ENCODING ONLY
[Free] Batch Rip Actions for Automator (by Mac.Jedi): http://dl.dropbox.com/u/242398/BatchRip ... -1.0.8.dmg
[Free] Handbrake CLI (version 0.9.5) vs the GUI version: http://handbrake.fr/downloads.php
[Free] MakeMKV: http://www.makemkv.com/
[Free] MKVtoolnix (version 5.0.1): http://jonthn.free.fr/MKVtoolnix/
[Free] BDsup2Sub: http://forum.doom9.org/showthread.php?t ... up2sub+mac

2) Folder Setup: To make this easier, I am embedding a picture of my folder setup. Obviously the names can be whatever you want but for this guide I will be referring to the enclosed. To save time, i will refer to folders by their #/letter. Also, app setups will appear below within the process guide.

Image

TV SHOW PROCESS
1) Automatic TV Episode Download - I like to download network TV shows from a particular private torrent site. In order to easily automate this process, i setup an RSS feed in safari for my torrent site. I then created a simple Automator workflow application that checks the RSS feed and downloads the direct links to the torrents in the RSS that match my criteria and dumps it into the Folder 0. In order to schedule this Automator App to run 30 minutes, i found a GREAT program called Lingon which acts as a GUI for OSX's LaunchD. LaunchD is similar to Cron and allows you to schedule certain jobs within the OS. I created a simple User Daemon that opens the RSS Downloader Automator app every 30 minutes. Link and setup guide to my Automator Workflow: http://www.mediafire.com/file/ok3v4l876 ... _Feeds.zip
HAZEL ACTIONS - Open Downloaded torrents in Transmission
NOTE: UPDATE: TVShows 2 is being continued here and is a good alternative since it allows custom RSS feeds; however still problematic for my setup. TVShows 2: http://tvshowsapp.com/ For those wondering why not TED or TVshows apps freely available its because i found TED unreliable and i loved TVshows but I only want to download the 720p versions of all my shows and TVshows for now only uses the EZTV feed which does not have many shows in HD. Hence the need to create my own app.

2) Transmission Setup - Not much customization necessary here. Under preferences, set the default download location to Folder 1.5. Check Keep incomplete files and choose the Folder 1.0. Check also: Start transfers when added, trash original torrent files, and append .part to incomplete files. Also make sure to uncheck both options under Add Window section. Lastly, make sure the auto add feature is disabled. I found enabling it gave transmission add errors when paired with the Hazel rule to open Transmission. This setup enables you to download files and not have to worry about acting on them until they are done. Its much easier to allow Transmission to manage this.

3) Keep Copy of Download Files for Seeding and Also Move to be Processes/UnRar'd - Here I COPY the downloaded file to Folder 2.0 where it will be processed and I also keep a copy of of my downloaded files in Folder 1.5 (the original Transmission download folder) because if i move the file or edit it, it can no longer be seeded. This is important to me because i need to seed as well as leach in order to keep my ratio high. This is needed for the special torrent site I use.
HAZEL ACTIONS - Two rules here. Copy downloaded files to Folder 2.0. Also a rule is set to trash the Folder 1.5 contents that are older than 1 day.

4) Process Downloaded Files in Folder 2.0 - Here I do a bunch of things. MKVs and AVIs that did not come as separate RAR files are copied to Folder A for encoding to M4V. If the downloads came in multiple RAR parts, i have rules to uncompress them and then copy the resulting MKVs and AVIs to Folder A for encoding.

Note: Previously, I also copied the MKVs and AVIs to folder 3.0 for renaming and moving. The reason was because I used to keep both the MKV and AVI files as well as converting them for my AppleTV2. I was doing this knowing the ATV would get the ability to playback MKVs and other containers and I also used Plex which can playback everything so this way, I had the best of both worlds. Now with XBMC and Plex for ATV2 I have run tests and i see no benefit to keeping TV shows in other formats. I value size of file over everything else and PQ is virtually the same. Thus I am no longer using 3.0 but the rules are still included in my hazel download for those that want to still do this.
HAZEL ACTIONS - Move MKVs and AVIs to Folder A. Also run rule on subfolders. Uncompress RAR files and move resulting MKV and AVI files to Folder A. Trash all remaining contents of Folder 2.0.

5) Encode MKVs to M4V/MP4: Folder A - The credit for this goes to Mac.Jedi over at the macrumors forums who wrote some awesome scripts and automator actions for this part. I am not going to get much into the setup here other then to say that you need to have installed Handbrake CLI, MakeMKV, BDsup2Sub and MKVtoolnix into your Application folder on your mac. Handbrake does the encoding from MKV to M4v. MakeMKV is not used here. MKVtoolnix is for extracting the the video, audio and subtitle streams (which Handbrake does here; more for the movie part of the process) and BDsup2Sub is for converting Blu Ray subtitles into Handbrake friendly format that can be encoded into the M4Vs. The reason I say to put them all in your Application folder is because the Batch Rip Automator Actions contain a special workflow called Batch Encode (Finder) which we will use to do our encoding and it needs all these installed to run even if it is not using them. Installing Batch Rip Automator actions is easy as its a self installer. If you are going to do this part of the guide, you MUST READ HIS THREAD HERE http://forums.macrumors.com/showthread.php?t=805573

Onto the process. This process takes MKVs and encodes them to M4V by running a special workflow called Batch Encode (Finder). You can see this workflow and my settings in the below image. Note the verbose logging as I like to see when the Encoding sessions initiate.

Image

HAZEL ACTIONS - There are three. Originally I just ran Batch Encode (Finder) workflow everytime a new file was passed to Folder A. But I then realized that I could have 5 or 6 files downloaded very close to each other and that would create 5 instances of Handbrake. Even though I have an i7 and wanted to limit the number of instances of Handbrake (and MKVtoolnix) to 3 at any one time. Therefore, my first rule runs an embedded applescript to check the system processes for any running instances of Handbrake and MKVtoolnix (and related processes) and will only run 3 at any given time. The second rule is effectively a loop rule to keep running the script in rule 1 until all files have been converted. The last rule trashes the remaining contents when the worrkflow is complete. Included in the workflow script is a setting to output resulting M4V to Folder B.

6) Rename Files and Tag w/ MetaData: Folder B - Once the handbrake encodes are completed, they are placed into Folder B. The resulting M4V is then renamed with an amazing program called TVnamer. This is the golden part of the process. Coming from the PC, there are many programs that will tag, rename and move TV episodes for you automatically. On the Mac side, very hard to find an all encompassing one. There are a few tutorials written about how to use Hazel to rename TV episodes but using this slick little program i found called TVnamer, the process is made infinitely easier for you. TVrenamer in a command line tool you install that you can set to automatically parse through TV torrent downloads (any format ie Fringe.2x5.x264 or Fringe.S2E5.x264, etc) and rename them with the format you specify and also include the episode name and also then automatically move and place these files into their respective folders (Fringe Folder/Season 2/). Its a beautiful program and highly customizable. After the rename the file is passed to iFlicks for MetaData tagging.

iFlicks is a great program for doing this and much more but this tagging is all I need it for. It unfortunately is not free but there is a 30 day trial and I explain below why i think I need it. First, the iFlicks setup. Open iFlicks and go into the Preferences menu under iFlicks menu. On General tab, check Queue. On the Quicktime tab check flatten to QT Movie. On the iTunes tab I have it set to not add Video to iTunes (this is because Hazel handles that later for good reason, in my case). The Save Videos in Folder is important but we will handle this via an iFlicks rule so its irrelevant for my process but should be obvious what it does. Now click ok. Then click the Rule icon on the top right of the iFlicks screen. Click Add rule. Interface will look familiar like Hazels. Create a rule named Tag and Move TV Shows. Condition is Video Kind is TV Shows. Do the Following should be Set Destination to folder: Folder C. Thats it. Setup complete. Now when Hazel passes the M4Vs to iFlicks, it is tagged and then moved Folder C for the final move.
HAZEL ACTIONS - First I run the TVnamer shell script with my modified configuration file. Throughout I am using color labels to kick off the next process and in this rule I set the file to purple. Then I run another rule which opens iFlicks. Lastly the files are trashed.

7) Move to the NAS for iTunes import: Folder C - This part is simple. I run the TVnamer script again, but with a modified configuration file that is set to utilize TVnamers move and sort capabilities. File is moved to the NAS.
HAZEL ACTIONS - Rule to run the modified TVnamer script. Rule to trash file in case TVnamer does not properly trash the file.

8) Add to iTunes Library and Send Notification: Folder Shows - The last part of the process. When the competed and tagged M4Vs are moved onto the NAS into a folder called Shows and into their respective proper Season and Show folders, only then do I add them to iTunes. All the metadata shows up in iTunes as well as ATV2. Finally a growl notification is sent to let me know which show and at what time it was added. As I previously mentioned above, i do not have iFlicks add the show to iTunes because all my media files reside on a NAS. The iTunes library which acts as the Home Share for Movies and TV shows is my hackintosh (I have another iMac which holds my music and is a separate library). When files are added to iTunes from the NAS, my settings are such that files added to iTunes are not copied to that computers library but instead a reference link is created to the actual file on the NAS. This way, my media files can all reside on the NAS for easy access and redundancy.
HAZEL ACTIONS - 2 Rules. Run on subfolders. Also, Import into iTunes all newly added TV shows and send a custom Growl notification alerting me to the show added and the time added. NOTE: There is a separate Growl Hazel action since I no longer use the Import into iTunes on the main computer.
NOTE: There is a very nice app for your iPhone/iPad called Boxcar. Boxcar forwards growl notifications to your iDevice so you can easily be kept apprise of what is going on in your automated process. I have this setup and it works well.

And there you go. Entire process automated. Now when i go into my ATV2 all my tagged TV shows are there under their respective seasons. Or when I go into Plex, (my other front end of choice), t immediately finds any new shows added (the MKVs) and supplies all the proper metadata.

Again, this would all not be possible without Hazel. Thanks a million. If you are interested in doing this, the hardest part is probably getting the TVnamer config file set to your specs. Read the Github site. Its very informative. EDITED: Actually, if you are as crazy as me hardest part is just setting it all up!!!
Last edited by dhy8386 on Fri Nov 18, 2011 4:28 pm, edited 10 times in total.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

"I love it when a plan comes together."

It's always nice to see people come up with stuff like this. I'm glad you got all this working and thanks for all the great comments. If I ever get in the habit of downloading TV shows, I'll definitely have to give TVrenamer a try.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hey there!

Great run down of more or less the exact process I want Hazel to carry out. As I am somewhat of a noob when it comes to Hazel, I'm confused as to how you programmed it to do what you explained it each step.

e.g. "The second rule uncompresses downloads by searching through subfolders where the compressed files are either in single or multiple parts and then copies the newly compiled download (TV episode in my case) into the 3.0 folder"
How would go about setting this up in hazel. E.g "Subfolder Depth - is - 1" "Extension - is - rar" > "Unarchive file" etc or something like this?
If you could provide this extra bit of info for each step it would be greatly appreciated.

Thanks again for the guide!
jamesrslewis
 
Posts: 2
Joined: Sat Nov 20, 2010 10:12 am

jamesrslewis wrote:Hey there!

Great run down of more or less the exact process I want Hazel to carry out. As I am somewhat of a noob when it comes to Hazel, I'm confused as to how you programmed it to do what you explained it each step.

e.g. "The second rule uncompresses downloads by searching through subfolders where the compressed files are either in single or multiple parts and then copies the newly compiled download (TV episode in my case) into the 3.0 folder"
How would go about setting this up in hazel. E.g "Subfolder Depth - is - 1" "Extension - is - rar" > "Unarchive file" etc or something like this?
If you could provide this extra bit of info for each step it would be greatly appreciated.

Thanks again for the guide!


Make it easy on you, here is a link to my hazel rules as well as my little Automator app to auto download RSS from my particular torrent sites.

http://www.mediafire.com/?o8ygn0g1s8x9b

Hazel has built in to auto-uncompress so it opens the rar files, allows the unrar app to do its thing, and then trashes all the rar files. Its a great appreciated feature. just another reason why this is an essential app to any mac home theater build.

Also, dont really need to subfolder depth action in these cases since if you start with the subfolder rule (run on subfolders), hazel will just dig down. But you certainly could use if you want to.

Take a look and then let me know if you need help with anything.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

Wow that was way more that I expected! Thanks so much!
I got it all up and running thanks to your help and can't wait to watch the TV Shows come rolling in!

Thanks again!
jamesrslewis
 
Posts: 2
Joined: Sat Nov 20, 2010 10:12 am

Sweet, I'm totally setting this up.
You might want to look at Ted.nu - it's a little Java app that runs in the background and downloads your TV show torrents. The authors keep a database of TV shows, so you can just pick the shows you like and it searches for torrents based on air time and a trust network (basically, it prevents the downloading of fake show torrents so you don't end up with some file that says it's scrubs, but is actually a winblows virus or something).
Flynntargart
 
Posts: 27
Joined: Mon Mar 29, 2010 12:07 pm

Here's a better way to snag the TV show RSS feeds on OS X: http://embercode.com/tvshows/ and the new beta version: http://embercode.com/blog/2010/tvshows-20b4-released/
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

Also, here are some Automator workflows/services to assist with tagging (among many other extremely useful things):

http://forums.macrumors.com/showthread.php?t=1054847

View the creator's extensive converting process (which uses Hazel) here: http://forums.macrumors.com/showthread.php?t=805573

See this forum post and the one below for some links to help get you started using these for downloading, converting, tagging and adding to itunes:

viewtopic.php?p=3446#p3446
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

gcoghill wrote:Here's a better way to snag the TV show RSS feeds on OS X: http://embercode.com/tvshows/ and the new beta version: http://embercode.com/blog/2010/tvshows-20b4-released/


Thanks. Know all about it. Used it for awhile but its problematic (at least for me) because many of the shows are not in HD (720p). That only pulls from EZTV which is extensive but still not complete. I use TorrentDay. By far most comprehensive site for HD shows. Hence my own script (which i like because its lightweight and infinitely customizable).


gcoghill wrote:Also, here are some Automator workflows/services to assist with tagging (among many other extremely useful things):

http://forums.macrumors.com/showthread.php?t=1054847

View the creator's extensive converting process (which uses Hazel) here: http://forums.macrumors.com/showthread.php?t=805573


Actually, I am going to update my OP with some sweet new automator/hazel actions that use alot of Mac.Jedis automator scripts. Specifically, my process now includes the ability to auto download rss feeds, download the mkvs, auto convert to m4v (for appletv and itunes), metatag using iflicks, and add to itunes. Also growl notifications to let you know when you have new content. Fully automated.

Also, added tons of automation on the movie conversion side too. Updated post coming by the end of the weekend.
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

dhy8386 wrote:
gcoghill wrote:Here's a better way to snag the TV show RSS feeds on OS X: http://embercode.com/tvshows/ and the new beta version: http://embercode.com/blog/2010/tvshows-20b4-released/


Thanks. Know all about it. Used it for awhile but its problematic (at least for me) because many of the shows are not in HD (720p). That only pulls from EZTV which is extensive but still not complete. I use TorrentDay. By far most comprehensive site for HD shows. Hence my own script (which i like because its lightweight and infinitely customizable).


I probably shouldn't have said better, I meant better for those unfamiliar with your tools. That stuff sounds powerful but over my head. FYI the newer beta of TVShows has an HD option, and it works great. Agreed, the list may be incomplete. The dev said custom RSS feed support is planned but not yet implemented.

Actually, I am going to update my OP with some sweet new automator/hazel actions that use alot of Mac.Jedis automator scripts. Specifically, my process now includes the ability to auto download rss feeds, download the mkvs, auto convert to m4v (for appletv and itunes), metatag using iflicks, and add to itunes. Also growl notifications to let you know when you have new content. Fully automated.

Also, added tons of automation on the movie conversion side too. Updated post coming by the end of the weekend.


Can't wait to see what you cooked up.
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

gcoghill wrote:FYI the newer beta of TVShows has an HD option, and it works great.

During my recent testing it wasn't finding any 720p HD episodes of programs that ted did.
sjk
 
Posts: 332
Joined: Thu Aug 02, 2007 5:43 pm
Location: Eugene

sjk wrote:
gcoghill wrote:FYI the newer beta of TVShows has an HD option, and it works great.

During my recent testing it wasn't finding any 720p HD episodes of programs that ted did.

I suppose it depends on the shows. TVShows has pulled HD content no prob for me.
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

Bottom line is that being able to add custom RSS feeds is key if you want 100% flexibility and most content.

Anyway, first post now updated. Took so long to write (i am sure there i need to wordsmith and spellcheck) that too late tonight to get to Movie part of the process. Will add tomorrow. Much of it is redundant with my TV Show Process anyway.

Warning. Its a long post!
dhy8386
 
Posts: 94
Joined: Tue Nov 09, 2010 12:19 pm

Instead of iFlicks, the Automator Services package by mac.Jedi has a " Tag TV Shows" Service that works great.

I use Hazel to do the renaming, I am just not that familiar with the command line. I like to know what's going on :)

Also, I posted an AppleScript that allows one to use Handbrake CLI to do automated converting here: viewtopic.php?p=3447#p3447

If you're like me and like to handle things granularly via Hazel, the AppleScript method is nice. I poked around with mac.Jedi's workflow, but preferred this method.
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

I cant get tvnamer to work, ive set it like this and it gives me errors all the time:
Image

im usign 10.6.6
daci
 
Posts: 2
Joined: Sun Mar 13, 2011 9:55 am

Next

Return to Tips & Tricks - DO NOT POST QUESTIONS